Restart pfsense remotely? from anther machine
-
Its run from the LAN side, not the WAN side.
-
@automate Alright so if you're in range of the pfSense then you can setup an AP on the LAN side. Or just physically connected a cable via switch or direct LAN port.
-
Really you should not be doing that. It shouldn't fail to get an IP via DHCP but even if it does you should not need to reboot to get one. Re-running the dhcp client or down/up-ing the interface should brinh it back.
Some tests you can do there are to just unplug and replig the WAN cable, does that allow it to pull an IP?
Or reboot the modem, does that correct it.
What error logs do you see? What does the WAN interface look like in
ifconfig
when it fails.Steve
-
I would also investigate the root cause of the problem (DHCP) instead of the reboot workaround.
Previously i also had a problem with DHCP as i would randomly not receive an IP from my ISP (via cable modem).
I phoned my ISP and he disabled CG-NAT ( carrier grade NAT ). Not sure how & why, but DHCP worked fine after that.... -
Im happy to down the WAN/restart dhcp but it needs to be via command line , the intention is to link the command into a home automation system so the user (non technical) can press a button in the UI to restart the box, or dhcp
-
@automate said in Restart pfsense remotely? from anther machine:
command into a home automation system
Which HA system do you use?
You're ACE/CAIP/CSP/EQIP? -
OpenHab for this project
-
Any ideas guys??
-
Maybe check this script. I'm not sure if this will work for you, but it might give you some ideas for solution.
https://forum.netgate.com/topic/127403/auto-renew-dhcp-after-outage/23 -
@tomashk fantastic! i think this will do it.
Ive installed it so ill see how that goes, appreciated.
-
You could use this: https://www.ebay.com/itm/MSNSwitch-Internet-Enabled-IP-Remote-Power-Switch-with-Reboot/392301437447?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649