Allow only one website after authentication page…..

  • Hello im new to pfsense actually is my first install.
    My setup is for captive portal and everything works ok…i use no authentication so after pressing continue to the auth page i get redirected to the url i want....but my problem is that i only want to view the redirected page and not any other page.Is there a way to block all ips expect the ip from the website i use?
    I tryed some rules to the firewall but doesnt seem to work...any help plz


  • If I understand you correctly, the "Pre-authentication redirect URL" in the Services/Captive Portal section is what you should look at.
    Your Login page needs to include the following code:

    $request_uri = urldecode(str_replace("/index.php?redirurl=", "",  $_SERVER["REQUEST_URI"]));
    $portal_redirurl = urldecode("$PORTAL_REDIRURL$");
    if(!stristr(urldecode("$PORTAL_REDIRURL$"), $request_uri)) {
    	Header("Location: $PORTAL_REDIRURL$");

    If this is not included, it will not work ;-)


  • Thanks for the reply

Log in to reply