LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-27-2013, 12:16 PM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Rep: Reputation: 19
Using an external VPN service -- Need to stop DNS leak.


My setup:
Router: Running pfSense connected to internet/ISP
- Computer/Desktop: Connected to VPN directly

Symptoms:
- I successfully connect to the VPN
- DNS leaks are created found after a dns test

netstat -r
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         103.121.217.5    0.0.0.0         UG        0 0          0 tun0
103.121.217.1    103.121.217.5    255.255.255.255 UGH       0 0          0 tun0
103.121.217.5    *               255.255.255.255 UH        0 0          0 tun0
158-161-45-62ch. mainrouter.smit 255.255.255.255 UGH       0 0          0 eth0
link-local      *               255.255.0.0     U         0 0          0 eth0
192.168.1.0     *               255.255.255.0   U         0 0          0 eth0
So, I would like to setup my system to do the following:
- All traffic directed to 192.168.x.x to use 192.168.1.1 as the default gateway.
- All other trafic to use the VPN default gateway of 103.121.217.5

If it isn't already obvious, I don't know much about VPN's, networking and/or default gateways. Please treat me like a complete newb.

Is it possible to do what I want, and if so, how do I do it.

Reason: When I'm connected to the VPN I can access anything on 192.168.1.x. However, because the default gateway is 192.168.1.1 when I test for a DNS leak my ISP is getting picked up. I can avoid this by removing the route to 192.168.1.1 but then my LAN is not accessible and I cannot print or use my local file sharing or anything. I would like to access 192.168.x.x which I can do by adding the routes, but again, then I have the DNS leak issue.

Any help on this would be greatly appreciated.
 
Old 10-27-2013, 05:50 PM   #2
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
I'm not sure if this is the correct way to solve my DNS leak problem, but I think I have. At least dnsleaktest.com is no longer showing my ISP.

I changed my primary and secondary DNS servers to 4.2.2.1 and 4.2.2.2 respectively.

If this doesn't solve my problem, I would appreciate it if someone would let me know.

I thought I would post it since there have been almost 100 views without a solution. Maybe someone else will benefit from this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stopping DNS leak with VPN - need help with setup Greenjorn Linux - Newbie 2 06-18-2013 10:22 PM
puppet needs to stop a service, do something, then start the service edwardcode Programming 1 12-03-2012 02:58 PM
Having an internal DNS and an external DNS (for VPN use) DaveQB Linux - Laptop and Netbook 3 09-05-2011 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration