I am currently using OpenVPN client on my ubuntu server to access my vpn service provided by cyberghost vpn. I am trying to configure the client to only use the vpn for a specific ip address. I have removed the line redirect-gateway def1 and have tried the following combinations in its place (commas not used, just to show newline):
As a test I am trying to route 104.27.152.130 which according to get-site-ip.com is the ipaddress of ifconfig.io, so as I understand it should show a different ip to the google version.
route-nopull, route xx.xx.xx.xx 255.255.255.255
route-nopull, route xx.xx.xx.xx
route-nopull, push route xx.xx.xx.xx, 255.255.255.255
route-nopull, push route xx.xx.xx.xx
I have read several posts online who all say one of the above works but I keep using these two commands to check what they think my ip is:
wget -qO- ifconfig.io/ip
dig TXT +short o-o.myaddr.1.google.com @ns1.google.com | awk -F'"' '{print $2}'