Previously, my router was properly configured to allow access to my domain name (panel.mydomainname.com) from within my local network. However, after tinkering with the settings and restarting the router multiple times today, it stopped working. Now, I can only access the domain when I'm outside my local network. I might have inadvertently altered a setting that led to this issue, but I'm uncertain.
I'm using a reverse proxy nginx server for reference and that is connected to a VPN. The local IP's on my network are forwarded through the VPN so the NGINX server can access them and the IP is then changed to my VPN's IP. This is because I need to bypass my apartments NAT which blocks me from opening ports.
Here are the results of nslookup for the domain name:
NGINX server (On VPN):
root@nginx:~# nslookup panel.mydomainname.com Server: 220.127.116.11 Address: 18.104.22.168#53 Non-authoritative answer: Name: panel.mydomainname.com Address: 22.214.171.1244 (fake VPN IP) root@nginx:~# curl panel.mydomainname.com; echo curl: (7) Failed to connect to panel.mydomainname.com port 80 after 43 ms: Couldn't connect to server
Windows Computer on my Local Network nslookup:
C:\Users\datea>nslookup panel.mydomainname.com Server: dns.google Address: 126.96.36.199 Non-authoritative answer: Name: panel.mydomainname.com Address: 188.8.131.524 (fake VPN IP)
root@OpenWrt:~# nslookup panel.mydomainname.com Server: 127.0.0.1 Address: 127.0.0.1:53 ** server can't find panel.mydomainname.com: REFUSED ** server can't find panel.mydomainname.com: REFUSED
This is an overview of my network setup.
I currently do not have any firewall rules set for port forwarding and I'm using the default traffic rules that come with openwrt.
Here are my routing rules:
I originally had Adguard Home setup for my DNS server but I disabled it while trying to fix this issue.
I did find some information about NAT Hair pinning but I'm unsure how to set that up with my setup and it's strange that now I actually need it whenever it worked before? Maybe it was a fluke that it worked?
Links to my last issues:
Routing/Port Forwarding Wireguard to Lan Network - Installing and Using OpenWrt / Network and Wireless Configuration - OpenWrt Forum
Openwrt Routing Lan to VPNLan to Wireguard - Installing and Using OpenWrt - OpenWrt Forum