WAN connection disconnecting at midnight, every night?

Started by mlody11, October 01, 2021, 08:26:45 AM

Previous topic - Next topic
New to opnsense but configuration of it has been not too difficult because there is a lot documentation out there.  That said, I am running into an issue every night.  My WAN gets disconnected every night at midnight, like clock work.  My opnsense setup is virtualized on a proxmox hypervisor.  Tonight, I stayed up to see the logs that come through and this is what is in the logs:

2021-10-01T00:01:02 dhclient[5529] exiting.
2021-10-01T00:01:02 dhclient[5529] connection closed
2021-10-01T00:01:02 dhclient[5529] My address ([WAN1 IP OMITTED]) was deleted, dhclient exiting
2021-10-01T00:00:23 opnsense[12568] /usr/local/etc/rc.filter_configure: Ignore down inet6 gateways : WAN_DHCP,WAN2_DHCP
2021-10-01T00:00:23 opnsense[12568] /usr/local/etc/rc.filter_configure: Ignore down inet gateways : WAN_DHCP,WAN2_DHCP
2021-10-01T00:00:22 opnsense[43211] /usr/local/etc/rc.filter_configure: Ignore down inet6 gateways : WAN_DHCP
2021-10-01T00:00:22 opnsense[43211] /usr/local/etc/rc.filter_configure: ROUTING: creating /tmp/vtnet2_defaultgw using '[WAN2 IP OMITTED]'
2021-10-01T00:00:22 opnsense[43211] /usr/local/etc/rc.filter_configure: ROUTING: removing /tmp/vtnet1_defaultgw
2021-10-01T00:00:22 opnsense[43211] /usr/local/etc/rc.filter_configure: Ignore down inet gateways : WAN_DHCP
2021-10-01T00:00:20 opnsense[33640] /status_services.php: Adding static route for monitor 1.0.0.1 via [WAN2 IP OMITTED]
2021-10-01T00:00:20 opnsense[33640] /status_services.php: Removing static route for monitor 1.0.0.1 via [WAN2 IP OMITTED]


Any idea what could be causing this?  I'm on the latest version 21.7.3_1.  I actually upgraded to 21.7.3_3 just now after I clicked to check the version I'm on...  heres to hoping it gets resolved but I don't think it will.

To elaborate a bit more, I have a WAN backup, a LTE modem that I keep on during work hours in case my internet goes down.  I turn this off via a cron script in opnsense by taking down the interface for the night.  I do this in case my internet does go down at night so it doesn't use the backup because its a pay-per-GB deal.

I also have issues with this WAN2 interface coming back after a night... when I click renew on the dhcp for the interface, I get a php error.... https://imgur.com/a/33ieRhq

But the WAN2 link comes back.  I wonder if all of this is related.  Otherwise, all works well.

Any ideas or things to try would be appreciated.

Anyone have any thoughts? Happened again despite the upgrade. Always exactly at midnight.

DHCP lease time from your ISP? Does your ISP kick you off at 00:00?
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

October 02, 2021, 05:52:05 PM #3 Last Edit: October 02, 2021, 05:54:56 PM by mlody11
I have a dynamic ip but I do not think It's my isp.  I'm coming from a udm pro from ubiquiti and while the isp did go down, not like this. Usually it was at 2am and never this often.   Also.. The lte hotspot is the other wan connection and it goes down too.  It happens for both at the same time. Pretty unlikely that both would reset like that.  And if I reboot the firewall without rebooting anything else, it starts working again.  Usually I would need to reset the modem for it to get a new ip from the isp. In this case it is vise versa, I reboot opnsense and leave the modem alone and it works. Also, it preserves the ip when I reboot it
.. Meaning the wan ip is the same in this case. Usually when the isp goes down I get a new ip.

I definitely think this is opnsense but I just don't know what. Is there some kind of firewall state reset at midnight that drops the connections?  I looked at my cron settings and I don't see anything in thee at midnight but what could be running at midnight on a schedule that I can't edit in cron?

October 02, 2021, 06:01:50 PM #4 Last Edit: October 02, 2021, 06:08:57 PM by mlody11
Hold... I got a. Good suggestion that a vm backup running at night might be the reason.

Doubt this is it. Backup is at 1am.. But I turned it off anyway to see.

I'm having the same issue. I have OPNSense running in a VM and the internet connection cuts off at midnight. However, the VM itself will still have Internet access so it seems like a routing issue?

Any further insights are much appreciated.

I think this is solved with the help of a reddit user.  I had a nightly backup running of the VM and I think it was disconnecting the ethernet connections.  I also fixed some suricata errors in the meantime but I think the real culprit was the nightly VM backup.  Hope this helps someone if they find it.