OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: guyp2k on May 17, 2020, 10:02:29 pm

Title: Losing Public WAN IP
Post by: guyp2k on May 17, 2020, 10:02:29 pm
For some odd reason my WAN interface, which is set for DHCP (IPv4) and IPv6 set to none will lose it's public IP and I have to restart the interface in order to obtain an public IP and of course when that occurs I lose internet connectivity.

Also, I have noticed that the WAN interface will assign itself an IP of 192.168.100.1, which is getting from my cable modem (Xfinity/comcast).

I have looked in the logs and all I see are the DHCP logs for the WAN interface. I recently moved from untangle to opnsense and never had this issue before.

TIA
Title: Re: Losing Public WAN IP
Post by: marjohn56 on May 17, 2020, 11:17:29 pm
I have seen this happen when the ISP modem loses it's connection to the ISP's dhcp server, it hands out a local address instead of the WAN address. What you can do to prevent this is enter the subnet or address of the router in the 'Reject Leases From' box,  if you know the address of the modem is 192,168.100.1 for example, enter that or whatever the IP of the modem is.
Of course, this will not help with the upstream connection....
Title: Re: Losing Public WAN IP
Post by: guyp2k on May 17, 2020, 11:46:10 pm
Thanks for the reply, trying to determine the IP of the cable modem based on the logs below:

2020-05-17T12:44:38   dhclient: New IP Address (em0): 192.168.100.11
2020-05-17T12:44:38   dhclient: Removing states from old IP 'x.x.x.x' (new IP '192.168.100.11')
2020-05-17T12:44:38   dhclient: Comparing IPs: Old: x.x.x.x New: 192.168.100.11
2020-05-17T12:44:38   dhclient: Starting delete_old_states()
2020-05-17T12:44:37   dhclient[855]: DHCPACK from 192.168.100.1
2020-05-17T12:44:37   dhclient[855]: DHCPREQUEST on em0 to 255.255.255.255 port 67
2020-05-17T12:44:35   dhclient[855]: DHCPOFFER from 192.168.100.1

I assume the cable modem is 192.168.100.1?

Thanks
Title: Re: Losing Public WAN IP
Post by: marjohn56 on May 18, 2020, 08:02:06 am
Yes. looks like it.. then you need to find out why your public IP is not getting through.