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:
root@porteus:/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
root@porteus:/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?
 


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.
 

Members online


Top