I have a host machine(
A) with lxc-container(
A's local ip address is 10.0.3.1 and public ip, let's say 22.214.171.124.
B's local ip address is 10.0.3.21.
I need 126.96.36.199:7999 to be forwarded to 10.0.3.1:7999 and I created the following rules for that:
iptables -t nat -I PREROUTING -p tcp -d 188.8.131.52 --dport 7999 -j DNAT --to 10.0.3.21:7999 iptables -A FORWARD -p tcp -d 10.0.3.21 --dport 7999 -j ACCEPT
When I connect to the
A (184.108.40.206:7999) from the outside world I am connecting successfully.
But I am falling when I try to connect to
A (connection timed out).
What rules should I create to be able to connect to 220.127.116.11:7999 from 10.0.3.1?