OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: AG_2023 on March 23, 2024, 02:57:57 AM

Title: WAN_DHCP sometimes does not get IP
Post by: AG_2023 on March 23, 2024, 02:57:57 AM
Hi,

This issue has been happening ever since I started using Opnsense about a year ago. Sometimes, when I restart the Opnsense, it fails to get IP address from Verizon FiOS modem. It does not happen every time, but say one out of five. When that happens, I just restart Opnsense again and it gets the IP address. Till WAN_DHCP gets an IP address, all devices are offline so it is a bit of incovenience.

I was wondering if it is possible to write a script which can check for WAN_DHCP IP address. If it does not get an IP address after restart, then automatically restart Opnsense once again.

Thanks...
Title: Re: WAN_DHCP sometimes does not get IP
Post by: jonm on March 23, 2024, 01:40:46 PM
There's a script that I think was posted here somewhere which will do what you want, called something like ping_checker maybe? I will see if I can find it.
Title: Re: WAN_DHCP sometimes does not get IP
Post by: jonm on March 23, 2024, 01:41:54 PM
Found it - have a look here

https://forum.opnsense.org/index.php?topic=13544.msg67170#msg67170
Title: Re: WAN_DHCP sometimes does not get IP
Post by: AG_2023 on March 23, 2024, 04:53:55 PM
Thank you. This is exactly what I was looking for.