Navigation

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

    Depending of the user, redirect to this or that URL. possible ?

    Captive Portal
    2
    2
    1797
    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.
    • R
      rrbranco last edited by

      Is it possible to redirect the user (and/or freeradius group) "userX" to URL http://blahX.com and user (and/or freeradius group) "userY" to URL http://blahY.com ?

      Automagically ?  Using PHP ?  "Forget about it !" ?

      Regards from Rio de Janeiro, Brazil.

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

        This can be done depending on you php skills.

        if you look at /usr/local/captiveportal/index.php and add some extra code after line 167

        portal_allow($clientip, $clientmac,$_POST['auth_user']);
        

        along the lines of

        if ($_POST['auth_user'] == userX){
             header("Location: http://blahX.com");
        }else{
             header("Location: http://blahY.com");
        }
        

        I think this will work with radius or local users but not pass through MACs or IPs

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Products

        • Platform Overview
        • TNSR
        • pfSense Plus
        • Appliances

        Services

        • Training
        • Professional Services

        Support

        • Subscription Plans
        • Contact Support
        • Product Lifecycle
        • Documentation

        News

        • Media Coverage
        • Press
        • Events

        Resources

        • Blog
        • FAQ
        • Find a Partner
        • Resource Library
        • Security Information

        Company

        • About Us
        • Careers
        • Partners
        • Contact Us
        • Legal
        Our Mission

        We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

        Subscribe to our Newsletter

        Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

        © 2021 Rubicon Communications, LLC | Privacy Policy