Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Log out user (or all users) via ssh

    Captive Portal
    3
    3
    2.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jonberling
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

        Probably its better to go through portal.pfsense.org for this.

        1 Reply Last reply Reply Quote 0
        • M
          mendilli
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.