Routing with VPN doesn't work, I wonder why?

glestwid

New Member
Joined
Sep 4, 2020
Messages
3
Reaction score
0
Credits
40
Hi,

I'm establishing a VPN connection, but it doesn't seem to work like I thought. Here's the resulting routing table ant the traceroute output:

Quote:
[email protected]:/home/guest# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 1000 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
192.168.0.0 10.8.0.5 255.255.255.0 UG 1000 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
[email protected]:/home/guest# traceroute www.whatismyipaddress.com
traceroute to www.whatismyipaddress.com (104.16.155.36), 30 hops max, 60 byte packets
1 home (192.168.1.1) 1.719 ms 3.817 ms 3.892 ms
2 172.17.1.50 (172.17.1.50) 6.225 ms 6.078 ms 6.031 ms

I tried to specify in my OVPN file route-metric 0 but no luck, all packets are still not using my VPN at all. What should I change to make my VPN interface tun0 to be default and the only interface for all TCP/IP communications on my machine?
 


Jarret B

Well-Known Member
Staff member
Joined
May 22, 2017
Messages
283
Reaction score
285
Credits
7,666
Go to the web page at https://phoenixnap.com/kb/openvpn-centos and scroll down to step 5.
I just wrote an article on setting this up for the LCFS series. This is not an easy setup, whether it is CentOS or Ubuntu. No matter your distro, this should help. The problem is you need to MASQUERADE the firewall.
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top