OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: ark on October 05, 2020, 02:21:15 PM

Title: Internet on WAN disconnect every weekend (and up again after interface restart)
Post by: ark on October 05, 2020, 02:21:15 PM
Hello, I have this weird problem where I lost internet connection every weekends (saturday or sunday at specific time), only after I restarted the WAN interface or router then the problem goes away... until next week.

My current configuration is Intel nuc with USB EA300 gigabit (RTL8153) to wan port) virtualized in proxmox and OpnSense 20.7.3, WAN is connected to ISP GPON fiber optic modem (ZTE) and using bridged configuration to bypass NAT. Previously I had similar problem with snapshot OpenWRT on Raspberry Pi 4 and same USB Gigabit ethernet. At first I thought it's unstable USB Gigabit ethernet but this is the 3rd adapter that I've tried and all shows similar problem.

When I tried view OpnSense backend log, there was almost no weird log during internet loss except that during the disconnect I noticed that in WAN connection :

dhclient[53240] bound to 10.88.138.210 -- renewal in 1800 seconds.
changed to this after restarting interface
dhclient[66388] bound to 10.88.142.56 -- renewal in 1800 seconds.

It seems that my ISP issues DHCP refresh every 30 minutes or so, and every week on saturday or sunday it changes the subnet segment which both OpenWRT and OpnSense failed to receive new IP's, I haven't tried using non USB ethernet for WAN Port though.

Is there a script to detect subnet change in WAN and initiate interface restart?
Title: Re: Internet on WAN disconnect every weekend (and up again after interface restart)
Post by: paul_a2 on October 08, 2020, 07:45:12 PM
Firewall -> Advanced - scroll to end to find "Dynamic state reset". Maybe checking that will help?
Title: Re: Internet on WAN disconnect every weekend (and up again after interface restart)
Post by: ark on October 12, 2020, 03:23:28 PM
Thanks will try that. The results will probably can be seen for another weeks though as the wan only change ip subnet every weekends.
Title: Re: Internet on WAN disconnect every weekend (and up again after interface restart)
Post by: ark on October 19, 2020, 10:22:14 PM
After waiting for next WAN IP restart, similar problem still occured. getting WAN DHCP address (different subnet) but no internet connection that only after restarting OpnSense internet went back online again.

After this I tried changing some options in WAN :
1. uncheck "block private networks" since my WAN IP Address is still private network (10.x.x.x)
2. check "enable dynamic gateway policy" (I don't really quite understand about this option though)

Hopefully I got new results next week when my WAN IP address automatically refreshes from the ISP side.
Title: Re: Internet on WAN disconnect every weekend (and up again after interface restart)
Post by: ark on November 27, 2020, 12:20:59 AM
I think I found the problem, disabling WAN ipv6 and now everytime ISP Gateway issues new ipv4 ip address it handles normally (wan gateway never have ipv6 anyway), hopefully this resolve the problem.