Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
WAN DHCP gateway stuck on old address
« previous
next »
Print
Pages: [
1
]
Author
Topic: WAN DHCP gateway stuck on old address (Read 3697 times)
Bonkerton
Newbie
Posts: 29
Karma: 0
WAN DHCP gateway stuck on old address
«
on:
July 19, 2019, 12:06:06 am »
I had the problem that after the update to 19.7 all of a sudden one of my OpenVPN client interfaces was set as the the gateway instead of my WAN (which goes to a cable modem)
Described here
https://forum.opnsense.org/index.php?topic=13438.msg62208#msg62208
So I took my OPNsense router offline to debug. The setup for that is a router connected to a standalone router running OVPN which I use for my IOT devices, like this:
WAN <> OVPN-router <> Basic-Router <> OPNsense-FW for testing
The Basic-Router LAN-port was set to 172.20.20.1, and the OPNsense WAN correctly received an IP in that subnet and used 172.20.20.1 as the gateway for WAN.
After fixing the WAN/OVPN gateway assignment I had full internet again through the OPNsense box and thought I could put it back online.
Booted, internet didn't work. tried a lot of things, couldn't get it to work. Finally saw that the WAN DHCP gateway address was still stuck to the 'old' 172.20.20.1, while my WAN IP showed 24.119.xxx.4. The WAN gateway adress should have pointed to 24.119.xxx.1 - I was able to ping that address, but nothing else.
So I took it back to the test-setup described above.
1st screenshot attached: Old setup, gateway correct as 172.20.20.1 (most likely still stuck there from before)
Changed Basic-Router LAN to 172.21.21.1, rebooted that router and then rebooted OPNsense
2nd screenshot attached: new (correct) WAN IP, but gateway stuck at previous address (172.20.20.1)
Did a dhclient re1, no change.
3rd screenshot attached: tail of /var/db/dhclient.leases.re1
It shows the initial test setup with
-correct WAN IP & gateway
-changed&correct WAN IP & gateway (even though GUI still shows old/wrong gateway address)
-same WAN IP/GW after executing 'dhclient re1' - GUI still shows old/wrong gateway address
The I deleted the WAN IF & gateway in OPNsense GUI and rebooted.
Added the WAN IF back to re1 interface, had to do a DHCP 'Renew' in [Interfaces:Overview:WAN] and got the correct IP&GW addresses, and internet works.
Now I changed the Basic-Router LAN address (which should always be the OPNsense WAN gateway address) to 172.30.30.1
Rebooted the Basic-Router and then the OPNsense box and the IP & GW addresses had changed correctly.
Changed the Basic-Router LAN to 10.10.10.1
Rebooted the Basic-Router and then the OPNsense box and the IP & GW addresses had changed correctly.
TLDR:
If you lose internet connectivity down the road (because maybe your ISP changed your assigned dynamic WAN IP & gateway addresses) check if the correct gateway address is shown under [Interfaces:Overview:WAN] - it might be stuck at the old one.
If so, delete everything WAN under gateways and interfaces, reboot and re-create the WAN IF/GW
Logged
Bonkerton
Newbie
Posts: 29
Karma: 0
Re: WAN DHCP gateway stuck on old address
«
Reply #1 on:
July 19, 2019, 02:01:29 am »
Addition:
Moved it back as my main system, WAN connected to my cable-modem.
Same story, WAN gets correct IP, but WAN Gateway IP that shows under [Interfaces:Overview:WAN] is stuck on old one (10.10.10.1 in this case)
Deleted WAN under Interfaces:Assignments and under System:Gateways:Single
Didn't reboot, and just reassigned WAN to re1-interface. Works again, until ISP changes gateway and I'll have to do it again...
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
WAN DHCP gateway stuck on old address