Routing Traffic With OpenVPN

Posted by user224277 on Server Fault See other posts from Server Fault or by user224277
Published on 2014-06-10T18:27:03Z Indexed on 2014/06/10 21:28 UTC
Read the original article Hit count: 175

Filed under:
|
|
|
|

Few minutes ago i configured my VPN server, and actually I can connect to my VPN but all trafic is going through my normal home network. On my OpenVPN application I've got an information :

Server IP: **.185.***.*10
Client IP: 10.8.0.6
Traffic: 7.3 KB in, 5.6 KB out
Connected: 10 June 2014 19:21:59

So everything is connected but how I can setup on windows 7 that all trafic have to go through OpenVPN network card ??

Client setting :

client
dev tun
proto udp

# enter the server's hostname
# or IP address here, and port number
remote **.185.***.*10 1194

resolv-retry infinite
nobind
persist-key
persist-tun

# Use the full filepaths to your
# certificates and keys
ca ca.crt
cert user1.crt
key user1.key

ns-cert-type server
comp-lzo
verb 6

Server setting :

port 1194
proto udp
dev tun

# the full paths to your server keys and certs
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh2048.pem

cipher BF-CBC

# Set server mode, and define a virtual pool of IP
# addresses for clients to use. Use any subnet
# that does not collide with your existing subnets.
# In this example, the server can be pinged at 10.8.0.1
server 10.8.0.0 255.255.255.0

# Set up route(s) to subnet(s) behind
# OpenVPN server
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

ifconfig-pool-persist /etc/openvpn/ipp.txt
keepalive 10 120
status openvpn-status.log
verb 6

and sysctl :

net.ipv4.ip_forward=1

Thank you for your time and help.

© Server Fault or respective owner

Related posts about linux

Related posts about Windows