Is there a simple script, or way of automatically changing my ip address in the firewall/nat rules after my modem goes off line and my isp gives me a new address. I have quite a few nat rules and it becomes a hassle if i have regular outages. If i can put a simple script in that checks my real ip against what I have set in my nat rules,and changes them it if my real ip changes would be great.
Any help appreciated.
Philip
just leave the IP out of the nat rule, and specify in-interface= only.
Sam
you you use masquerade, you don’t have to specify the ip address.
it will automaticlly using the new IP address.
I have tried both suggestions to no avail, I need to specify a certain port number and ip address of the local machine for my application and masquerade doesn’t work.
Having a rule is ok but things like my ftp won’t work after an ip change, and if i’ve already left the house I can’t change it till I get home, thats my main reason for a script that will check and change as neccesary.
Philip