Hope you are doing well, I am new to openvpn. I hve setup a simple openvpn server with windows 7 client everything works well.
However this is what I see and I would like to change it if possible:
Current setup:
1 - Client connects to the server via -user/pass.
2 - all traffic go throw the VPN tunnel - my public IP is the remote server external IP. all internet protocols work.
What needs to be done:
1 - Client connects to the server via -user/pass.
2 - Only traffic that intended to go to the remote/internal network. But all other traffic like http/ftp etc use the current router.
Example:
Client NET: 192.168.0.0/24
Remote: 10.0.0.0/24
If I google to check my public IP I still use my client/home IP. But only traffic that should resolve to 10.0.0.0/24 network if routes to the remote network.
I kinda figure that my DNS should be using my remote/internal DNS server, but I believe all that is needed is a route to forward any traffic to 10.0.0.0/24 via VPN tunnel.
Please advise.
Thanks in advance.
:Server Config: - CentOS 5.
Code: Select all
port 1100
proto udp
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/cloudmain.cloudmgm.com.crt
key /etc/openvpn/easy-rsa/2.0/keys/cloudmain.cloudmgm.com.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1100.log
verb 3
ifconfig-pool-persist ipp.txt
max-clients 10
log openvpn.log
mute 20
:Client Config:
Code: Select all
client
dev tun
proto udp
remote mydomain 1100
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca mydomain.crt
auth-user-pass
comp-lzo
reneg-sec 0
verb 3