OpenWrt Forum Archive

Topic: OpenWRT Public Hotspots

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have a network setup at a remote location which does not have any internet access.  The location does however have several nearby public hotspots.

I have a TP-Link repeater that I have flashed with OpenWRT, I would like to connect this to one of the public hotspots and then connect it via ethernet straight into my switch.

Is this possible with OpenWRT?  I have read the a bridged connection is what I am looking for, am I right?

Looking forward to your input!

Routed client.  You have to route (not bridge) to a public hotspot (or any other ordinary AP) because it can serve only one user MAC address at the STA end.

There is a wiki page about this but it makes it unnecessarily complicated.  Start with a default configuration.  Create a STA (aka client) mode wifi interface that will connect to the hotspot.  Put it in the WAN network.  Check the WAN physical settings to be sure it is NOT a bridge and it only has your STA in it.  (Any WAN ethernets can be moved to LAN to have more ports)  By default, WAN should be a DHCP client, so it will get an IP automatically from the hotspot.  If this IP is 192.168.1.X, it will conflict with the LAN, so you need to set the LAN to a different IP range.

(Last edited by mk24 on 28 Jun 2017, 00:08)

Thanks for that, I amusing luCI instead of the command line and have done the following.....

  • Installed / Flashed OpenWRT

  • Logged In and changed admin password

  • Opened Network -> WiFi

  • Scanned for networks and added the public hotspot

  • Added the network to the WAN in the 'Create / Assign firewall-zone' section

  • Confirmed that the WAN physical settings are not a bridge and it only has public hotspot in it

  • Set WAN as DHCP client

The OpenWRT device is plugged directly into my switch, are there more steps i need to go through?

Is it working?  Can you use the Internet from the LAN?

No, I am expecting to see the public hotspots login page but I get nothing at all, have tried pinging and no reply.

Was looking at the pseudobridge setup using relayd from the wiki and might give it a try

Would this achieve the same result?

You should get the hotspot's login page regardless.  Relayd is not necessary here.

Do you see a wifi association and a WAN IP address on the main status page?

Here is my status page

imgur dot com /a/CjopE

It won't let me post links for some reason, maybe because this is a fresh forum account

(Last edited by redgeee3 on 28 Jun 2017, 16:37)

It appears that the router is able to set its date and time, which uses NTP.  So the router itself has access to the Internet but there is a firewall issue preventing forwarding from the LAN.

You can confirm by going to Network->Diagnostics and trying to ping BT's gateway, BT's DNS, google, etc.

(Last edited by mk24 on 28 Jun 2017, 17:02)

I am unable to pin anything when I go to Network->Diagnostics, if they router can access the NTP server then should I be able to ping BT's gateway?

You can not post links until you become a bit more trusted.  Not sure what the number is but it's probably 10-12.

I can not find your link by replacing dot with".". Do you have any key tags associated with it to find using the imgur advanced find?  Do you see the hotspot in the Network=>Wireless Associated Stations section.  If so what is the IP?

I have found that just opening a browser when attached as a STAtion to an AP (hotspot) with OpenWrt generally will NOT automatically redirect one to the Hotspots Portal page.  Try typing in the portal page's URL directly (and then save it if you will need it frequently).

I agree with mk24, you should be able to take a bone stock device and connect just adding a new STAtion.  You may want to change the default IP address of your device to something less standard than 192.168.1.1.  (192.168.111.1)  If the IP above is the same as the TP-Link you may have a problem.

relayd is only needed if your are trying to connect 2 devices wirelessly on the same LAN and want to talk back and forth.  You do not want this.  You want your device to have the working firewall.

Worth noting the exact model of router you have and in general including your relevant config files for any posts.

Just noticed that the time reported is incorrect, I guess this means that it can't access the NTP server?

mk24 wrote:

It appears that the router is able to set its date and time, which uses NTP.  So the router itself has access to the Internet but there is a firewall issue preventing forwarding from the LAN.

You can confirm by going to Network->Diagnostics and trying to ping BT's gateway, BT's DNS, google, etc.

RangerZ wrote:

I can not find your link by replacing dot with".". Do you have any key tags associated with it to find using the imgur advanced find?

If you also take out the space after com smile

This is the OP's picture:
http://imgur.com/a/CjopE
The wifi client has connected to the hotspot and obtained a DHCP address in the 10.x.x.x range.

I don't like the "join network" button or recommend its use.  That creates a new 'wwan' interface and other unnecessary stuff.  Just go to network->wireless and manually create a client and replace the Ethernet port in wan with it.  But I don't know if on a "range extender" type device OpenWrt by default has a wan firewall zone.

(Last edited by mk24 on 28 Jun 2017, 17:35)

The discussion might have continued from here.