jimstowe
I have OpenVPN running on an Amazon Cloud Services unix instance so that my external users can connect to our virtual private cloud.
The OpenVPN server assigns IP addresses to clients in the subnet 10.10.252.0/22
I want all traffic to the external IP address 64.38.3.42 to be routed through the VPN server.
When I force all internet traffic through the VPN server, this works. However this is not an acceptable solution. I only want traffic to particular external IP addresses to be routed through the VPN server, not all internet traffic.
I attempted the following (but it was unsuccessful):
1. used the following command on the OpenVPN server:
iptables -t nat -A POSTROUTING -s 10.10.252.0/22 -o eth0 -j MASQUERADE
2. added the following server directive to push the route to the OpenVPN clients:
push "route 64.38.3.42 255.255.255.255 10.10.254.1"
I need to get this working ASAP. Thank you.