Page 1 of 1

how to config to support some sites not use vpn

Posted: Sun Nov 12, 2017 6:42 am
by lanshine
I have a openVPN server installed on my VPS. On my labtop, when I start openVPN, all the traffic go through VPN.
Now I want just some of sites go through VPN and the other through non-VPN, how should I do?

I tried to add vpn_gateway route on my client, but failed.
And here is my server and client VPN config.

server:

Code: Select all

port 443
dev tun
server 10.10.10.0 255.255.255.0
ifconfig-pool-persist ipp.txt
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
push "route 10.10.10.0 255.255.255.0"
push "redirect-gateway"
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
group nobody
daemon

client:

Code: Select all

client
remote xx.xx.xx.xx 443
dev tun
comp-lzo
ca ca.crt
cert client1.crt
key client1.key
route-delay 2
route-method exe
redirect-gateway def1
#max-routes 1000 
#route-nopull

dhcp-option DNS 8.8.8.8
dhcp-option DNS 8.8.4.4
dhcp-option DNS 4.2.2.1
dhcp-option DNS 4.2.2.2
verb 3

Re: how to config to support some sites not use vpn

Posted: Sat Dec 16, 2017 1:13 pm
by lanshine
solved. nothing to do with vpn settings.
just add route item for traffic that don't need via vpn.