PDA

View Full Version : to drop someone's connection if he changed ip


Comrad
2008-07-07, 04:16 AM CDT
Hello all!
I have a Fedora 9 router machine.
Could someone tell me if there is any standard way to kill all or some connections from a machine, that changed his IP address and then when it will return his IP back - allow all connections again?

tnx

Nokia
2008-07-07, 04:25 AM CDT
Assign IP addresses based on MAC and allow only those IP/MAC's on the internet.

Comrad
2008-07-07, 04:43 AM CDT
Hello, NokiA!
How can I allow only those IP/MAC's?
By iptables rules?
Can you give an example how to do that?

tnx

Nokia
2008-07-07, 05:32 AM CDT
...I have a Fedora 9 router machine....

Could you be more specific ?

Comrad
2008-07-07, 10:04 AM CDT
I've understand.
I think in my case it would be enough something like this:
iptables -I INPUT 1 -s 192.168.0.31 -m mac --mac-source 00:15:F2:F2:F2:38 -j ACCEPT
iptables -I INPUT 2 -s 192.168.0.31 -j REJECT

Thanks for the thought!