Hi
I have two openvz container.
One with a Public IP and the other with NAT.
I forwarded one port to the NAT container (with another public IP). Everything is seems good. With a standrad client I can connect to the forwarded port, but the public container doesn't see the NAT container. I connect the forwarded port and no reply from it. Both container is on the same hardwere node.
I use iptables for the port forwarding.
-A PREROUTING -d ANOTHERPUBLICIP -p tcp -m tcp --dport 2222 -j DNAT --to-destination 192.168.2.1:22
-A POSTROUTING -s 192.168.2.1/32 -o vmbr0 -j SNAT --to-source ANOTHERPUBLICIP
What can I set up to the public container to be able to connect the forwarded port?
I have two openvz container.
One with a Public IP and the other with NAT.
I forwarded one port to the NAT container (with another public IP). Everything is seems good. With a standrad client I can connect to the forwarded port, but the public container doesn't see the NAT container. I connect the forwarded port and no reply from it. Both container is on the same hardwere node.
I use iptables for the port forwarding.
-A PREROUTING -d ANOTHERPUBLICIP -p tcp -m tcp --dport 2222 -j DNAT --to-destination 192.168.2.1:22
-A POSTROUTING -s 192.168.2.1/32 -o vmbr0 -j SNAT --to-source ANOTHERPUBLICIP
What can I set up to the public container to be able to connect the forwarded port?
Last edited: