FatDragon
Hi All,
I have setup vpn tunnel (10.6.0.0/24) to my openvpn (using routing) server at AWS.
All clients can see each other,
I can also get from my vpn client (10.6.0.5) to my vpnserver and also to one of my servers (172.31.10.212) behind vpn server inside my vpc
What I like to do is to ping and ssh from the vpc server (172.31.10.212) to my vpn client (10.6.0.5)
Now I have been playing around with all iptables and routing and I just can't get this to work.
I already have following in my vpnserver:
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.6.0.0/24 -j ACCEPT
iptables -A FORWARD -s 172.31.0.0/16 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.6.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 172.31.0.0/16 -o tun0 -j MASQUERADE
I know the above 10.6.0.0/24 masquerade is needed and working, the other one however I don't think is working.
I also have following route on my vpcserver that routes 10.6 back to my vpnserver (172.31.20.124)
route add -net 10.6.0.0 netmask 255.255.255.0 gw 172.31.20.124
and I know it needed and working for my vpclient to connect to vpcserver
Thanks for your help