I have set up an OpenVPN server for access to my work LAN. It appears that all traffic routes through the vpn server when it's connected but I only want LAN traffic to go to it. How can I stop this? Specifically, I want only a single website with a public dns which is resolves to a 10.* subnet IP to go through the vpn and everything else to go via my regular ISP.
Here is my server.conf
port 1194 proto udp dev tun ca ca.crt cert my.crt key my.key dh dh2048.pem server 192.168.7.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "dhcp-option DNS 184.108.40.206" push "dhcp-option DNS 220.127.116.11" keepalive 10 120 comp-lzo user nobody group nogroup persist-key persist-tun status openvpn-status.log verb 3
Here is my ovpn file
client dev tun proto udp remote mydomain.com 1194 resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert my.crt key my.key remote-cert-tls server ping 15 ping-restart 120 route 10.0.0.0 255.0.0.0 route-nopull comp-lzo daemon verb 3 user nobody group nogroup
Softether works the way i want it to, not routing all traffic through the vpn server. I need to either change the metric for the OpenVPN gateway or mark it as not the default gateway. route
default 192.168.1.1 0.0.0.0 UG 600 0 0 wlp1s0 10.0.0.0 10.0.1.1 255.0.0.0 UG 0 0 0 vpn_vpn
default 192.168.7.5 0.0.0.0 UG 50 0 0 tun0 default 192.168.1.1 0.0.0.0 UG 600 0 0 wlp1s0
The following is from the OpenVPN howto, it indicates that the default is not to direct all traffic through the vpn which is what I want but my configuration at least makes this seem to be the opposite.
By default, when an OpenVPN client is active, only network traffic to and from the OpenVPN server site will pass over the VPN. General web browsing, for example, will be accomplished with direct connections that bypass the VPN.
ip a. From configs I do not see
redirect-gatewayoption so only VPN traffic should go thru VPN. What is your local interface IP?