Hello Proxmox Network Gurus
I need your advice. I am stuck with 1 public ip on a Proxmox host, so I am using a bridge and NAT port forwarding to a single container.
Taking port 80 as an example, this rule in iptables is doing the forwarding from the host's public ip to the container's internal ip: 192.168.4.2 and is working just fine.
Currently though, the container is blinded to the host's public ip address and has no awareness of it. As a result, some apps in the container are unable to write to a file inside the container when using the public ip address. Apparently, I need NAT reflection / loopback rules for port 80 on the host. What would / should these rules look like on the basis of the above info?
Thanks.
Norman
I need your advice. I am stuck with 1 public ip on a Proxmox host, so I am using a bridge and NAT port forwarding to a single container.
Code:
root@prox1:~# cat /etc/network/interfaces
...........
auto vmbr0:0
iface vmbr0:0 inet static
address 192.168.4.1
netmask 255.255.255.0
network 192.168.4.0
broadcast 192.168.4.255
Taking port 80 as an example, this rule in iptables is doing the forwarding from the host's public ip to the container's internal ip: 192.168.4.2 and is working just fine.
Code:
-A PREROUTING -i vmbr0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.4.2:80
Currently though, the container is blinded to the host's public ip address and has no awareness of it. As a result, some apps in the container are unable to write to a file inside the container when using the public ip address. Apparently, I need NAT reflection / loopback rules for port 80 on the host. What would / should these rules look like on the basis of the above info?
Thanks.
Norman