Log out user (or all users) via ssh
-
We're using pfsense with the captive portal to test our software. We currently have the captive portal set up and it is working properly. The only problem is that our test software cannot rely on pop-ups to log out. (The platform our software runs on will not allow pop-ups.)
Our test automation software already has to connect to pfsense via ssh to control dummynet/ipfw. Is there a way to log out all users from the captive portal from the command line? That would really help us out a lot.
Currently we don't require authentication on the captive portal, but we can switch to another method if needed.
Thank-you.
–------------------------------------
Update: I couldn't seem to figure out a way to log out users via the command line. What I ended up doing was setting the idle timeout on the CP to 1 minute. I then disable wifi on the test platform (which ensures that there will be no traffic from our device to the captive portal) for two minutes. This logs the user out and we can run our next test.
-
Probably its better to go through portal.pfsense.org for this.
-
restartcaptiveportal(file in phpshellsessions folder)
require_once("captiveportal.inc");
captiveportal_configure();this worked for me with extra log entries but kicked all users out
the ssh command is
pfSsh.php playback restartcaptiveportal