How to make DNS server same as IP address with OpenVPN?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
eu-yj
DD-WRT Novice


Joined: 10 May 2018
Posts: 8

PostPosted: Fri May 11, 2018 5:17    Post subject: How to make DNS server same as IP address with OpenVPN? Reply with quote
Hi friends. I have been reading around this forum - thanks to everybody who contributed - but my networking knowledge is still in the "more questions than answers" stage.

I have OpenVPN client and DNSMasq running on my DD-WRT router, Kong's release v3.0 r35550M (03/28/18). It works well. When I test for leaks from a LAN client on my network by going to ipleak.net, browserleaks.com, or simialr no DNS leaks are reported and under "DNS server" I see only the DNS server of my VPN company (i.e. Static DNS 1 I put in the router setup). However, it is immediately apparent that I am using a VPN, especially if my chosen IP address is not in the same geographical region as the static DNS server.

How do I configure DNSMasq so that instead of showing my VPN company's DNS server it would show my own IP address?
Sponsor
eu-yj
DD-WRT Novice


Joined: 10 May 2018
Posts: 8

PostPosted: Mon May 14, 2018 21:11    Post subject: Reply with quote
Thank you eibgrad for your advice. Unfortunately I have been unable to make it work. Maybe I need to elaborate on what I am trying to accomplish. I am comparing OpenVPN client behaviour when it is installed locally on a Windows (or an iOS) device versus Kong's v3.0 r35550M on an R7000. I will use Nord VPN and ipleak.net to illustrate the difference. First the DD-WRT settings:

Setup > Basic Setup:
Quote:
Static DNS 1 = 103. 86. 96.100
Static DNS 2 = 103. 86. 99.100
Static DNS 3 = 208. 67.222.222

DHCP Type = DHCP Server
DHCP Server = Enable
Use DNSMasq for DHCP = x
Use DNSMasq for DNS = x
DHCP-Authoritative = x

Services > Services :
Quote:
DHCP Server:
Used Domain = LAN & WLAN

DNSMasq:
DNSMasq = x
Local DNS = x
No DNS Rebind = x
Query DNS in Strict Order = x



Now for the difference in behaviour. Suppose I am connected to a Nord VPN server through locally installed OpenVPN client (on a Windows or iOS machine). I visit ipleak.net: under "Your IP address" I see the IP address of the VPN server I am connected to, AND under "DNS Addresses - 1 server" I see the exact same IP address.

By contrast, if I am on a LAN machine connected to the same Nord VPN server through OpenVPN client on DD-WRT - under "You IP address" I see the same address as above, BUT under "DNS Addresses - 1 server" I see 103.86.96.100, i.e. the Static DNS 1 in the setup.

In both cases the VPN server is pushing the same DNS to OpenVPN client:
Quote:
PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,sndbuf 524288,rcvbuf 524288,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,route-gateway 10.7.7.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.7.7.180 255.255.255.0,peer-id 0,cipher AES-256-GCM'


If I follow your suggestion to add the code you wrote to Additional DNSMasq Options, where would I change the DNS server directives?

I am trying to configure the DD-WRT router in such a way that a LAN machine's DNS server would be the same as router's public IP address, while the router's DNS remain as they are.

I hope it does not look too confusing.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum