[SOLVED] Nginx only works locally

tombond

New Member
Jun 28, 2023
12
2
3
Hi, I sincerely hope this is not a completely stupid question but once again, I'm pretty new to Proxmox and Linux in general.

After setting up several VMs and Containers I would now like to use Nginx Reverse Proxy to allow external access to some of them. I have to add that I'm using a Vodafone Cable Internet connection in Germany, which means that it's Dual Stack Lite and I have no public IPv4.

  1. I've set up a DynDNS via dynv6.com and told my Fritzbox to update it regularly. Dynv6 knows my current IPv6 prefix so this seems to work fine.
  2. Then I added several "Records" within dynv6 which I can use to access different services. They all point to the Nginx container though because this is supposed to redirect the record to the actual service.
    Example: test.mydomain.dynv6.com -> ::9cad:d4ff:fe40:8bb0 (host part of my nginx container)
    The resulting complete IPv6 is correct and matches the one which is shown in my Fritzbox, which means that dynv6 is successfully taking my dynamic prefix and attaches the static host part to it.
  3. Besides, I've forwarded ports 80, 81 and 443 to the nginx container as requested by all kinds of online tutorials but I don't even know if this is needed in a IPv6-only environment.
  4. Within nginx I have set up a Proxy Host which redirects test.mydomain.dynv6.com to something like 192.168.0.54:81.
  5. I've verified that this works in my local network which means that I have access to the service by typing test.mydomain.dynv6.com into my browser.
  6. If I try the same from outside of my local network, it tells "connection failed".

Now if I put test.mydomain.dynv6.com into e.g. the nslookup at kloth.net it can successfully resolve the name to the respective IPv6 which I assigned in dynv6 so it seems like also remotely the name resolves to the IP of the nginx container. So why can I access my services locally, but not remotely? Is there something in Proxmox, like a Firewall or something which I am missing? It doesn't say "host not found" but instead it says "connection failed". Do I still have to configure something to allow external access to the nginx container?

Thanks for your help
Thomas
 
Damn, I solved it myself but I still want to document the solution.

The "firewall" which prevented the access was my Fritzbox. I only forwarded the Ports for IPv4 but due to a mistake in my config I didn't open the firewall for said ports. After I correctly configured the IPv6 adress of my nginx host I was able to tell the Fritzbox to forward those ports and open the firewall at the same time. No everything works as expected.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!