I have a linksys WRT160NL router with clean OpenWrt 19.07.10 installed.
I want to:
connect two devices (TVs) via Ethernet cable to the router
force their traffic exclusively trough OpenVPN client installed on the router to paid server (SurfShark)
configure outgoing traffic from router to go through other already existing WiFi network by connecting to it as client (the WiFi is managed by separate device which I do not control)
I don't care about pretty network extensions with existing WiFi, the LAN I want to build here can be separate. I also don't want any fancy VLANs or anything special, just the bare minimum needed here to make this work. I can work trough CLI (SSH) or LuCI, both are fine for me.
So far, with various trials and errors and by following OpenWrt's documentation, I managed to:
install and configure VPN client, connect it to the server, and have the router to route outgoing network successfully trough VPN (I'm guessing here that I did it correctly - not sure, just that I can see the latency going way up whist doing traceroute when OpenVPN client is running)
connect to existing WiFi network so that router can use it (I can curl google.com and other stuff from the router itself)
But, no matter what I tried, my TVs do not have a network connection to the outside world. I simply cannot visit any website, or do anything with the established wired connection, other than load the LuCI interface. it always ended with the router working fine, but nothing else connected to it.
As a minor note, the VPN killswitch also never worked for me, I was able to stop the client and just use internet with low latency, but I think I shouldn't be able to do that at all?
I spent quite a few hours trying to do that by myself and with existing forum answers, but just nothing works for me. In fact I feel like my configuration is now at all-time low, since now on a fresh OpenWrt, with just the WiFi configured as a client, my LAN devices don't have any network connection to the internet, even though the router has.
Feel free to assume that I'm starting from blank OpenWrt config, since the resetting is already my second nature now
The most important in summary:
The lan and wwan interfaces must be on different subnets, and the wwan interface must be assigned to the wan firewall zone.
Yes, I did. And just to be sure I did it again, just now, with fresh OpenWrt config (by performing a reset before).
And just to be double sure - I also moved my router to a different subnet (192.168.10.1) as advised.
There shouldn't be any conflicts, because when I connect directly to the WiFi network of the WAN-enabled router (the one I don't control), I get this IP: 192.168.0.125, so it must be on a different subnet.
Anyway, I do have internet connection on the router (can curl/traceroute google.com), but my laptop can't, even though it's connected directly by Ethernet cable to LAN port no. 1 on the linksys.
Versio 19.07 is old and unsupported. We can have a look but it will be difficult to reproduce.
Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have
ubus call system board; \
uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
iptables-save -c; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
Your laptop doesn't seem to have a default gateway set.
Did you set the IP configuration manually or via DHCP?
yes, I did, and I think I forgot to change it back to DHCP. I switched it just now in case that was a problem, but unfortunately I still can't get the network up on this laptop.
But this prompted me to check out the Ethernet connection with another laptop, and surprisingly to me - it works just fine.
Therefore, the issue must have been with my laptop's network configuration all the way. Damn it.
I'm not sure what's wrong still, since switching to DHCP didn't change it for me.
Okay, I found what was wrong with my laptop - wired connection was not configured to use automatic routes, and instead it was using the (empty) list of routes in GUI. So, any packet going out didn't know where to head out, I think?
since the problem wasn't rooted in OpenWrt config, I think it's not necessary to send this debug info? It would be full of defaults anyway. I'll send them if I get stuck somewhere again, though.