I have an .ovpn
configuration file which allows me to reach endpoints on the VPN if I uncomment redirect-gateway def1
, but I do not want all network traffic going through the VPN. Only certain endpoints.
If I try and visit an internal website, let's say 42.123.123.10
with redirect-gateway def1
present it works. If I comment redirect-gateway def1
and use any of the following it does not work.
Additionally, I cannot see the interface named ovpn-tun
when running ifconfig
so I am not sure what to set network rules on if I configured a script to add routes or what have you.
Attempted
route-nopull
route 42.123.123.10 255.255.255.255 ;OR the following line
route 42.123.123.10 255.255.255.0 ;OR the following line
route 42.123.123.10
Base Config
route-nopull
client
dev ovpn-tun
remote {REDACTED} 1194 udp
cipher AES-256-CBC
auth SHA512
resolv-retry infinite
;redirect-gateway def1
route 42.123.123.10
nobind
persist-key
persist-tun
user nobody
group nogroup
verb 10