Hi, I've reset my OpenWrt router as requested in another thread and now want to chain internet to it from another existing FritzBox router. The end goal is to install Wireguard to put Mullvad VPN on the OpenWrt router.
Setup in order:
wall box, modem(?)
LAN cable
existing FritzBox
LAN cable
OpenWrt router, freshly reset
WIFI, enabled and can connect but no internet
devices I want to connect, laptop, phone
I think the last time I changed some settings in the Network > Interfaces tab, possibly something to do with DHCP? It was some weeks ago so I don't fully remember. I don't have the deepest knowledge so in the Interfaces menu I am not sure which is lan, wan and wan6 that it shows.
Your OpenWrt LAN needs to be a different address range than the upstream (Fritzbox) LAN. If that lan is 192.168.1.X that conflicts with OpenWrt's default LAN and routing to the Internet will not be possible. You would need to change OpenWrt lan to something like 192.168.2.1.
I changed it to this 192.168.2.1 number and it asked for Cancel, Save and Revert on Fail, or Save and Keep and told me to reconnect to the new address afterwards which I did. For some reason WIFI did not work again so I restarted radio1 and I think that fixed it.
But the original problem is still there: No internet on the laptop.
Click on the WAN interface (it may be labeled as "WAN" or "Internet").
Set the protocol to DHCP Client (this allows the OpenWrt router to obtain an IP address from the FritzBox).
Save and apply the changes.
but after that the WIFI did not work anymore so I reverted it. I think chatgpt does not really know if this is the right solution and just says things that sound like they could be right.
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
ifstatus wan | grep address
Currently connecting to it from laptop over WIFI.
The rest of the setup is in the first post.
Lan cable goes from FritzBox LAN port to OpenWrt router LAN port.
I've gotten it to work before so it should be possible but not sure which settings those were.
Your device has a dsl port and a single Ethernet port. That port is assigned to the lan by default. You need to remove the Ethernet port (lan) from br-lan and assign it to the wan interface.
Okay so I literally changed nothing since yesterday and just let it sit there. Today I start the laptop and see I have internet BUT I can not connect to the UI anymore on WIFI.
Had to disconnect the FritzBox <---> OpenWrt router LAN cable and connect it as OpenWrt router <---> laptop. Then restarted radio0, disconnect LAN cable again, test WIFI on laptop, did not work, tried a second time by connect LAN again, restart radio0 second time, diconnect LAN again, test WIFI again, now it works. Put the LAN cable back into the FritzBox on the other end and now I'm back to yesterday where WIFI on laptop works but internet is gone again.
Without lan->wan routing set up, you just have your network bridged together and the downstream OpenWrt device isn't doing anything other than acting as a wifi AP and a second DHCP server which is providing erroneous configurations. This race between the two DHCP servers causes inconsistent network breakage. Sometimes the laptop will get correctly configured from the first router but sometimes your second router will answer its DHCP requests and push itself as the gateway to the Internet, which is incorrect.
That sounds like it might be what is happening. But how do I fix this? Which settings should I use exactly?
I tried asking chatgpt and it makes up stuff about a Physical Settings tab that does not exist in which I should uncheck an option for eth0 which is only in the Device dropdown instead that is currently set to br-lan.
As @psherman said with this hardware having only a single Ethernet port you could set up wifi as the way to connect to the lan and then reconfigure Ethernet to be the wan.
Add a wifi AP to br-lan. The default configuration contains a starting point to having an AP but you need to do several things to it:
set your actual country code in the Country setting on the radio Advanced Settings tab
Configure encryption on the AP
Enable the radio
Unplug the Ethernet cable temporarily
Then you should be able to connect to the router using wifi and its internal DHCP server (don't disable it). Once connected by wifi, do the following:
Remove eth0 (or whatever the Ethernet port is named) from br-lan's list of ports
Change the wan interface protocol from pppoa to dhcp client
Change the wan interface device from dsl0 to the Ethernet port
Plug the Ethernet cable into your upstream network
Can you tell me in detailed steps? I have some trouble understanding this because isn't LAN the LAN cable coming into the LAN port? And I only know Ethernet as synonym for LAN?
Did you reset your devices network interface and point your browser to the new IP? When you change subnets you need to get a new IP address in the correct subnet.
This is the part I have a problem with because I don't see that option.
If I click Edit on the lan entry which also says br-lan there are these tabs and options
General Settings
Status
Protocol
Device
Disable this interface
Bring up on boot
IPv4 address
IPv4 netmask
IPv4 gateway
IPv4 broadcast
Advanced Settings
Force link
Use default gateway
Use custon DNS servers
DNS serach domains
DNS weight
Use gateway metric
Override IPv4 routing table
Override IPv6 routing table
Delegate IPv6 prefixes
IPv6 assignment length
IPv6 assignment hint
IPv6 prefix filter
IPv6 suffix
IPv6 preference
Firewall Settings
Create / Assign firewall-zone
DHCP Server
General Setup
Ignore interface
Start
Limit
Lease time
Advanced Settings
Dynamic DHCP
Force
IPv4 Netmask
DHCP-Options
IPv6 Settings
Designated master
RA-Service
DHCPv6-Service
Announced IPv6 DNS servers
Local IPv6 DNS server
Announced DNS domains
NDP-Proxy
IPv6 Prefix Lifetime
Follow IPv64 Lifetime
IPv6 RA Settings
Default router
Enable SLAAC
RA Flags
NAT64 prefix
Max RA interval
Min RA interval
RA Lifetime
RA MTU
RA Hop Limit
@Darin755 yes, using 192.168.2.1 instead of 192.168.1.1 now.
What topology are you looking for? From what you describe I can think of two different typologies. (although there are plenty of variations)
Option 1
You could setup the OpenWRT device to provide DHCP and to be the gateway for all devices. You would then set the FritzBox router to a static IP and then set the gateway on the OpenWRT router to point to the FritzBox. The OpenWRT routers WAN port would be unused in this case.
Option 2
The other option would be to chain the routers together. You could simply plug the OpenWRT router's wan to the FritzBox routers lan. All downstream devices would need to be connected to the OpenWRT routers lan. This has the drawback of adding a double NAT which probably isn't a big deal.
Since I want to put Mullvad Wireguard on the OpenWrt router I think I want some kind of chaining so that all traffic goes through the VPN without leaking.
All downstream devices would need to be connected to the OpenWRT routers lan
By this you mean the lan Interface in the UI, not via LAN cable, right? Because this OpenWrt router only has 1 LAN port and I want to connect multiple devices over WIFI.
I personally would just set stick to one lan. You need exactly one DHCP server somewhere and a static IP for both your Fritzbox and OpenWRT. There will not be any leaking if you set the gateway correctly. All traffic that is not for the local lan will be sent to the gateway address. You want that gateway to be OpenWRT. Devices shouldn't just send there traffic to the wrong gateway unless there is a misconfiguration.
Also you may want to look into getting a simple switch since chances are the switch inside your FritzBox is done in software which means it will have poor performance.