I have a device running openwrt snapshot with Luci installed.
My main wan connection is a NordVPN tunnel with the Wireguard protocol.
The router and every host in my network can access Internet through the NordVPN public IP ( 192.145.127.xxx) and I can access the luci web panel from my browser at http://192.168.11.1/cgi-bin/luci/ (192.168.11.1 is the private router IP). I think you can ignore NordVPN, you can think of it as my ISP.
Now...i installed ZeroTier, that is basically a peer-to-peer VPN that allows to connect different devices together also if they are far away putting them in a virtual LAN (it uses various NAT traversal techniques to do that). One (not only) of the goal is to reach the router despite NordVPN shares the same public IP with different customers).
The ZeroTier virtual interface has its own IP, in my case is 172.22.98.82.
I'm able to remotely reach my router at 172.22.98.82 (obviously from another device that has joined the ZeroTier virtual network): I can ping it, I can SSH into it, I can make http requests to uhttpd (es. http://172.22.98.82/mypage.html).
Here is the problem: for some reason, /cgi-bin/luci (only this specific path!!!) refuse the connection when the request came from the ZeroTier adapter.
I cannot find any log in the router and I don't know how to troubleshoot this.
Activate the required VPN connections and post the output to pastebin.com redacting the private parts:
ubus call system board; uci show network; uci show firewall; uci show uhttpd; \
ip address show; ip route show table all; ip rule show; iptables-save; \
netstat -l -n -p | grep -e uhttpd
If I send the request through curl, the requested is server (with 403 but it's served).
If i try the same request from the browser of from postman the request just times out.
I need to compare the two requests in order to discover what's different (maybe some http headers?)
Ok I inspected the curl request and it's using the HEAD http method instead of the GET method to send the request, this is why it works from curl but not from the browser.
Now I wonder why luci is rejecting the GET request if it's coming from the zerotier vpn, while the other paths are server correctly.
This sounds like MTU-related issues, or incorrect proxy configuration in the system/browser.
uci set firewall.@zone[2].mtu_fix="1"
uci commit firewall
/etc/init.d/firewall restart
In addition, the current ZT tunnel appears to be built over the WG tunnel.
This can negatively affect MTU, latency and speed.
You should likely set up routing to use WAN instead of WG to run the ZT tunnel.
If you want to proceed with diagnostics, check tcpdump on OpenWrt when using browser.
I think you're right.
There is something wrong with the ZT tunnel itself.
Unfortunately mtu_fix did not solved the issue.
It's ok for me to route ZeroTier through WAN instead of NordVPN but I'm unable to do so.
I setup the Wireguard tunnel as the default route for the system. I can tell ZeroTier to use wan instead of Wireguard?