wireless networking - How can I have people log into my network and be directed to my website?

07
2014-07
  • Good Vibe DJs

    This question already has an answer here:

  • Answers
  • jmbouffard

    This method to access a wifi network is called a captive portal. See http://en.wikipedia.org/wiki/Captive_portal for a list of software to implement this.

  • Marko Krstic

    You can take a look at WiFIDog solution, it's open source and can be configured in details. It has three main functions:

    Location-aware delivery of internal or external content

    Authentication and authorization

    Centralizaed network monitoring


  • Related Question

    linux - Using command line to connect to a wireless network with an http login
  • Shane

    I'm trying to connect to a wifi network where it hijacks all requests and redirects you to a page where you have to agree to a terms of use before it lets you connect to the actual outside world. This is a pretty common practice, and usually doesn't pose much of a problem.

    However, I've got a computer running Ubuntu 9.10 server with no windowing system. How can I use the command line to agree to the terms of use? I don't have internet access on the computer to download packages via apt-get or anything like that. Sure, I can think of any number of workarounds, but I suspect there's an easy way to use wget or curl or something.

    Basically, I need a command line solution for sending an HTTP POST request essentially clicking on a button. For future reference, it'd be helpful to know how to send a POST request with, say, a username and password if I ever find myself in that situation in another hotel or airport.


  • Related Answers
  • ta.speot.is

    Install Lynx in advance, and then use Lynx from the command line. Lynx is a text based browser.

    Alternatively, you can try using wget or curl to get www.google.com and then analyse the HTTP file returned.

  • dolmen

    You will have to look once at the source of the login form to find out the names of the user and password fields. As the authentication redirect all pages, use any URL to get that source:

    curl http://www.google.com > login.html
    

    For example, you'll find:

    <form method="POST" action="http://my-public-provider.com/agree.php">
        <input type="checkbox" name="agree" value="yes">I agree
        <input type="submit" name="push" value="Send">
    </form>
    

    Another way is to use (on an other computer) a proxy such as Fiddler2 to see what is sent "over the wire" by the browser.

    Then you can build your curl command to post your form information:

    curl -d "agree=yes&push=Send" http://my-public-provider.com/agree.php
    

    If you do not have curl, it is possible to write a simple HTTP client with a language you may have on the platform (Perl, Lua, Java...).