yorgi
Very Senior Member
I wanted to make a post of my findings and hopefully people can benefit from this.
These tests where made with 66u 68u 87u ASUS routers
With the original ASUS firmware when a client connects to the VPN the router gets an IP from the server and its DNS
I made a few tests with PIA and OpenVPN software and a router with Tomato firmware.
When connecting with any of the above methods and you test with ipleak.net you will see that the IP and DNS address are the same as the VPN server.
when one connects with the Merlin firmware and VPN client the IP address is from the VPN but the DNS is not the same as the IP address it shows as the DNS from the VPN Server.
these tests where done with PIA. I messaged them and asked them if it was normal and they said as long as you have an IP and a DNS that is from PIA you are safe. so I guess this is not a bug but its just the way the dns is resolved with Merlin.
If you use selective routing and you have one or more clients enabled, when you go to Local ISP
the DNS will not be from your local internet provider but instead it is the one from the VPN provider.
I would assume that would be because with the original firmware from ASUS when you start a vpn client the dns is the VPN and when you close the VPN client the DNS is the local ISP therefore it makes sense that its hardwired that way and maybe its not doable to have 2 different DNS when more then one service is activated.
My work around is the following.
Place the following DNS address to your NIC adapter when using PIA VPN and when you go to ipleak.net you will see that you will get IP and DNS address as with PIA, openvpn software or tomato
for PIA the DNS is ;
209.222.18.218
209.222.18.222
If you are using selective routing and you go to your Local ISP
change the DNS to google DNS or whatever dns you like.
8.8.8.8
8.8.4.4
This way when you surf with Local ISP your DNS is not going to be from your VPN and when you surf with the VPN the DNS will work properly.
here is a script you can use for windows to switch from VPN to Local ISP
Change "Ethernet" to match your NIC adapters name.
I used 192.168.1.97 for selective routing in the router. so when I go to that IP its VPN
any other IP DHCP or static will fall into local ISP
The A: choice uses PIA DNS address. please change these address according to your VPN provider.
also I used google DNS for Local ISP
you can use Norton or OpenDNS, its as you please.
Copy the script to a txt file and rename it to VPN.bat and place it in your documents.
create a shortcut and run as admin and copy the shortcut to your desktop for easier use.
@echo off
echo Choose:
echo [A] VPN
echo Local ISP
echo.
:choice
SET /P C=[A,B,]?
for %%? in (A) do if /I "%C%"=="%%?" goto A
for %%? in (B) do if /I "%C%"=="%%?" goto B
goto choice
:A
@echo off
ipconfig /flushdns
netsh interface ip set address name = "Ethernet" source = static addr = 192.168.1.97 mask = 255.255.255.0 gateway = 192.168.1.1
netsh interface IPv4 set dnsserver "Ethernet" static 0.0.0.0 both
netsh interface ipv4 add dnsserver "Ethernet" 209.222.18.218 index=1
netsh interface ipv4 add dnsserver "Ethernet" 209.222.18.222 index=2
goto end
:B
@ECHO OFF
ipconfig /flushdns
netsh int ip set address name = "Ethernet" source = dhcp
netsh interface ipv4 add dnsserver "Ethernet" address=8.8.8.8 index=1
netsh interface ipv4 add dnsserver "Ethernet" address=8.8.4.4 index=2
goto end
:end
ipconfig /renew Ethernet
I also included a jpg of the configurations for VPN with PIA on merlin
in the Authorization mode click content of modifications of keys & certificates
and paste the certificate from your VPN provider in the certificate authority section.
if anyone has a better way to do this script I am open to suggestions
enjoy
These tests where made with 66u 68u 87u ASUS routers
With the original ASUS firmware when a client connects to the VPN the router gets an IP from the server and its DNS
I made a few tests with PIA and OpenVPN software and a router with Tomato firmware.
When connecting with any of the above methods and you test with ipleak.net you will see that the IP and DNS address are the same as the VPN server.
when one connects with the Merlin firmware and VPN client the IP address is from the VPN but the DNS is not the same as the IP address it shows as the DNS from the VPN Server.
these tests where done with PIA. I messaged them and asked them if it was normal and they said as long as you have an IP and a DNS that is from PIA you are safe. so I guess this is not a bug but its just the way the dns is resolved with Merlin.
If you use selective routing and you have one or more clients enabled, when you go to Local ISP
the DNS will not be from your local internet provider but instead it is the one from the VPN provider.
I would assume that would be because with the original firmware from ASUS when you start a vpn client the dns is the VPN and when you close the VPN client the DNS is the local ISP therefore it makes sense that its hardwired that way and maybe its not doable to have 2 different DNS when more then one service is activated.
My work around is the following.
Place the following DNS address to your NIC adapter when using PIA VPN and when you go to ipleak.net you will see that you will get IP and DNS address as with PIA, openvpn software or tomato
for PIA the DNS is ;
209.222.18.218
209.222.18.222
If you are using selective routing and you go to your Local ISP
change the DNS to google DNS or whatever dns you like.
8.8.8.8
8.8.4.4
This way when you surf with Local ISP your DNS is not going to be from your VPN and when you surf with the VPN the DNS will work properly.
here is a script you can use for windows to switch from VPN to Local ISP
Change "Ethernet" to match your NIC adapters name.
I used 192.168.1.97 for selective routing in the router. so when I go to that IP its VPN
any other IP DHCP or static will fall into local ISP
The A: choice uses PIA DNS address. please change these address according to your VPN provider.
also I used google DNS for Local ISP
you can use Norton or OpenDNS, its as you please.
Copy the script to a txt file and rename it to VPN.bat and place it in your documents.
create a shortcut and run as admin and copy the shortcut to your desktop for easier use.
@echo off
echo Choose:
echo [A] VPN
echo Local ISP
echo.
:choice
SET /P C=[A,B,]?
for %%? in (A) do if /I "%C%"=="%%?" goto A
for %%? in (B) do if /I "%C%"=="%%?" goto B
goto choice
:A
@echo off
ipconfig /flushdns
netsh interface ip set address name = "Ethernet" source = static addr = 192.168.1.97 mask = 255.255.255.0 gateway = 192.168.1.1
netsh interface IPv4 set dnsserver "Ethernet" static 0.0.0.0 both
netsh interface ipv4 add dnsserver "Ethernet" 209.222.18.218 index=1
netsh interface ipv4 add dnsserver "Ethernet" 209.222.18.222 index=2
goto end
:B
@ECHO OFF
ipconfig /flushdns
netsh int ip set address name = "Ethernet" source = dhcp
netsh interface ipv4 add dnsserver "Ethernet" address=8.8.8.8 index=1
netsh interface ipv4 add dnsserver "Ethernet" address=8.8.4.4 index=2
goto end
:end
ipconfig /renew Ethernet
I also included a jpg of the configurations for VPN with PIA on merlin
in the Authorization mode click content of modifications of keys & certificates
and paste the certificate from your VPN provider in the certificate authority section.
if anyone has a better way to do this script I am open to suggestions
enjoy
Last edited: