[TriLUG] dhclient and iptables

Philip Buckley phil at 1918.com
Sat Jun 14 07:35:30 EDT 2003


I guess it would depend on how often your IP is being reset but you could write a simple shell script that checks your current IP adrress against the IP address it checked, say 10 minutes ago, and if it's changed it modifies the variable which holds the IP address in your iptables rule set.

Phil

*********** REPLY SEPARATOR  ***********

On 6/13/2003 at 11:00 PM BSmith wrote:

>I'm currently running Debian and I'm in the process of setting up
>iptables. 
>I seem to have run into a little problem, however. I would like to be able 
>to use my IP address in my rule set, but since my IP address is dished out 
>by a DHCP server every time I receive a new lease my old rule set is moot. 
>I was searching around for a bit and noticed that there is an option with 
>the pump DHCP client to execute a script anytime the client receives a new 
>DHCP lease. Is there a way to do something similar with dhclient or is 
>there another possible work around?
>
>Thanks for the help.
>
>_______________________________________________
>TriLUG mailing list
>    http://www.trilug.org/mailman/listinfo/trilug
>TriLUG Organizational FAQ:
>    http://www.trilug.org/faq/TriLUG-faq.html







More information about the TriLUG mailing list