How to force the devices connected to the wireless router to open a web site hosted in a local webserver

44,698

Solution 1

You could do this if you had wifi gear that supported redirecting all requests to an auth page and then just make the auth page your menu instead of the actual auth page. The problem with this is that many phones will only use the wifi connection when both wifi and 3g/4g is available.

I know that I would avoid a place that hijacked my connection like that and I was forced to change settings on my phone to browse the web.

Solution 2

You can hack things together with DHCPd, IPTables/IPFW/pf and some creative CGI or PHP scripts, but the traditional thing to do is to get a pre-built solution like the one from BlueSocket. Less work / maintenance long-term.

Share:
44,698
Ernesto
Author by

Ernesto

Updated on September 18, 2022

Comments

  • Ernesto
    Ernesto almost 2 years

    Please I need some help on how to configure this.

    I have little bakery and would like to create a local webserver to host a digital menu. Customers would access it via wireless router from any device with wi-fi connection, such as smartphones, tablets, notebooks, etc.

    This wireless router would not be connected to any ISP, it would be connected only to the local network.

    I would like customers that are connected to my wireless router and open internet browser, are automatically redirected to the local webserver URL with the digital menu, just like when you connect to the public hot-spot and forced to subscribe to any service.

    So the elements in the network would be: client devices with wi-fi, wireless router and a PC with webserver.

    • Admin
      Admin about 13 years
      Thanks all for the answers but I'm really looking for a simple solution using a regular wireless router and a Windows PC with a Apache webserver configured. I wouldn't like to install any further sofware or change the PC Operating System. Is this something possible?
  • Ernesto
    Ernesto about 13 years
    Is it possible to do it on a regular wireless router (example: D-link DI-524)? Or only on Access Points?
  • Gojira
    Gojira over 10 years
    But isn't this how virtually all businesses do it? Every public company from Taco Bell to Whole Foods redirects you and makes you click on their "I agree" button as the first page you see when you establish a WiFi connection on their public network. Or am I misunderstanding?
  • MDMarra
    MDMarra over 10 years
    @GojiraDeMonstah a captive portal that requires users to agree to Terms of Service is different than capturing all web requests and redirecting them to a store's menu.
  • Gojira
    Gojira over 10 years
    Agreed. I was thinking of captive portal.