I've some issues configuring properly the network in proxmox.

In short, from a container, I can reach any web server outside (ex: google.com), but I can't reach the web server on my container. The web server is reachable from internet.

Here is the setup :

DNS : mydomain.example -> x.x.x.x/32


vmbr0: x.x.x.x venet0: (routing to each container)

Iptables rules :

iptables -t nat -A PREROUTING -p tcp -d x.x.x.x --dport 80 -i vmbr0 -j DNAT --to-destination y.y.y.z:n
iptables -t nat -A POSTROUTING -o vmbr0 -s y.y.y.0/24 ! -d y.y.y.0/24 -j MASQUERADE


venet0: y.y.y.z


Commands executed from a container :

ping google.com : OK
ping mydomain.example : OK
wget http://google.com OK
wget http://mydomain.example : KO

Resolving mydomain.example... x.x.x.x
Connecting to mydomain.example|x.x.x.x|:80... failed: Connection refused.

What I'm missing ? Do you need more info ?


You should remove the -i option in your prerouting rule.

Here, requests are coming from venet0 interface, so your actual DNAT rule does not apply.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.