litewait
I have the need to create a VPN server that will route ONLY requests to a specific IP block through it to the Internet (this is so these clients appear at these IPs from a single fixed IP).
I have configured the server and client as follows, and it does connect, but my client browser is hanging when I request an IP in that range when connected to the VPN.
What am I missing? How can I debug this further?
----------------------------- SERVER (CentOS 6) -----------------------
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.100.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
client-cert-not-required
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so login
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 5
push "route XXX.44.32.0 255.255.224.0"
push "route XXX.202.0.0 255.255.192.0"
------------------------- CLIENT (OSX Mavericks - Tunnelblick) -----------------------
client
dev tun2
proto udp
remote XXX.XXX.117.181 1194
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 5
pull
route-delay 2
auth-user-pass
<ca>
-----BEGIN CERTIFICATE-----
<snip>
-----END CERTIFICATE-----
</ca>
litewait
Ok I think this is working with the following additions:
I do see the route(s) added on the client in netstat -r.
I can SSH into 10.8.100.1 (the openvpn server).
/proc/sys/net/ipv4/ip_forward = 1
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Now I can hit a web site on those routed IPs and see traffic on utun0 using tcpdump.
Can anyone confirm everything I have done here is correct?