OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: cnu80 on March 08, 2017, 09:43:19 pm

Title: dynamic public ip / default gateway offline
Post by: cnu80 on March 08, 2017, 09:43:19 pm

my WAN-Interface is configured to dhcp to get a public IP address from my provider. I use a LTE-moden in bridge mode. I think my provider change the address every 24hours and after the public IP has changed my internet connection is broken. Opnsense  switched the default gateway to offline because ping to failed.

To get my internet connection online again I found two options:
* Reboot the complete system
* Start the script /usr/local/etc/rc.reload_interfaces

Is it possible to renew the IP address when the default GW is offline? Is there a existing function?

If not I will try to implement a script via cron.

Code: [Select]
/usr/bin/timeout 10 /sbin/ping -c4 google.com > /dev/null

if [ $? != 0 ]