PDA

Bekijk de volledige versie : What happens when the WAN IP address changes?



tomilius
19-03-2005, 23:09
This is merely a theoretical question--my knowledge of linux and iptables is not great enough to tell whether or not this would happen, and my knowledge of the router is not great enough to tell how the router would react.

Say when my router renews its WAN IP address, that IP address changes... Would that mess up the iptables entries that had been created using the previous IP address? Would the router just reboot? I'm curious what would happen here, as I use post-firewall ...

What I mean is, would entries like this be affected, or somehow changed to match the new IP address?:
iptables -A PREROUTING -p tcp -m tcp -d $2 --dport 5900 -j DNAT --to 192.168.1.10

If the router doesn't reboot, what can I do to make sure the entries are "refreshed" to match the new IP address?

DeF
20-03-2005, 20:48
This is merely a theoretical question--my knowledge of linux and iptables is not great enough to tell whether or not this would happen, and my knowledge of the router is not great enough to tell how the router would react.

Say when my router renews its WAN IP address, that IP address changes... Would that mess up the iptables entries that had been created using the previous IP address? Would the router just reboot? I'm curious what would happen here, as I use post-firewall ...

What I mean is, would entries like this be affected, or somehow changed to match the new IP address?:
iptables -A PREROUTING -p tcp -m tcp -d $2 --dport 5900 -j DNAT --to 192.168.1.10

If the router doesn't reboot, what can I do to make sure the entries are "refreshed" to match the new IP address?

In my situation on the moment the ip is renewed most(default and nat?) of the iptables are flushed and rebuilt just like the first time you boot. So if you have a rule like that in your post-firewall script it should work just fine.

tomilius
20-03-2005, 22:00
OK, thanks. Just making sure.