16

I have an OpenVPN set up on the server and I am using OpenVPN connect for my client. I have some internal websites that I need to access and some of them don't work. I want to make sure that when the traffic is going through the VPN and not though the normal internet connection. The gateway IP for my network is 192.168.0.1 and the gateway for OpenVPN is 10.8.0.1. I have done trace route and it shows that the websites that don't work access 192.168.0.1 and not 10.8.0.1. Is this proof that it is not going through the VPN?

2
  • It's not really an answer, so I will comment instead. Two things you need to check 1- What are your DNS ipconfig /all if you do not even have a DNS that can resolve your website internally, then you have a problem. 2- Check your routes route print is your Internal websites IP routed towards the Tunnel.
    – Alex
    Feb 18, 2013 at 20:57
  • His question answers part of your comment already. DNS resolution is working fine because packets are being sent out.
    – gparent
    Feb 18, 2013 at 20:58

4 Answers 4

18

If you're on Windows then start a dos window and run the tracert command.

e.g. tracert www.google.com

You can also use an IP address instead of a DNS name.

If you're on Linux you can do the same with the traceroute command (install on Ubuntu with sudo apt update && sudo apt install traceroute). Usage: traceroute www.google.com.

With both utilities you should hopefully get a trace of the route that packets take to reach the destination. You'll be able to tell if it's passing through your VPN gateway.

6
  • I am using windows and when tracert google it uses the normal gateway. Also for the websites that don't work it uses the normal gateway. Is there anyway to force all traffic though the VPN? Feb 18, 2013 at 20:42
  • Yes, and if you want all traffic to go via the VPN you need to make all clients set their default route to whatever the VPN gateway address is. Normally you'd do this on a DHCP server to tell all clients on the LAN the new gateway (default route) address or you might be able to add it to the normal gateway to forward all traffic on via the VPN.
    – hookenz
    Feb 18, 2013 at 20:47
  • Yes, it's called Full Tunnel as opposed to Split Tunnel. But the first thing I would check is actually your routes with route print. Are you routing the correct traffic in the Tunnel?
    – Alex
    Feb 18, 2013 at 20:49
  • 2
    You might want to start a new question. As it's been answered. We've now verified that not all your traffic is passing through the VPN.
    – hookenz
    Feb 18, 2013 at 20:53
  • 1
    I ran the traceroute command on Ubuntu and I don't know what I'm looking for. I can't tell if it is running through the VPN or not. A full example showing what to expect with vs without a VPN in use would be helpful. Nov 17, 2022 at 13:54
7

On OS X, I use this, and it shows the interface as either en0 or utun0:

ex:

$ route -n get website.thatshouldroute.com
1
  • Thank you this is the answer I was hoping for, works great!
    – Pez
    Feb 5, 2022 at 0:09
2

Look at the routing table....netstat -r. Yes you can change routing by modifications of the routing tables and/or using iptables.

2

You can use a tool like Wireshark to "sniff" the traffic on your local network. Wireshark will allow you to see which traffic is going where based on the source and destination IP addresses.

Set up Wireshark on an interface that is between the hosts you want to test. Wireshark is a passive listener, so it won't interfere with your traffic.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .