Skip to main content
added 736 characters in body
Source Link
Ricardo
  • 294
  • 1
  • 3

UPDATE2

From your tcpdump it is clear that your client is routing the packets via the tunnel, your problem therefore lies at the remote end because it is not rounting the packets back.

listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes 09:19:28.964361 IP 10.8.0.6.57394 > 192.168.1.1.domain: 60317+ A? daisy.ubuntu.com.localdomain. (46) 09:19:28.964382 IP 10.8.0.6.57394 > 8.8.8.8.domain: 60317+ A? daisy.ubuntu.com.localdomain. (46) 09:19:28.964398 IP 10.8.0.6.57394 > 8.8.4.4.domain: 60317+ A? daisy.ubuntu.com.localdomain. (46) 

You must examine every hop to see what the routing table looks like. Start with 192.168.1.1. Does it know where to route packets sent to 10.8.0.6?

UPDATE2

From your tcpdump it is clear that your client is routing the packets via the tunnel, your problem therefore lies at the remote end because it is not rounting the packets back.

listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes 09:19:28.964361 IP 10.8.0.6.57394 > 192.168.1.1.domain: 60317+ A? daisy.ubuntu.com.localdomain. (46) 09:19:28.964382 IP 10.8.0.6.57394 > 8.8.8.8.domain: 60317+ A? daisy.ubuntu.com.localdomain. (46) 09:19:28.964398 IP 10.8.0.6.57394 > 8.8.4.4.domain: 60317+ A? daisy.ubuntu.com.localdomain. (46) 

You must examine every hop to see what the routing table looks like. Start with 192.168.1.1. Does it know where to route packets sent to 10.8.0.6?

added 961 characters in body
Source Link
Ricardo
  • 294
  • 1
  • 3

UPDATE:

Now that you have the proper default route, its time to troubleshoot with tcpdump and pings. For example try the below command and perform some ping to the remote network.

# tcpdump -i tun0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes 09:59:13.591764 IP 192.168.4.190 > 192.168.3.1: ICMP echo request, id 3154, seq 4, length 64 09:59:13.681290 IP 192.168.3.1 > 192.168.4.190: ICMP echo reply, id 3154, seq 4, length 64 09:59:14.592829 IP 192.168.4.190 > 192.168.3.1: ICMP echo request, id 3154, seq 5, length 64 09:59:14.680878 IP 192.168.3.1 > 192.168.4.190: ICMP echo reply, id 3154, seq 5, length 64 

My guess is you will see the echo request but not the echo reply. This means that the remote endpoint is not routing the packets back. You need to fix the routes there too in the server config file.

UPDATE:

Now that you have the proper default route, its time to troubleshoot with tcpdump and pings. For example try the below command and perform some ping to the remote network.

# tcpdump -i tun0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes 09:59:13.591764 IP 192.168.4.190 > 192.168.3.1: ICMP echo request, id 3154, seq 4, length 64 09:59:13.681290 IP 192.168.3.1 > 192.168.4.190: ICMP echo reply, id 3154, seq 4, length 64 09:59:14.592829 IP 192.168.4.190 > 192.168.3.1: ICMP echo request, id 3154, seq 5, length 64 09:59:14.680878 IP 192.168.3.1 > 192.168.4.190: ICMP echo reply, id 3154, seq 5, length 64 

My guess is you will see the echo request but not the echo reply. This means that the remote endpoint is not routing the packets back. You need to fix the routes there too in the server config file.

added 1 character in body
Source Link
Ricardo
  • 294
  • 1
  • 3

For some reason your client is unable to delete the current default route when the tunnel opens, thereby causing two default routes to exist in the routing table.

What you are going to have to do is give the current route a lower metric (higher number) before the tunnel comes up. You can see the metric with the route -n command:

# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.3.0 10.8.1.2 255.255.255.0 UG 0 0 0 tun0 9.15.64.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 0.0.0.0 9.15.64.1 0.0.0.0 UG 0 0 0 eth0 

So for example give your wlan interface a metric of 20 and let the tunnel route come up with a metric of zero. Your traffic will all be sent down the tunnel route.

IIn order to configure the metric on the interface just open the wlan interface file in the /etc/sysconfig/network-scripts directory and add a parameter called METRIC=20.

That should do it. Make sure you verify it afterwards with the route -n command.

For some reason your client is unable to delete the current default route when the tunnel opens, thereby causing two default routes to exist in the routing table.

What you are going to have to do is give the current route a lower metric (higher number) before the tunnel comes up. You can see the metric with the route -n command:

# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.3.0 10.8.1.2 255.255.255.0 UG 0 0 0 tun0 9.15.64.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 0.0.0.0 9.15.64.1 0.0.0.0 UG 0 0 0 eth0 

So for example give your wlan interface a metric of 20 and let the tunnel route come up with a metric of zero. Your traffic will all be sent down the tunnel route.

I order to configure the metric on the interface just open the wlan interface file in the /etc/sysconfig/network-scripts directory and add a parameter called METRIC=20.

That should do it. Make sure you verify it afterwards with the route -n command.

For some reason your client is unable to delete the current default route when the tunnel opens, thereby causing two default routes to exist in the routing table.

What you are going to have to do is give the current route a lower metric (higher number) before the tunnel comes up. You can see the metric with the route -n command:

# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.3.0 10.8.1.2 255.255.255.0 UG 0 0 0 tun0 9.15.64.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 0.0.0.0 9.15.64.1 0.0.0.0 UG 0 0 0 eth0 

So for example give your wlan interface a metric of 20 and let the tunnel route come up with a metric of zero. Your traffic will all be sent down the tunnel route.

In order to configure the metric on the interface just open the wlan interface file in the /etc/sysconfig/network-scripts directory and add a parameter called METRIC=20.

That should do it. Make sure you verify it afterwards with the route -n command.

Source Link
Ricardo
  • 294
  • 1
  • 3
Loading