Default ipv4 route drop when WAN dhcp renew

Started by skool, February 06, 2023, 02:02:42 PM

Previous topic - Next topic
Thanks a lot, this will be in 23.1.2 tomorrow.


Cheers,
Franco

@franco did these patches make it into today's patch release?
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)



March 09, 2023, 08:57:00 AM #64 Last Edit: March 09, 2023, 09:04:57 AM by Bytechanger
23.1.2 works better,
but 1 or 2 times a day there is a ipv4 cut (ipv6 runs).

ipv4 lease on Deutsche Glasfaser is 1 hour.

(I´ve a linux skript wich tests every 5 seconds ipv4 and ipv6 connection).


2023-03-09T03:45:30 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,opt4))
2023-03-09T03:45:30 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,opt4))
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,opt4))
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dyndns_configure_do(,opt4))
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,opt4)
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface wan.
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,opt4))
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,opt4))
2023-03-09T03:45:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,opt4)
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_GLASFASER_DHCP))
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_GLASFASER_DHCP)
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_GLASFASER_DHCP6))
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_GLASFASER_DHCP6)
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping current default gateway 'fe80::ff:fe02:202%vtnet0'
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: setting IPv6 default route to fe80::ff:fe02:202
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: IPv6 default gateway set to opt4
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 100.111.0.1
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: IPv4 default gateway set to opt4
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'opt4'
2023-03-09T03:45:26 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: 100.111.133.83, old: 100.111.133.83, interface: wan[opt4], device: vtnet0, force: yes)
2023-03-09T03:45:26 Notice dhclient Creating resolv.conf
2023-03-09T03:45:26 Notice dhclient New Routers (vtnet0): 100.111.0.1
2023-03-09T03:45:26 Notice dhclient New Broadcast Address (vtnet0): 100.111.255.255
2023-03-09T03:45:26 Notice dhclient New Subnet Mask (vtnet0): 255.255.0.0
2023-03-09T03:45:26 Notice dhclient New IP Address (vtnet0): 100.111.133.83
[...]
2023-03-08T23:54:03 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,opt4))
2023-03-08T23:54:03 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,opt4))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,opt4))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dyndns_configure_do(,opt4))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,opt4)
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface wan.
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,opt4))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,opt4))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,opt4)
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_GLASFASER_DHCP))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_GLASFASER_DHCP)
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_GLASFASER_DHCP6))
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_GLASFASER_DHCP6)
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping current default gateway 'fe80::ff:fe02:202%vtnet0'
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: setting IPv6 default route to fe80::ff:fe02:202
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: IPv6 default gateway set to opt4
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 100.111.0.1
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: IPv4 default gateway set to opt4
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'opt4'
2023-03-08T23:54:02 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: 100.111.133.83, old: 100.111.133.83, interface: wan[opt4], device: vtnet0, force: yes)
2023-03-08T23:54:01 Notice dhclient Creating resolv.conf
2023-03-08T23:54:01 Notice dhclient New Routers (vtnet0): 100.111.0.1
2023-03-08T23:54:01 Notice dhclient New Broadcast Address (vtnet0): 100.111.255.255
2023-03-08T23:54:01 Notice dhclient New Subnet Mask (vtnet0): 255.255.0.0
2023-03-08T23:54:01 Notice dhclient New IP Address (vtnet0): 100.111.133.83
[...]
2023-03-08T13:50:51 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,opt4))
2023-03-08T13:50:51 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,opt4))
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,opt4))
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dyndns_configure_do(,opt4))
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,opt4)
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface wan.
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,opt4))
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,opt4))
2023-03-08T13:50:50 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,opt4)
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_GLASFASER_DHCP))
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_GLASFASER_DHCP)
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_GLASFASER_DHCP6))
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_GLASFASER_DHCP6)
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping current default gateway 'fe80::ff:fe02:202%vtnet0'
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: setting IPv6 default route to fe80::ff:fe02:202
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: IPv6 default gateway set to opt4
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 100.111.0.1
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: IPv4 default gateway set to opt4
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'opt4'
2023-03-08T13:50:49 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: 100.111.133.83, old: 100.111.133.83, interface: wan[opt4], device: vtnet0, force: yes)
2023-03-08T13:50:49 Notice dhclient Creating resolv.conf
2023-03-08T13:50:49 Notice dhclient New Routers (vtnet0): 100.111.0.1
2023-03-08T13:50:49 Notice dhclient New Broadcast Address (vtnet0): 100.111.255.255
2023-03-08T13:50:49 Notice dhclient New Subnet Mask (vtnet0): 255.255.0.0
2023-03-08T13:50:49 Notice dhclient New IP Address (vtnet0): 100.111.133.83



Greets

Yep, this is an ISP-related disruption with overly-aggressive lease time:

2023-03-09T03:45:26   Notice   opnsense   /usr/local/etc/rc.newwanip: IP renewal starting (new: 100.111.133.83, old: 100.111.133.83, interface: wan[opt4], device: vtnet0, force: yes)

There is room for improvement from our end but very likely not in the next 3 months.


Cheers,
Franco

Ok, thanks for reply.
How can I solve it?
Should I connect a FritzBox to ISP and then OPNSense to FritzBox?
FritzBox to ISP should work?!

Greets


Oh, thanks..

OPNSense as exposed Host?
No problems/ latency with double NAT in ipv4??

Greets

I don't use exposed host, but it depends on requirements. No latency but not a lot of traffic as per requirement either.


Cheers.
Franco

OK,now I put my FritzBox to ISP-Modem, and on FritzBox OPNSense.
This works, but 2 questions:

1. in my log is every few seconds:

2023-03-11T12:17:22 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:17:20 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:14:10 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:14:07 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:12:44 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:12:42 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:06:39 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:06:37 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:04:12 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:04:10 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:04:08 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T12:04:05 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:55:10 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:55:07 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:54:31 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:54:29 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:47:49 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:47:47 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:46:00 Notice send_telemetry.py telemetry data collected 4 records in 0.03 seconds @2023-03-11 10:45:26.297534
2023-03-11T11:45:31 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:45:28 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:45:00 Notice send_telemetry.py telemetry data collected 1 records in 0.03 seconds @2023-03-11 10:44:45.594789
2023-03-11T11:42:39 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:42:37 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:36:40 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]
2023-03-11T11:36:37 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected for FritzBoxWAN[opt10]


2. I request a /56 Prefix-length for FritzBox and on OPNSense I request /60 prefix.
All works fine, BUT when I change something on FritzBox, so its restarting internet, ipv6-connection on OPNSense got lost (ipv6 seems to be there, but no traffic is possible).
When I restart OPNSense, it works fine...

Greets

Byte

I think it could be a prefix change issue.
When GritzBox get a new prefix und send it to Opnsense, it doesn't handle it good...

How can I fix it??

Greets