I have a setup which I dont think is very difficult but cant get it to work.
Working setup: An ipsec server running in a docker connected directly to internet. The clients can connect.
Not working setup:
An ipsec server running in a docker connected to internet behind a firewall. I have node1
in an esxi server which acts as internet gateway
and node2
running in same esxi server which has ipsec server running in a docker
.
I have opened ports 500 and 4500 in node1 (internet gateway) and forwarded to node2 (running ipsec server in a docker).
The issue I am facing is, the clients are not able to connect.
Below is the iptables firewall rule
-A FORWARD -d 192.168.2.37/32 -o ens34 -p udp -m udp --dport 500 -j ACCEPT
-A FORWARD -d 192.168.2.37/32 -o ens34 -p udp -m udp --dport 4500 -j ACCEPT
-A FORWARD -d 192.168.2.37/32 -o ens34 -p udp -m udp --dport 53 -j ACCEPT
Not able to spot what else is missing. Can someone advise if my setup is correct and why it is not working?