0

I created an openswan instance which connected with AWS VPN and tunnel is up. I can ping from Openswan server to EC2 instance in VPC and EC2 instance can also ping Openswan private interface.

But servers behind Openswan server cant reach EC2 instances and EC2 instances also cant reach servers behind Openswan although when i ping from EC2 instance to any instance behind Openswan then traffic reached to Openswan but Openswan cant route it to any server.

Security groups and Iptables are not blocking anything.

1 Answer 1

1

Following iptable rules make it work.

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .