Shell/CLI Equivalent of Release/Renew from Interface Status Page?



  • A few months ago I've posted about a problem I was experiencing since going to PFSense 2.4 (https://forum.netgate.com/topic/125066/wan-dhcp-problems-since-2-4) which I've never been able to solve through testing or debugging. With that in mind, I am finally going to just put a cron job on the system to do my own testing and restart the interface.

    Is there a way to call from the shell/CLI the equivalent of clicking "Release" and "Renew" next to the DHCP status on the WAN interface on the status_interfaces.php page? I've crafted something that will end up restarting stuff enough to retrieve the IPv4 address by calling /etc/rc.newwanip but that never seems to reset/restart the acquisition of the IPv6 address. /etc/rc.newwanipv6 only complains that there is no IPv6 WAN IP address and exits. If I do a Release and then a Renew on status_interfaces.php, everything restarts as I would expect. I'm looking for a way to call that same action(s) from a script.

    Thanks!



  • @ink

    You may find something here:
    link text


Log in to reply