Weird OPNSense Issue

After getting my OPNSense firewall I had the issue of it losing the Internet connection every now and again. Luckily, this reddit post helped me to solve the issue for the next couple of months:

Unfortunately, today in the morning the WiFi was gone - which was a new one, previously I was able to connect to the WiFi, but I had no Internet access - and after a quick troubleshoot I rebooted the firewall and after it came back up I installed a few updates. (I did the last marge upgrade of OPNSense as well as one update that followed when they were released, so today I only did a minor update) I still had to re-check the check-mark mentioned above though.

After a few hours though, the connection was again lost and OPNSense was not able to establish a connection even after a few reboots. I tried to directly attach my PC to the fiewall’s LAN connection but I also did not know how to proceed further. (I had a rather weird 192.254.x.x IP in an 255.255.0.0 subnet.) Furthermore, I was still not able to connect to the Internet…

Since it is rather late in the evening, I proceeded to directly connect my switch to my ISP’s router and call it a day, but naturally, I would like to solve my problems with the firewall.

So, any help or input would be immensely appreciated :slight_smile:

Hardware? Logs? What gets 192.154.X.X (that’s a private IP address), WAN?

1 Like

I was able the get this PC at a fairly good price, so I went ahead with it even though it has a broadcom network card:

Yes, that was my notebook’s IP when I directly connected it to the firewall with an Ethernet cable.

I don’t know since I am unable to connect to the firewall given that I do not know its IP and the IP range (255.255.0.0) is rather large…

So we have some kind of cheap chinese small form factor PC with a Broadcom NIC (you’re using VLANs or what’s on WAN)? 192.168.X.X is a private IP address and that’s not something Windows randomly so it’s either configured manually or you have some DHCP server (or multiple) running on your network. Since you can’t connect and I presume you know what IP you’ve specified on the LAN interface I’m going to guess the machine hangs or at least LAN interface. Without any kind of logs/output it’s pretty much impossible to pin point the cause.

Best guess is that at least LAN Interface is bad/broken/buggy/unreliable or the box itself. Might also be related to heat, storage or PSU.

1 Like

Exactly, it was cheap enough that I figured I would give it a try. Currently, I don’t have any VLANs but I have the intention if adding a few later.

Also, I connected my macbook diretly to the firewall, so there is only the firewall, my ISP’s router and the notebook on the internal network.

See the statement above, so I think it is something opnsense picks. Not sure what opnsense address would be though…

Yeah, that’s sort of a problem. I don’t think ot is heat related though as the CPU did not go above 37°C.

After having it turned off for almost two days it works again and thus I am also able tp provide logs:

Errors and above:

2023-04-12T12:19:23	Error	opnsense	/usr/local/etc/rc.newwanip: The command '/bin/kill -'TERM' '85608'' returned exit code '1', the output was 'kill: 85608: No such process'	
2023-04-12T12:19:22	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/sbin/mount -r -t nullfs '/usr/local/lib/python3.9' '/var/unbound/usr/local/lib/python3.9'' returned exit code '1', the output was 'mount_nullfs: /var/unbound/usr/local/lib/python3.9: Device busy'	
2023-04-12T12:19:22	Error	opnsense	/usr/local/etc/rc.newwanip: The command '/sbin/mount -t devfs devfs '/var/unbound/dev'' returned exit code '1', the output was 'mount: devfs: Device busy'	
2023-04-12T12:19:21	Error	opnsense	/usr/local/etc/rc.newwanip: The command '/usr/local/sbin/ntpd -g -c '/var/etc/ntpd.conf'' returned exit code '1', the output was ''	
2023-04-12T12:19:10	Error	opnsense	/usr/local/etc/rc.bootup: The command '/bin/kill -'TERM' '81999'' returned exit code '1', the output was 'kill: 81999: No such process'	
2023-04-12T12:19:10	Error	dhcp6c	transmit failed: Can't assign requested address	
2023-04-10T21:00:18	Error	opnsense	/usr/local/etc/rc.newwanip: The command '/sbin/mount -r -t nullfs '/usr/local/lib/python3.9' '/var/unbound/usr/local/lib/python3.9'' returned exit code '1', the output was 'mount_nullfs: /var/unbound/usr/local/lib/python3.9: Resource deadlock avoided'	
2023-04-10T21:00:18	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/usr/local/sbin/ntpd -g -c '/var/etc/ntpd.conf'' returned exit code '1', the output was ''	
2023-04-10T21:00:07	Error	opnsense	/usr/local/etc/rc.bootup: The command '/bin/kill -'TERM' '15577'' returned exit code '1', the output was 'kill: 15577: No such process'	
2023-04-10T21:00:07	Error	dhcp6c	transmit failed: Can't assign requested address	
2023-04-10T18:39:34	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/usr/local/sbin/ntpd -g -c '/var/etc/ntpd.conf'' returned exit code '1', the output was ''	
2023-04-10T18:39:23	Error	opnsense	/usr/local/etc/rc.bootup: The command '/bin/kill -'TERM' '72372'' returned exit code '1', the output was 'kill: 72372: No such process'	
2023-04-10T18:39:23	Error	dhcp6c	transmit failed: Can't assign requested address	
2023-04-10T10:50:00	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/bin/kill -'TERM' '30661'' returned exit code '1', the output was 'kill: 30661: No such process'	
2023-04-10T10:49:59	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/sbin/mount -r -t nullfs '/usr/local/lib/python3.9' '/var/unbound/usr/local/lib/python3.9'' returned exit code '1', the output was 'mount_nullfs: /var/unbound/usr/local/lib/python3.9: Resource deadlock avoided'	
2023-04-10T10:49:59	Error	opnsense	/usr/local/etc/rc.newwanip: The command '/sbin/mount -t devfs devfs '/var/unbound/dev'' returned exit code '1', the output was 'mount: devfs: Device busy'	
2023-04-10T10:49:58	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/usr/local/sbin/ntpd -g -c '/var/etc/ntpd.conf'' returned exit code '1', the output was ''	
2023-04-10T10:49:46	Error	opnsense	/usr/local/etc/rc.bootup: The command '/bin/kill -'TERM' '39340'' returned exit code '1', the output was 'kill: 39340: No such process'	
2023-04-10T10:49:46	Error	dhcp6c	transmit failed: Can't assign requested address	
2023-04-10T10:43:51	Error	dhcp6c	transmit failed: Can't assign requested address

More verbose:

2023-04-10T21:00:18	Error	opnsense	/usr/local/etc/rc.newwanip: The command '/sbin/mount -r -t nullfs '/usr/local/lib/python3.9' '/var/unbound/usr/local/lib/python3.9'' returned exit code '1', the output was 'mount_nullfs: /var/unbound/usr/local/lib/python3.9: Resource deadlock avoided'	
2023-04-10T21:00:18	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure newwanip (execute task : unbound_configure_do(,wan))	
2023-04-10T21:00:18	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,wan))	
2023-04-10T21:00:18	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())	
2023-04-10T21:00:18	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure newwanip (execute task : openssh_configure_do(,wan))	
2023-04-10T21:00:18	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure newwanip (execute task : opendns_configure_do())	
2023-04-10T21:00:18	Error	opnsense	/usr/local/etc/rc.newwanipv6: The command '/usr/local/sbin/ntpd -g -c '/var/etc/ntpd.conf'' returned exit code '1', the output was ''	
2023-04-10T21:00:16	Notice	flowd_aggregate.py	startup, check database.	
2023-04-10T21:00:16	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure newwanip (execute task : ntpd_configure_do())	
2023-04-10T21:00:16	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure newwanip (execute task : dnsmasq_configure_do())	
2023-04-10T21:00:16	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure newwanip (,wan)	
2023-04-10T21:00:16	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure vpn (execute task : openvpn_configure_do(,wan))	
2023-04-10T21:00:16	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure vpn (execute task : ipsec_configure_do(,wan))	
2023-04-10T21:00:16	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure vpn (,wan)	
2023-04-10T21:00:15	Notice	syslog-ng	Configuration reload finished;	
2023-04-10T21:00:15	Notice	syslog-ng	Configuration reload request received, reloading configuration;	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure newwanip (,wan)	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,wan))	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,wan))	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure vpn (,wan)	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: plugins_configure monitor (execute task : dpinger_configure_do(1))	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: plugins_configure monitor (1)	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: keeping current inet6 default gateway 'fe80::ae22:5ff:fec4:8650%re1'	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_DHCP))	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure monitor (,WAN_DHCP)	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: setting IPv6 default route to fe80::ae22:5ff:fec4:8650	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: IPv6 default gateway set to wan	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: keeping current inet default gateway '192.168.0.1'	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: setting IPv4 default route to 192.168.0.1	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: IPv4 default gateway set to wan	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.routing_configure: ROUTING: entering configure using defaults	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_DHCP6))	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: plugins_configure monitor (,WAN_DHCP6)
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: keeping current inet6 default gateway 'fe80::ae22:5ff:fec4:8650%re1'	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: setting IPv6 default route to fe80::ae22:5ff:fec4:8650	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: IPv6 default gateway set to wan	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: keeping current inet default gateway '192.168.0.1'	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: setting IPv4 default route to 192.168.0.1	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: IPv4 default gateway set to wan	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: ROUTING: entering configure using 'wan'	
2023-04-10T21:00:14	Notice	opnsense	/usr/local/etc/rc.newwanipv6: IP renewal starting (new: 2a02:8389:101:9c00:7e83:34ff:feb2:b36d, old: , interface: WAN[wan], device: re1, force: no)	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_DHCP))	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_DHCP)	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_DHCP6))	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_DHCP6)	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: keeping current inet6 default gateway 'fe80::ae22:5ff:fec4:8650%re1'	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: setting IPv6 default route to fe80::ae22:5ff:fec4:8650	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: IPv6 default gateway set to wan	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: keeping current inet default gateway '192.168.0.1'	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 192.168.0.1	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: IPv4 default gateway set to wan	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'	
2023-04-10T21:00:13	Notice	opnsense	/usr/local/etc/rc.newwanip: IP renewal starting (new: 192.168.0.164, old: , interface: WAN[wan], device: re1, force: no)	
2023-04-10T21:00:12	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure bootup (execute task : unbound_configure_do(1))	
2023-04-10T21:00:12	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure bootup (execute task : opendns_configure_do(1))	
2023-04-10T21:00:12	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure bootup (execute task : ntpd_configure_do(1))	
2023-04-10T21:00:12	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure bootup (1)	
2023-04-10T21:00:12	Notice	opnsense	/usr/local/etc/rc.bootup: Resyncing OpenVPN instances.	
2023-04-10T21:00:12	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure vpn (execute task : openvpn_configure_do(1))	
2023-04-10T21:00:11	Notice	opnsense	/usr/local/etc/rc.newwanipv6: IP renewal deferred during boot on 're1'	
2023-04-10T21:00:10	Notice	opnsense	/usr/local/etc/rc.newwanipv6: IP renewal deferred during boot on 're1'	
2023-04-10T21:00:10	Notice	dhcp6c	dhcp6c REQUEST on re1 - running newipv6	
2023-04-10T21:00:09	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure vpn (execute task : ipsec_configure_do(1))	
2023-04-10T21:00:09	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure vpn (1)	
2023-04-10T21:00:09	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure monitor (execute task : dpinger_configure_do(1,null,1))	
2023-04-10T21:00:09	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure monitor (1,null,1)	
2023-04-10T21:00:08	Notice	dhcp6c	RTSOLD script - Sending SIGHUP to dhcp6c	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dns (execute task : unbound_configure_do(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dns (execute task : dnsmasq_configure_do(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dns (1)	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dhcrelay (execute task : dhcpd_dhcrelay_configure(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dhcrelay (1)	
2023-04-10T21:00:07	Error	opnsense	/usr/local/etc/rc.bootup: The command '/bin/kill -'TERM' '15577'' returned exit code '1', the output was 'kill: 15577: No such process'	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dhcp (execute task : dhcpd_dhcp_configure(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure dhcp (1)	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: ROUTING: skipping IPv6 default route	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: ROUTING: IPv6 default gateway set to wan	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: ROUTING: setting inet default route to 192.168.0.1	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: ROUTING: setting IPv4 default route to 192.168.0.1	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: ROUTING: IPv4 default gateway set to wan	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: ROUTING: entering configure using defaults	
2023-04-10T21:00:07	Error	dhcp6c	transmit failed: Can't assign requested address	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure early (execute task : webgui_configure_do(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure early (execute task : unbound_cache_flush(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure early (execute task : openssh_configure_do(1))	
2023-04-10T21:00:07	Notice	opnsense	/usr/local/etc/rc.bootup: plugins_configure early (1)	
2023-04-10T21:00:06	Notice	opnsense	/usr/local/etc/rc.newwanip: IP renewal deferred during boot on 're1'	
2023-04-10T21:00:06	Notice	dhcp6c	RTSOLD script - Starting dhcp6 client	
2023-04-10T21:00:06	Notice	dhclient	Creating resolv.conf	
2023-04-10T21:00:06	Notice	dhclient	New Routers (re1): 192.168.0.1	
2023-04-10T21:00:06	Notice	dhclient	New Broadcast Address (re1): 192.168.0.255	
2023-04-10T21:00:06	Notice	dhclient	New Subnet Mask (re1): 255.255.255.0	
2023-04-10T21:00:06	Notice	dhclient	New IP Address (re1): 192.168.0.164	
2023-04-10T21:00:00	Notice	syslog-ng	syslog-ng starting up; version='3.38.1'
// a couple of those below --> I removed those duplicates 
2023-04-10T19:38:06	Notice	opnsense	/usr/local/etc/rc.newwanipv6: No IP change detected for WAN[wan]
2023-04-10T18:39:49	Notice	flowd_aggregate.py	vacuum done	
2023-04-10T18:39:49	Notice	flowd_aggregate.py	vacuum interface_086400.sqlite

It looks odd with processes dying/not working left and right. While it should work “Double NAT” is far from ideal however that’s not the cause of your issues but your Realtek NIC probably doesn’t help either. Unfortunately the logs don’t capture why everything comes crashing down but I suspect it’s some kind of hardware issue.

1 Like

So, you think it is only a matter of time before it dies for good?

It’s hard to tell because the logs don’t really say why. There seems to be some issues with IPv6 configuration which probably causes noise, on top of that it seems to run into issues mounting nullfs. I don’t use opnsense myself so I can’t really tell you what it tries to do but you need to setup some kind of remote or persistent logging which may tell why it stops working. If you’re running suricata and/or snort, crowdsec you might be running into resouce exhaustion.

1 Like

And it starts again, I can ping the firewall, but I cannot access the web portal anymore…

Given that a bunch of services dont seem to start properly I’d suspect that your configuration and/or filesystem is broken for whatever reason. Unless you have a monitor attached that shows the prompt with messages etc there’s no way to tell why it dies/died inte first place.

I mean I could attach a monitor but would this even be worth it? In the sense of, if it is dying it is dying so to speak…

You could at least probably figure out why, might just be something like storage…

1 Like