IPs security, any solution ...?

Protecting your Linux box

IPs security, any solution ...?

Postby wazim4_u » Mon Nov 14, 2005 2:37 am

Salam..!

I'am running cable internet (LAN). Problem i am facing is, some clients from network change the IP address and play with them so they make a lot of ip conflicts in the NETWORK. I have even binded ips with MAC. i tell you the configuration.

Network = 192.168.1.0/24

clients ip ( example ) = 192.168.1.5/255.255.255.0

IP binding with MAC #

iptables -A FORWARD -i eth0 -s 192.168.1.5 -p all -m mac --mac-source 00:50:FC:91:71:3C -j ACCEPT

how can i stop clients by playing with IP changing ?
Any solution ? please let me know

Allah Hafiz
wazim4_u
Naik
 
Posts: 68
Joined: Mon Jun 13, 2005 10:38 pm
Location: Saudi Arabia (Riyadh)

Re:

Postby LinuxFreaK » Mon Nov 14, 2005 1:03 pm

Dear wazim4_u,
Salam,

For that you need to create a script which will check mac address and ip address for every minute and if some one using any one else ip then block them until you removed them from blocked list !!

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi

Postby wazim4_u » Mon Nov 14, 2005 1:37 pm

Dear LinuxFreak
Salam...!
I am not a programmer, even not good in Scripts, just a basic concepts and operating of LINUX. How can i get this Script. Can you or someone else will make it for me. I really need help about it

Allah hafiz
wazim4_u
Naik
 
Posts: 68
Joined: Mon Jun 13, 2005 10:38 pm
Location: Saudi Arabia (Riyadh)

Re:

Postby LinuxFreaK » Tue Nov 15, 2005 3:33 am

Dear wazim4_u,
Salam,

wazim4_u wrote:I am not a programmer, even not good in Scripts, just a basic concepts and operating of LINUX. How can i get this Script. Can you or someone else will make it for me. I really need help about it


Don't have time for now because i am busy with my studies and work !!

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi

Postby wazim4_u » Wed Nov 16, 2005 5:12 am

Dear LinuxFreak
Salam
How long i have to wait for this script. do u think using DHCP with fixed IPs binding with MAC will help me ? or it would be the same ?
if anyone other can help me so please do it

Wasim
wazim4_u
Naik
 
Posts: 68
Joined: Mon Jun 13, 2005 10:38 pm
Location: Saudi Arabia (Riyadh)

Postby compucated » Fri Nov 25, 2005 4:34 pm

well, the thing to understand is, you cann't stop ip confliction at lan if users setting ip address manually.
There are two solutions, either take action physcially or buy and deploy some advance switch, with IP-MAC binding capability.

With new versions of managable switches you can bind client's IP-MAC address at their switch port and its drop non-associated source MAC-IP at port without going further.

moreover with iptables you can just prevent uncombine IP-MAC source to entering your linux gateway, the IP confliction problem at LAN will remain same.

regards
Hamid Ashraf
compucated(at)msn(dot)com
compucated
Naik
 
Posts: 75
Joined: Mon Oct 13, 2003 5:06 am
Location: Karachi, Pakistan

Postby lambda » Sun Nov 27, 2005 1:19 pm

wazim4_u wrote:How long i have to wait for this script.

you won't have to wait for long if you write it yourself.

you need to do something like this:
Code: Select all
loop:
  ping all addresses on your network
  node their mac addresses
  check the ip address/mac address pairs against a text file (use "arp -na" to help)
  disable mac addresses of the changed machines
  wait one minute
  goto loop


don't know how to script? learn. you have the network, the large number of pcs to test with, and the users who you can't trust. not everyone else here has that setup. don't expect anyone to do your job for you.
lambda
Major General
 
Posts: 3451
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore

Postby wazim4_u » Tue Nov 29, 2005 8:40 pm

Dear lambda
Salam...!
I am very thankful to you all experts to help whenever needed and also show the right way to walk on. Yes the two options you have given to me are the only options, one of them i am doing. the scripting you told me to do learn. YES i donot know how to script, Never tried it before. But as u say i should learn and do things my own thats the right.

But i just need some help in it. I am ZERO in Scripting. Tell me any site from where i can learn it. your recommended site i mean. I will also try Google for it inshallah

Once again
Thanks a lot of urs replies

Wasim
wazim4_u
Naik
 
Posts: 68
Joined: Mon Jun 13, 2005 10:38 pm
Location: Saudi Arabia (Riyadh)

Re:

Postby LinuxFreaK » Wed Nov 30, 2005 11:30 am

Dear wazim4_u,
Salam,

You do not need to go some where just read this man pages and i am sure you will get some idea :)

# man bash
# man grep
# man awk
# man sed
# man iptables


Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi

Re: IPs security, any solution ...?

Postby syedbilalmasaud » Thu Dec 22, 2005 2:49 pm

wazim4_u wrote:Salam..!

I'am running cable internet (LAN). Problem i am facing is, some clients from network change the IP address and play with them so they make a lot of ip conflicts in the NETWORK. I have even binded ips with MAC. i tell you the configuration.

Network = 192.168.1.0/24

clients ip ( example ) = 192.168.1.5/255.255.255.0

IP binding with MAC #

iptables -A FORWARD -i eth0 -s 192.168.1.5 -p all -m mac --mac-source 00:50:FC:91:71:3C -j ACCEPT

how can i stop clients by playing with IP changing ?
Any solution ? please let me know

Allah Hafiz

you just do it using squid
install arp package check arp acl for mac address and allow only matched acls
no one other user will access squid
Cheers :)

:D B I L A L :D
syedbilalmasaud
Naib Subedar
 
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
Location: Attock

Re:

Postby LinuxFreaK » Thu Dec 22, 2005 8:36 pm

Dear syedbilalmasaud,
Salam,

Don't you think he need to reload squid again and again when ever he add/remove MAC ?

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi

Re: IPs security, any solution ...?

Postby nayyares » Thu Dec 22, 2005 10:39 pm

wazim4_u wrote:Salam..!

I'am running cable internet (LAN). Problem i am facing is, some clients from network change the IP address and play with them so they make a lot of ip conflicts in the NETWORK. I have even binded ips with MAC. i tell you the configuration.

Network = 192.168.1.0/24

clients ip ( example ) = 192.168.1.5/255.255.255.0

IP binding with MAC #

iptables -A FORWARD -i eth0 -s 192.168.1.5 -p all -m mac --mac-source 00:50:FC:91:71:3C -j ACCEPT

how can i stop clients by playing with IP changing ?
Any solution ? please let me know

Allah Hafiz


Hello:

Here is the solution http://www.aosp.net/projects/maccontroler.pdf read it and do an email of thanks to author :)

Cheers:
Nayyar Ahmad
RHCE, CCNA, OCP DBA
nayyares aT fedoraproject DoT org
blogs: nayyares.blogspot.com
nayyares
Battalion Quarter Master Havaldaar
 
Posts: 237
Joined: Tue Dec 13, 2005 10:47 pm
Location: JNB, SA


Return to Security

Who is online

Users browsing this forum: No registered users and 0 guests

cron