Gateway Status IPv4 is Offline but its up

Started by Samplex, August 04, 2023, 11:09:57 PM

Previous topic - Next topic
My ISP has Dual Full Stack ipv4 en ipv6. I have gateway monitoring enabled for only ipv4 (System: Gateways: Single)

When i reboot the opnsense firewall the ipv4 monitor says offline but the but the WAN adapter get a valid public ipv4 address from my ISP and working so it really Online.

When i edit the System: Gateway > Single > Interface "WAN_DHCP" interface and just save it without adjusting anything the it goes from Offline to Online again.

Is this a bug?

Do you have a Monitor IP set ?

If yes it could be dropping your pings, try changing it to something else like 8.8.8.8

August 05, 2023, 11:26:16 AM #2 Last Edit: August 05, 2023, 02:27:59 PM by Samplex
It pings the gateway of my ISP subnet im in.

But traced back my steps and the problem occured when i disabled flow control on my nics using the following tunables lines:

dev.igc.0.fc = 0
dev.igc.1.fc = 0

removed the and the monitor went up after rebooting. Is this monitor using flow control feature?


I was wrong, after a wihile it still goes down. :(

Does the gateway reply to ICMP?

Try pinging it from your PC.
2x 23.7 VMs & CARP, 4x 2.1GHz, 8GB
Cisco L3 switch, ESXi, VDS, vmxnet3
DoT, Chrony, HAProxy + NAXSI, Suricata
VPN: IPSec, OpenVPN, Wireguard
MultiWAN: Fiber 500/500Mbit dual stack + 4G failover

--
Available for private support.
Did my answer help you? Feel free to click [applaud] to the left

Quote from: Samplex on August 05, 2023, 11:26:16 AM
It pings the gateway of my ISP subnet im in.

But traced back my steps and the problem occured when i disabled flow control on my nics using the following tunables lines:

dev.igc.0.fc = 0
dev.igc.1.fc = 0

removed the and the monitor went up after rebooting. Is this monitor using flow control feature?


I was wrong, after a wihile it still goes down. :(

As I said, try pinging another IP, your ISP might stop responding after a while


August 09, 2023, 05:16:47 AM #6 Last Edit: August 09, 2023, 05:19:39 AM by Samplex
With the latest version of OPNsense i get the same issue. After rebooting the IPv6 gateway icon is green online but the IPv4 icon is red with offline. But ping from the OPNense shell to the IPv4 gateway gives a reply with now problem.

Also the Interfaces overview gives a both a valid IPv4 and IPv6 wan address.


2023-08-09T04:54:04   Warning   dpinger   WAN_DHCP 92.1xx.xxx.1: Clear latency 12777us stddev 1629us loss 0%   
2023-08-09T04:53:54   Warning   dpinger   send_interval 1000ms loss_interval 2000ms time_period 60000ms report_interval 0ms data_len 0 alert_interval 1000ms latency_alarm 500ms loss_alarm 20% alarm_hold 10000ms dest_addr 2a02:xxx4:0:xx61::1 bind_addr 2a02:xxx4:0:61:xxxe:xxxc:xxx8:583 identifier "WAN_DHCP6 "   
2023-08-09T04:53:54   Warning   dpinger   WAN_DHCP 92.1xx.xxx.1: Alarm latency 15128us stddev 624us loss 33%   
2023-08-09T04:53:52   Warning   dpinger   send_interval 1000ms loss_interval 2000ms time_period 60000ms report_interval 0ms data_len 0 alert_interval 1000ms latency_alarm 500ms loss_alarm 20% alarm_hold 10000ms dest_addr 92.1xx.xxx.1 bind_addr 92.1xx.xxx.162 identifier "WAN_DHCP "   
2023-08-09T04:53:51   Warning   dpinger   exiting on signal 15   
2023-08-09T04:53:50   Warning   dpinger   send_interval 1000ms loss_interval 2000ms time_period 60000ms report_interval 0ms data_len 0 alert_interval 1000ms latency_alarm 500ms loss_alarm 20% alarm_hold 10000ms dest_addr 92.1xx.xxx.1 bind_addr 92.1xx.xxx.162 identifier "WAN_DHCP "   
2023-08-09T04:50:56   Warning   dpinger   exiting on signal 15   
2023-08-09T04:50:56   Warning   dpinger   exiting on signal 15

Samplex,

I am having the same issue with OpenVPN ... https://forum.opnsense.org/index.php?topic=35124.0.

So far nothing has changed (with patches / updates).

The way to get it to work for me is to resave the gateway (making no changes) and hit apply changes.

Dpinger will then work until my OpenVPN instances restarts and I have to do it again.

My setup previously worked since early 2020, with no intervention so I am not sure what happened.

I cannot get my old OpenVPN client to work when I migrate them over either... I suspect their are issues which will be hammered out sooner or later.

We are probably edge cases because no one seems to be helping / having similar issues.... and I am not sure how to even start describing this to file a proper bug report.

Cheers,

Yeah you are correct: The way to get it to work for me is to resave the gateway (making no changes) and hit apply changes.

This makes the Online green button work again. Maybe @franco can have look at it but his rahter busy :)

When I disable my vpnclient (and only have my WAN in my WAN Group) and restart OPNSense WAN comes online, when I remove my WAN group and reboot it also comes online.
My vpn has 'Disable Gateway Monitoring' enabled.
Looks like (but I'm not an expert ;) ) that the option 'Disable Gateway Monitoring' might not be honored.

System Gateways Gateway.edit no-change .save .apply ... worked 4 me ✅
tnx!

It just sounds like it's restarting the dpinger monitor on this interface because monitoring was requested.

I haven't seen a single system log here so it's difficult to speculate about the cause.

However, what I found yesterday was that sometimes the monitoring works but the reading is dead because the socket was deleted by another process...

https://github.com/opnsense/core/commit/93f8b70cb

Which means it's online but the status can't be examined so it defaults to "down".


Cheers,
Franco

this is also an issue with the latest business version
I added the dinger widget to my dashboard.   and the services was not started.  the tunnels were UP and working.   but dinger wasn't working like it used to.

I had to manually add the default gateway of the tunnels I was connected to for the d Pinger service to start working again.

not a big deal for me until I restart the tunnel and the gateway address changes..

Ok, but now we are going in circles for a report on 23.7 which is not in 23.4 due to being based on 23.1.

I get a more than usual amount of conflicting reports with various scopes and configurations across versions. I'm not sure if this is due to 23.7 being available, people coming back from their vacations or just new people trying out OPNsense.

Long story short: logs are always helpful as they will reveal individual issues.


Cheers,
Franco

Franco,

Please see attached system log:

<12>1 2023-08-26T11:00:05-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                          │
│<12>1 2023-08-26T11:00:06-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="2"] AIRVPNONE_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                          │
│<12>1 2023-08-26T11:00:07-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="3"] AIRVPNONE_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                          │
│<12>1 2023-08-26T11:00:08-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="4"] AIRVPNONE_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                          │
│<12>1 2023-08-26T11:00:09-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="5"] AIRVPNONE_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                          │
│<165>1 2023-08-26T11:00:09-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="6"] ALERT: AIRVPNONE_VPNV4 (Addr: ~ Alarm: none -> loss RTT: 44.4 ms RTTd: 3.7 ms Loss: 12.0 %)                                                                                                                           │
│<12>1 2023-08-26T11:00:15-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="7"] AIRVPNONE_VPNV4 10.address.1: Alarm latency 44697us stddev 3798us loss 22%                                                                                                                                              │
│<165>1 2023-08-26T11:00:20-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="8"] ALERT: AIRVPNONE_VPNV4 (Addr: ~ Alarm: loss -> down RTT: 44.5 ms RTTd: 3.3 ms Loss: 29.0 %)                                                                                                                           │
│<12>1 2023-08-26T11:02:01-05:00 opnsense.my_website.org dpinger 93121 - [meta sequenceId="1"] exiting on signal 15                                                                                                                                                                                                   │
│<12>1 2023-08-26T11:02:01-05:00 opnsense.smy_website.org dpinger 81263 - [meta sequenceId="2"] send_interval 1000ms  loss_interval 2000ms  time_period 60000ms  report_interval 0ms  data_len 0  alert_interval 1000ms  latency_alarm 500ms  loss_alarm 20%  alarm_hold 10000ms  dest_addr 10.address.1  bind_addr 10.6.│
│<12>1 2023-08-26T11:02:03-05:00 opnsense.my_website.org dpinger 81263 - [meta sequenceId="3"] AIRVPNONE_VPNV4 10.address.1: Alarm latency 0us stddev 0us loss 100%                                                                                                                                                     │
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 81263 - [meta sequenceId="1"] exiting on signal 15                                                                                                                                                                                                   │
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 56962 - [meta sequenceId="2"] exiting on signal 15                                                                                                                                                                                                   │
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 91647 - [meta sequenceId="3"] exiting on signal 15                                                                                                                                                                                                   │
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 95083 - [meta sequenceId="4"] exiting on signal 15                                                                                                                                                                                                   │
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 78826 - [meta sequenceId="5"] send_interval 1000ms  loss_interval 2000ms  time_period 60000ms  report_interval 0ms  data_len 0  alert_interval 1000ms  latency_alarm 500ms  loss_alarm 20%  alarm_hold 10000ms  dest_addr 8.8.8.8  bind_addr 98.address.21│
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="6"] send_interval 1000ms  loss_interval 2000ms  time_period 60000ms  report_interval 0ms  data_len 0  alert_interval 1000ms  latency_alarm 500ms  loss_alarm 20%  alarm_hold 10000ms  dest_addr 10.address.1  bind_addr 10.23│
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="7"] send_interval 1000ms  loss_interval 2000ms  time_period 60000ms  report_interval 0ms  data_len 0  alert_interval 1000ms  latency_alarm 500ms  loss_alarm 20%  alarm_hold 10000ms  dest_addr 10.address.1  bind_addr 10.6.│
│<12>1 2023-08-26T11:04:18-05:00 opnsense.my_website.org dpinger 82277 - [meta sequenceId="8"] send_interval 1000ms  loss_interval 2000ms  time_period 60000ms  report_interval 0ms  data_len 0  alert_interval 1000ms  latency_alarm 500ms  loss_alarm 20%  alarm_hold 10000ms  dest_addr 2001:address::8888  bind_│
│<165>1 2023-08-26T11:04:20-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="9"] ALERT: AIRVPNONE_VPNV4 (Addr: 10.address.1 Alarm: down -> none RTT: 45.1 ms RTTd: 1.3 ms Loss: 0.0 %)                                                                                                                   │
│<12>1 2023-08-26T11:08:57-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:11:20-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:13:20-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:13:30-05:00 opnsense.smy_website.org dpinger 81298 - [meta sequenceId="2"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:14:43-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:14:51-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="2"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:16:38-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:17:12-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="2"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:17:26-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="3"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T11:19:38-05:00 opnsense.my_website.org dpinger 81298 - [meta sequenceId="1"] AIRVPNONE_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T12:05:38-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="1"] AIRVPNTWO_VPNV4 10.address.1: sendto error: 55                                                                                                                                                                           │
│<12>1 2023-08-26T12:05:56-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="2"] AIRVPNTWO_VPNV4 10. v.1: sendto error: 55                                                                                                                                                                           │
│<165>1 2023-08-26T12:06:03-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="3"] ALERT: AIRVPNTWO_VPNV4 (Addr: 10.address.1 Alarm: none -> loss RTT: 33.4 ms RTTd: 6.2 ms Loss: 11.0 %)                                                                                                                  │
│<165>1 2023-08-26T12:06:36-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="4"] ALERT: AIRVPNTWO_VPNV4 (Addr: 10.address.1 Alarm: loss -> none RTT: 34.4 ms RTTd: 11.8 ms Loss: 10.0 %)                                                                                                                 │
│<12>1 2023-08-26T13:00:05-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="1"] AIRVPNTWO_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                           │
│<12>1 2023-08-26T13:00:06-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="2"] AIRVPNTWO_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                           │
│<12>1 2023-08-26T13:00:07-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="3"] AIRVPNTWO_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                           │
│<12>1 2023-08-26T13:00:08-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="4"] AIRVPNTWO_VPNV4 10.address.1: sendto error: 65                                                                                                                                                                           │
│<165>1 2023-08-26T13:00:09-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="5"] ALERT: AIRVPNTWO_VPNV4 (Addr: ~ Alarm: none -> loss RTT: 27.6 ms RTTd: 1.9 ms Loss: 12.0 %)                                                                                                                           │
│<12>1 2023-08-26T13:00:15-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="6"] AIRVPNTWO_VPNV4 10.address.1: Alarm latency 27654us stddev 1986us loss 22%                                                                                                                                               │
│<165>1 2023-08-26T13:00:20-05:00 opnsense.my_website.org dpinger 53038 - [meta sequenceId="7"] ALERT: AIRVPNTWO_VPNV4 (Addr: ~ Alarm: loss -> down RTT: 27.8 ms RTTd: 2.1 ms Loss: 31.0 %)                                                                                                                           │
│<12>1 2023-08-26T13:02:01-05:00 opnsense.my_website.org dpinger 80060 - [meta sequenceId="1"] exiting on signal 15                                                                                                                                                                                                   │
│<12>1 2023-08-26T13:02:01-05:00 opnsense.my_website.org dpinger 74707 - [meta sequenceId="2"] send_interval 1000ms  loss_interval 2000ms  time_period 60000ms  report_interval 0ms  data_len 0  alert_interval 1000ms  latency_alarm 500ms  loss_alarm 20%  alarm_hold 10000ms  dest_addr 10.address.1  bind_addr 10.1│
│<12>1 2023-08-26T13:02:03-05:00 opnsense.my_website.org dpinger 74707 - [meta sequenceId="3"] AIRVPNTWO_VPNV4 10.address.1: Alarm latency 0us stddev 0us loss 100%                                                                                                                                                    │
│<165>1 2023-08-26T13:10:52-05:00 opnsense.my_website.org dpinger 52422 - [meta sequenceId="1"] MONITOR: WANXFINITY_DHCP (Addr: 8.8.8.8 Alarm: down -> none RTT: 14.1 ms RTTd: 2.0 ms Loss: 0.0 %)                                                                                                                    │
│<165>1 2023-08-26T13:10:52-05:00 opnsense.my_website.org dpinger 52422 - [meta sequenceId="2"] MONITOR: WANxfinity_GWv6 (Addr: 2001:address::8888 Alarm: down -> none RTT: 13.6 ms RTTd: 1.8 ms Loss: 0.0 %)                                                                                                       │
│<165>1 2023-08-26T13:10:52-05:00 opnsense.my_website.org dpinger 52422 - [meta sequenceId="3"] ALERT: AIRVPNONE_VPNV4 (Addr: 10.address.1 Alarm: down -> none RTT: 44.3 ms RTTd: 2.8 ms Loss: 0.0 %)                                                                                                                   │
│<165>1 2023-08-26T13:11:41-05:00 opnsense.my_website.org dpinger 52422 - [meta sequenceId="4"] ALERT: AIRVPNTWO_VPNV4 (Addr: 10.address.1 Alarm: down -> loss RTT: 16.8 ms RTTd: 2.0 ms Loss: 20.0 %)                                                                                                                 │
│<12>1 2023-08-26T13:11:50-05:00 opnsense.my_website.org dpinger 74707 - [meta sequenceId="5"] AIRVPNTWO_VPNV4 10.address.1: Clear latency 16753us stddev 2006us loss 6%                                                                                                                                               │
│<165>1 2023-08-26T13:11:52-05:00 opnsense.my_website.org dpinger 52422 - [meta sequenceId="6"] ALERT: AIRVPNTWO_VPNV4 (Addr: 10.address.1 Alarm: loss -> none RTT: 16.7 ms RTTd: 2.0 ms Loss: 3.0 %)                                                                                                                  │
│<165>1 2023-08-26T13:17:50-05:00 opnsense.my_website.org dpinger 54441 - [meta sequenceId="1"] MONITOR: WANXFINITY_DHCP (Addr: 8.8.8.8 Alarm: down -> none RTT: 13.1 ms RTTd: 1.0 ms Loss: 0.0 %)                                                                                                                    │
│<165>1 2023-08-26T13:17:50-05:00 opnsense.my_website.org dpinger 54441 - [meta sequenceId="2"] MONITOR: WANxfinity_GWv6 (Addr: 2001:address::8888 Alarm: down -> none RTT: 13.2 ms RTTd: 1.1 ms Loss: 0.0 %)                                                                                                       │
│<165>1 2023-08-26T13:17:50-05:00 opnsense.my_website.org dpinger 54441 - [meta sequenceId="3"] ALERT: AIRVPNONE_VPNV4 (Addr: 10.address.1 Alarm: down -> none RTT: 42.9 ms RTTd: 1.4 ms Loss: 0.0 %)                                                                                                                   │
│<165>1 2023-08-26T13:17:50-05:00 opnsense.my_website.org dpinger 54441 - [meta sequenceId="4"] ALERT: AIRVPNTWO_VPNV4 (Addr: 10.address.1 Alarm: down -> none RTT: 17.8 ms RTTd: 3.3 ms Loss: 0.0 %)


I have my VPN set to stop restart (I have a cron job that uses the pluginctl -s command to stop then start the vpn after 2minutes) every 8 hours, these logs show the stop/start at 11am and 1pm respectively.

I run 2 openvpn clients in failover, and I am not using the new "instance" yet because I have not been able to get the gateway to work (I believe something that was done automatically before is no longer automatic).

I believe the log also shows where I manually went to single>gateway>the VPN gateway and hit apply to restart the monitor.

This is on 23.7.2.  Please let me know if there is another log that you would like to see.

Thanks,