[Openswan Users] Site-to-site + OpenVPN

Damir Reic dreic at email.t-com.hr
Fri May 17 23:02:42 UTC 2013


 
> I am trying to achieve there users use intermediatery  server whith secure
> connection to destionation openvpn server.
> 


iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -F -t nat
iptables -X
iptables -X -t nat
iptables -t nat -A PREROUTING  -p tcp -d 50.56.213.56 --destination-port 443
-j DNAT --to-destination 50.56.213.234:443
iptables -t nat -A POSTROUTING -p tcp --dst 50.56.213.234 --dport 443 -j
SNAT --to-source 50.56.213.56
iptables -t nat -A PREROUTING  -p udp -d 50.56.213.56 --destination-port
1194 -j DNAT --to-destination 50.56.213.234:1194
iptables -t nat -A POSTROUTING -p udp --dst 50.56.213.234 --dport 1194 -j
SNAT --to-source 50.56.213.56
iptables -A FORWARD -p tcp -d 50.56.213.56 --dport 443 -j ACCEPT


sysctl -w net.ipv4.ip_forward=1



In case someone wonders how to do this.



More information about the Users mailing list