I am using a NETGEAR R6120 running OpenWrt and I have been trying to get it to act as a hub for a few IoT devices to connect to my university's Wi-Fi, as the university's device registration and connection have been unreliable or impossible on those devices. But I have been running into two major issues; briefly:
- When I try to visit the device registration page, there is an error "We are unable to register your device because there was no MAC Address found in DHCP server logs for your machine," and
- I have not been able to set up a proper Wi-Fi repeater.
Here is how I have been doing things: I have a Win10 desktop that is connected to the router via Ethernet. It is getting a static IP on the 192.168.2.0/24 subnetwork that the router has for its LAN configuration (interface LAN, device br-lan, which is devices eth0.1 and wlan0-2). I am using the Bitvise SSH client to connect to the router at 192.168.2.1, and I am using the client's SOCKS tunneling functionality to set up proxy forwarding on one of my local ports. In a different browser (Firefox) I have the proxy set to that so I can see what the router sees. The desktop is also connected to the Internet via Wi-Fi (not from the router) so that this browser (Chrome) can be used normally.
When I set the WAN interface on the router to connect to a Wi-Fi network with full Internet access, such as a hotspot on my phone, then Firefox works just fine; the router is connected to the Internet. When I try connecting it to my university's guest Wi-Fi, I am able to access the interstitial "Acknowledge our terms of service" page. I can then click "Accept" and it is connected to the Internet as before.
But when I set the WAN interface to connect to my university's normal Wi-Fi, it struggles to even get redirected to the interstitial page; I need to visit the website using HTTP instead of HTTPS to get it to load. And when it does load, it tells me that error above, namely that the university's DHCP server logs indicate no MAC address for the router. Could this be due to the proxy? As I understand it, what the computer sees should be what the router would see if it were doing the connection itself, though I am not 100% sure of this because there does not seem to be an OpenWrt browser (cf this).
Is there a known reason that the router would not be sending its MAC address to the DHCP server? Or do I need to escalate to the university's sysadmins to see what is going on? I have been told by neighbors that some routers' off-the-shelf firmware and interface have allowed them to register their devices with no issues, so I think there should be a way for me to figure this out on my own.
The second piece of the puzzle is how to get the router to properly bridge connections. Because even though I can tunnel the proxy connection through SSH, that does not mean that I can connect arbitrary devices to the Internet through the router. When the router's upstream Wi-Fi was connected to the Internet through my phone's hotspot, the Ethernet connection on my desktop was still claiming not to have an Internet connection. I also connected a laptop to the OpenWrt Wi-Fi (also on device br-lan) via DHCP and it did not ever get any Internet connection.
This is almost certainly a problem with my knowledge and not with the router. I have been struggling to understand the documentation -- pieces seem to be out of date, or in broken English, or have missing parts that make them difficult to follow. Here are the things I have tried:
- Just normally setting up the LAN and WAN interfaces, and putting them in the same firewall group with ACCEPT/ACCEPT/ACCEPT for input/output/forward both with and without Masquerading (as suggested here);
- Doing the above but setting the WAN interface to be in mode 'sta'; note that this had to be done in the CLI rather than LuCI (which did not seem to have a good way of representing that mode). This was following the ideas laid out here;
- Following the instructions here that basically do the above but with Client (WDS) and Access Point (WDS) as modes. This did not work; changing just the client to WDS made it not work, and trying to join the interfaces and then set the DNS forwarding to the address of the AP router (192.168.43.1 for the phone) initially took down the router (the "Physical Settings" options were moved!). Once I enabled STP it still did not work even when I set the gateway of the local interface to be the IP address it was assigned by the phone (192.168.43.220). When both the Client and Server are on the LAN interface, the upstream connection is listed as having a Static address protocol with an Address of the one set (192.168.2.1) with a gateway on the other network (192.168.43.220), supplanting the normal upstream connection to the phone. Even the proxied Firefox browser failed to connect when I tried this.
- Following the instructions here for the Wi-Fi repeater. I tried setting the "Local IPv4 address" for the repeater bridge to be the address it was assigned by whatever Internet service it was connected to: my phone, or the guest university Wi-Fi, but nothing seemed to work. I did make sure it was in the same firewall group as the LAN and the WWAN. Rather confusingly, both the WAN and WWAN have been able to connect, so I have been able to have 2 upstream connections at the same time. It is a useful way to check firewall connections but it can be confusing with respect to devices: they are devices wlan0 (which is really radio0.network2, apparently) and wlan0-1 with the same MAC addresses except one begins with 8C and the other begins with 8E.
For the life of me I cannot figure out where I am going wrong. Should I try manual routing with ip route add
?