Ronneil Camara wrote: > Hi guys, > > I always modify my ipf.rules and ipnat.rules when my cable ip address changes. > > Example: > > pass in log quick proto tcp from any to MY_LIVE_IP_ADDRESS port = 80 flags S keep >state group 11 > > Is there a way I can change MY_LIVE_IP_ADDRESS so that I don't need to > modify ipf.rules and ipnat.rules anymore?
There was a thread about this last month, I believe. The guy came up with a good solution. He had his DHCP client invoke a script upon getting a new IP address. The script was a very short and simple shell script, I believe, that did a simple search and replace of "MY_IP" to whatever his current IP was in a ipf.conf.template (or similarly named file) and created ipf.conf. Same thing for ipnat.conf. He then reloaded ipf. There are other ways, but that was a pretty nice solution. Note that last I checked 'pump' does not have the ability to run scripts upon receiving a new IP, but dhcpcd does. Phil -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759
