Captive Portal Using PHP and iptables Firewall on Linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I am trying to make a captive portal following this tutorial . I am stuck in this command
sudo iptables -t mangle -I internet 1 -m mac --mac-source USER-MAC-ADDRESS-HERE -j RETURN



Here whose MAC address should be entered. Do we have to enter mac address of all the users who would connect manually (which sounds stupid and i don't think that's possible) or should we enter mac of the server?



Any help would be highly appreciated.







share|improve this question




















  • It is a per user method, so yes one such line per user and their MAC.
    – Doug Smythies
    May 4 at 13:16










  • that means i should know which user I want to allow to use internet? Isn't there any other way which captures the mac automatically when they connect to the network and authenticate users based on their records?
    – AB pacino
    May 5 at 4:29














up vote
0
down vote

favorite












I am trying to make a captive portal following this tutorial . I am stuck in this command
sudo iptables -t mangle -I internet 1 -m mac --mac-source USER-MAC-ADDRESS-HERE -j RETURN



Here whose MAC address should be entered. Do we have to enter mac address of all the users who would connect manually (which sounds stupid and i don't think that's possible) or should we enter mac of the server?



Any help would be highly appreciated.







share|improve this question




















  • It is a per user method, so yes one such line per user and their MAC.
    – Doug Smythies
    May 4 at 13:16










  • that means i should know which user I want to allow to use internet? Isn't there any other way which captures the mac automatically when they connect to the network and authenticate users based on their records?
    – AB pacino
    May 5 at 4:29












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to make a captive portal following this tutorial . I am stuck in this command
sudo iptables -t mangle -I internet 1 -m mac --mac-source USER-MAC-ADDRESS-HERE -j RETURN



Here whose MAC address should be entered. Do we have to enter mac address of all the users who would connect manually (which sounds stupid and i don't think that's possible) or should we enter mac of the server?



Any help would be highly appreciated.







share|improve this question












I am trying to make a captive portal following this tutorial . I am stuck in this command
sudo iptables -t mangle -I internet 1 -m mac --mac-source USER-MAC-ADDRESS-HERE -j RETURN



Here whose MAC address should be entered. Do we have to enter mac address of all the users who would connect manually (which sounds stupid and i don't think that's possible) or should we enter mac of the server?



Any help would be highly appreciated.









share|improve this question











share|improve this question




share|improve this question










asked May 4 at 13:06









AB pacino

11




11











  • It is a per user method, so yes one such line per user and their MAC.
    – Doug Smythies
    May 4 at 13:16










  • that means i should know which user I want to allow to use internet? Isn't there any other way which captures the mac automatically when they connect to the network and authenticate users based on their records?
    – AB pacino
    May 5 at 4:29
















  • It is a per user method, so yes one such line per user and their MAC.
    – Doug Smythies
    May 4 at 13:16










  • that means i should know which user I want to allow to use internet? Isn't there any other way which captures the mac automatically when they connect to the network and authenticate users based on their records?
    – AB pacino
    May 5 at 4:29















It is a per user method, so yes one such line per user and their MAC.
– Doug Smythies
May 4 at 13:16




It is a per user method, so yes one such line per user and their MAC.
– Doug Smythies
May 4 at 13:16












that means i should know which user I want to allow to use internet? Isn't there any other way which captures the mac automatically when they connect to the network and authenticate users based on their records?
– AB pacino
May 5 at 4:29




that means i should know which user I want to allow to use internet? Isn't there any other way which captures the mac automatically when they connect to the network and authenticate users based on their records?
– AB pacino
May 5 at 4:29










1 Answer
1






active

oldest

votes

















up vote
0
down vote













That paticutal command is to remove a user already "allowed". This way if you want to remove the so they have to authenticate again you would run that command.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031970%2fcaptive-portal-using-php-and-iptables-firewall-on-linux%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    That paticutal command is to remove a user already "allowed". This way if you want to remove the so they have to authenticate again you would run that command.






    share|improve this answer
























      up vote
      0
      down vote













      That paticutal command is to remove a user already "allowed". This way if you want to remove the so they have to authenticate again you would run that command.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        That paticutal command is to remove a user already "allowed". This way if you want to remove the so they have to authenticate again you would run that command.






        share|improve this answer












        That paticutal command is to remove a user already "allowed". This way if you want to remove the so they have to authenticate again you would run that command.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 9 at 19:18









        Thomas Lee

        1




        1






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031970%2fcaptive-portal-using-php-and-iptables-firewall-on-linux%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491