I run an openvpn-server on my RaspberryPi (Raspbian OS) and everything is fine exept the fact that all traffic goes through the tunnel. I want to route my subnet through the VPN connection and everything else out of the non-VPN connection.
Remove "redirect-gateway def1 bypass-dhcp" in my OpenVPN server config file (server.conf) and add "route 12.12.12.0 255.255.255.0" in client config (client.ovpn) doesn't help. I need some advice on my config to change from VPN-Full-Tunnel to VPN-Split-Tunnel. Who can help ?
Server.conf
Code: Select all
port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
#push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.9.1"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem
client-config-dir ccd
client.ovpn
Code: Select all
client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote datenfarm.dlinkddns.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
comp-lzo
setenv opt block-outside-dns
key-direction 1
verb 3
#route-nopull
route 192.168.9.0 255.255.255.0 vpn_gateway