Repeating or bridging a wifi-spot

hi :slight_smile:
im trying to "bridge" a wifi-spot to my pc. I mean, i connect my router to a wifi-spot successfully(WPA2-EAP) but now i wanna have access and use internet through LAN cable or repeat that free wifi-spot wirelessly.
i read several tutorials like : This and i tried relayd but i dont get internet access in my pc!
(just as additional info: im trying to use Unitymedia WiFi-spot. just an info for German users!)

any idea? :confused:

im using TP-Link TL-WDR4300 (ar71xx) v1.6 OpenWrt 18.06.4
WinSCP and PuTTY (i have no linux)

Does the wifi-spot require identification / authentication? In that case, you will need something like "travelmate".

Does the router have an internet connection?

Change the router's IP address.

the wifi-spot needs username and password (EAP-MSCHAPV2).
router has internet connection. i can update package lists but no ping (but to not be able to ping is not fault of router. if i connect with my laptop directly to wifi-spot, i cant neither ping, but i have internet. this wifi-spot hast generally problem with pinging !!!!!!!!!! so i cant even ping with my smartphone and pc and not only with router.)

changing the router's ip is very strange. i change it to 192.168.15.1 and change my pc's ip to 192.168.15.2 and then i cant connect to router any more(i must do ip hardcoring...). and after several tries to connect to router, the router resets to 198.168.1.1 automatically. router's ip must stay 192.168.1.1 and no specified ip fpr my pc!

A third party hotspot assumes there will be only one device attached to it. You would route your devices into that one connection. Make the hotspot client the WAN instead of an Ethernet port (do not enable bridge on the wan). Do not use relayd, you simply want to treat the hotspot as an ISP and not otherwise interact with its network.

If the hotspot uses a 192.168.1.x IP you must change your lan to something else. This leaves the DHCP server active so once you disconnect and reconnect your PC it will pick up a proper address.

3 Likes

thx for helping. i think i need a detailed tutorial. im so confused!
i dont know ip of that hotspot. it just shows the mac of it.

a small step by step setting would help me a lot :slight_smile:

thx all

  • Browse to Wireless page on the web GUI
  • Hit Scan
  • Join the network
  • The GUI will walk you through adding the connection as WWAN

If the WWAN network matches 192.168.1.0/24 upon connection, you will renumber LAN in order to reach the Internet.

1 Like

I don't really like the "Join" button. It does extra things (create a "wwwan" network, lock the client to one BSSID) that aren't necessary for basic use.

Under network / wireless, create a new interface and configure the network SSID and encryption(*) manually and attach it to the existing WAN network. Go to WAN physical settings and make sure any default ethernet port has been removed and WAN is not a bridge.

Once you have connected to the hotspot, your WAN IP will show on the main status page.

  • To connect to a WPA-Enterprise network you will need to replace the default wpad-mini or wpad-basic package with the full wpad.
1 Like

thx @lleachii.

  1. you mean if my wwan has an ip between 192.168.1.0 - 192.168.1.255 ?
  2. then renumber to what(for example?) if like above?
  3. you mean renumber my LAN ip address of PC or LAN interface in Luci(router)?

If WWAN is 192.168.1.0/24 then renumber to 192.168.x.1 - where x does not equal 1

Both must occur anyways.

i have already replaced wpad-mini with full wpad :wink: .
im also connected to my wifi-spot successfully. i have internet only in router. No internet on my PC through LAN-cable.

no idea from anyone ? :frowning:

  • Did you use the Wireless Scanning menu to add WWAN?
  • Why do you want to "see" eth0.2 or remove the bridge?
  • Can you perform a traceroute to e.g. 8.8.8.8 from a LAN client and the OpenWrt?
  • If you disabled DHCP on LAN, you do have another DHCP server on LAN, correct?
  • I noticed your LAN is not the default color (green) - can you show us your Firewall config? Please paste from /etc/config/firewall - please don't screenshot it

If you use the existing WAN network instead of creating a new "wwan" you won't have to, and should not, change any firewall settings.

I see that the wifi network is using IPs in the 10.x range, so you can leave the LAN at 192.168.1.1 and it should work.

In general for this use case, the closer you stay to stock configuration the better chance if it working.

  • how bout testing the actual command: traceroute - (welcome to Linux)

I'm very curious...what did you do to fix it?

Next time, try the actual command to do so:
cat /etc/config/firewall (not sure how you got a copy of the file though.

  • Now that you know the command, can you also cat /etc/config/dhcp
  • What IP addresses do your clients receive when connected to the OpenWrt LAN?

And to be clear, your current config doesn't bridge, it has the the upstream AP as your WAN over WiFi.

I'm not talking about LAN, a LAN bridge is normal...

:man_facepalming:

I'll try again...

  1. Do you want to bridge the AP and LAN, or
  2. do you want to connect the OpenWrt as a client of the upstream AP?

Currently, your router is setup for #2, but you are describing that you want #1.

On Windows ipconfig /all - on Linux ifconfig

Odd...

As I understand you need to configure your OpenWrt router to connect with wifi to an hot spot and connect your pc to the router ( by wire between lan sockets pc <--> router) just to let the pc to surf internet (you don't need relayd).
Try starting from the begin!
Reset router by button or by luci web page( system/backup-flash...).
Connect you pc as usual to router using lan cable.
Reach the router at 192.168.1.1 up.
On page network/wireless click scan button.
When scan is finished on the row of your target wifi select join network button.
Fill fields as necessary, is better to fill also field of dns with google ips (8.8.8.8 and 8.8.4.4) in case your internet connection would fail for a dns resolving failure.
Save and apply.
After applied in network/wireless you should see that the router is associated with hotspot succesfully under Associated Stations section.
In network/interfaces you should notice only two, wwan and lan, just in case the two interfaces join similar class of network ( in that bad case wwan could be 192.168.1.x) you have to change ip of lan interface (say 192.168.2.1) editing it and leaving all as is except for ip.
You should be ready now, just for test in network/ diagnostics click on ping button if ok your pc is able to surf internet, if not ok in the field over ping button with 'openwrt.org' delete and insert 8.8.8.8 and ping again if ok you forgot dns values in wwan interface. If happens the same on pc ( ping domain and ping ip) dns configuration leaks in lan interface.
Let me know...

1 Like

Big THANKS :rose: to everybody who tried to help me.
i solved it, but a little bit different!
after some steps then i created/added another wireless network under radio0. now i have two wireless networks. one connected to hotspot and one as mode:master and accepoint and as lan(network) (but its still wifi and under wireless overview).

Important:
under Interface and LAN:\Physical Settings : you must check the "Bridge interfaces" and below interface choose or check 3 networks which you wanna bridge them:
(x)- Switch VLAN: "eth0.1"(lan)
(x)- Wireless Network: Master "openWrt"(lan) /repeating as wireless
(x)- Wireless Network: Master "openWrt"(lan) /LAN port

weird settings, but works since yesterday stable.
finished.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.