I host some services on my local network behind a reverse proxy. When I try to access them from any device other than my router I get a valid response.
For example if I do "curl www.myserver.com" from a phone outside of my network, or a PC within my network I get a response. If I SSH into my router and do the same command I get "curl: (7) Failed to connect to www.myserver.com port 80 after 20 ms: Connection refused"
Why might this be the case? What other information would be helpful? How might I troubleshoot this? Thanks!
The domain www.mydomain.com points to an external IP. So any device from the internet resolve to this IP, the path is:
-> Internet - routers WAN - (NAT from here on) -reverse proxy in LAN - LAN IP of server.
If you are on the router (why? Why would anyone want to 'work' on the router? This "tests" do not make any sense) or better you are on a LAN device, you resolve www.mydomain.com you'll get the internet IP.
-> LAN connects to Internet IP at routers WAN, but why should the router allow a LAN IP to access from WAN? How does this be routed?
In my opinion the most easy way is to a local IP ... But this won't be fun for the certification path.
Let's say this is a task even companies struggle with.
The proxy and local servers are all running in a Proxmox hypervisor. They are all within the same subnet on my LAN. Tried to make a rough diagram of how my network is laid out.
Above MT6000 do you have other routers? Or MT6000 has the public IP address?
How does the www.myserver.com domain resolve to your public IP? Can you explain?
When use your curl, you said it is "connection refused". So it means that the domain resolves actually. But you want to access it from the lan network, which may have some routing issues.