# \[GL-MT300N-V2\] openVPN setup

**URL:** <https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646>\
**Category:** Router\
**Created:** [May 23, 2018, 8:00am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646 "2018-05-23T08:00:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 23, 2018, 8:00am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/1 "2018-05-23T08:00:46Z")

</div>

I’m trying to setup the router to enable openVPN client connection but here’s what happens:

- I’ve downloaded the nordVPN configuration file
- I’ve uploaded the file to the router using the appropriate page
- after a couple of minutes the file is processed and a popup window shows up asking for my credentials
- after writing username and password I click “submit”
- this time it takes about 10 minutes but everything works and the status is “connected”  
Everything should be fine but when I try to navigate as example on google I get:  
“www.google.it refused to connect”  
What did I do wrong?

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 10:10am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/2 "2018-05-23T10:10:56Z")

</div>

Hi @psigli

The issue is with the DNS not updating correctly. Try doing this:

> [@AR750 as OpenVPN client, no DNS for far network](https://forum.gl-inet.com/t/ar750-as-openvpn-client-no-dns-for-far-network/3342/13):
>
> Here is a copy and paste solution, just change the name of your client config file, paste into the ssh connection and it will do the rest: cat\<\<'EOF' \>\> /etc/openvpn/\<YOUR\_CLIENT\_FILE\_NAME\>.ovpn script-security 2 up /etc/openvpn/updns down /etc/openvpn/downdns EOF cat\<\<'EOF' \> /etc/openvpn/updns #!/bin/sh mv /tmp/resolv.conf.auto /tmp/resolv.conf.auto.hold echo $foreign\_option\_1 | sed -e 's/dhcp-option DOMAIN/domain/g' -e 's/dhcp-option DNS/nameserver/g' \> /tmp/resolv.conf.auto echo $foreign\_o…

You will need to connect to your router with SSH, that is quite easy. You can use a free program called putty, just set it to the new ip you set in the other thread ;). Log in as root with the same password as the admin pages and then paste those commands from the other thread, replacing the filename of your config; its the same name as when you uploaded. Press enter in the SSH after the last command.

The benefit of the scripts i linked is that you always get the latest DNS, and avoid leaks. You could also just set the DNS from NordVPN in the GL-iNet interface but i don’t recommend that.

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 23, 2018, 1:06pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/3 "2018-05-23T13:06:40Z")

</div>

Thank you, now it works!  
If you don’t mind why you don’t recommend using nordVPN DNS?

For my future reference:

cat\<\<‘EOF’ \>\> /etc/openvpn/\<YOUR\_CLIENT\_FILE\_NAME\>.ovpn  
script-security 2  
up /etc/openvpn/updns  
down /etc/openvpn/downdns  
EOF

cat\<\<‘EOF’ \> /etc/openvpn/updns  
#!/bin/sh  
mv /tmp/resolv.conf.auto /tmp/resolv.conf.auto.hold  
echo $foreign\_option\_1 | sed -e ‘s/dhcp-option DOMAIN/domain/g’ -e ‘s/dhcp-option DNS/nameserver/g’ \> /tmp/resolv.conf.auto  
echo $foreign\_option\_2 | sed -e ‘s/dhcp-option DOMAIN/domain/g’ -e ‘s/dhcp-option DNS/nameserver/g’ \>\> /tmp/resolv.conf.auto  
echo $foreign\_option\_3 | sed -e ‘s/dhcp-option DOMAIN/domain/g’ -e ‘s/dhcp-option DNS/nameserver/g’ \>\> /tmp/resolv.conf.auto  
EOF

cat\<\<‘EOF’ \> /etc/openvpn/downdns  
#!/bin/sh  
mv /tmp/resolv.conf.auto.hold /tmp/resolv.conf.auto  
EOF

chmod 755 /etc/openvpn/updns  
chmod 755 /etc/openvpn/downdns

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 1:09pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/4 "2018-05-23T13:09:05Z")

</div>

No, you have the NordVPN DNS now too, what i mean is i don’t recommend that you set it manually, since they can change their DNS at random.

Now you have the NordVPN DNS on demand via the scripts, it sets it to the latest one when you connect, automatically.

Test here and see if all is ok:

> **[DNS Leak Tests](https://dnsleak.com/)**
>
> DNS Leak Test is a free tool for the internet allowing end users to test their DNS activity to see if their VPN or Proxy service is leaking DNS requests, effectively unmasking end user's privacy and security.

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 23, 2018, 1:32pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/5 "2018-05-23T13:32:18Z")

</div>

Ok, now I get it.  
But when I run the test the result is:

DNS Leak Test  
Looks like your DNS might be leaking…

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 2:06pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/6 "2018-05-23T14:06:10Z")

</div>

Do the test without the VPN on too, are the DNS different? If so then its fine.  
Also compare to the DNS that NordVPN writes on their site, it should be the same one.

[https://nanorep.nordvpn.com/Other/1047409702/What-are-your-DNS-server-addresses.htm](https://nanorep.nordvpn.com/Other/1047409702/What-are-your-DNS-server-addresses.htm)

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 23, 2018, 2:23pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/7 "2018-05-23T14:23:08Z")

</div>

The DNS are different when I run the test without the vpn, but they are not the same as those written on NordVPN site.  
Do you think it’s a problem? Should I set them manually?

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 2:35pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/8 "2018-05-23T14:35:01Z")

</div>

It’s easy to check the IP of the DNS’ that you got via the scripts online. It might just be that you are getting a more local DNS server than the one on their site, that could be for US for example (if you are somewhere else

Post the DNS here if you want i can check it.

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 23, 2018, 2:49pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/9 "2018-05-23T14:49:14Z")

</div>

Here they are (with VPN on):  
74.125.73.67  
74.125.47.138  
74.125.47.137

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 4:55pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/10 "2018-05-23T16:55:57Z")

</div>

Hmm those ip’s are registered to Google. If you try another browser do you get the same ones?

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 23, 2018, 5:32pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/11 "2018-05-23T17:32:48Z")

</div>

Google? During that test I was using chromium.  
Here is the test result using konqueror:  
74.125.73.88  
74.125.47.130  
74.125.73.68

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 5:44pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/12 "2018-05-23T17:44:22Z")

</div>

Still the same, more google dns ip’s.  
If you feel that google is secure enough, keep those. If not, then i guess you should in your case with NordVPN set them manually.

It’s up to you?

---

<div class="post-metadata">

**Author:** ![kennethrc](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/kennethrc/32/833_2.png) [@kennethrc](https://forum.gl-inet.com/u/kennethrc)\
**Post date:** [May 23, 2018, 8:24pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/13 "2018-05-23T20:24:27Z")

</div>

Remember guys, SOMEONE has to be your DNS provider, so [dnsleaktest.com](http://dnsleaktest.com) will _always_ show some IPs for DNS. What you don’t want is your DNS provider to be your ISP, if you’re worried that they’ll try and correlate your DNS activity to your VPN activity (which is actually not all that much to be worried about, IMO).

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 8:30pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/14 "2018-05-23T20:30:40Z")

</div>

Yeah that is totally correct. He didn’t get his ISP DNS so he is technically all good. I just ask cos some people think google is kind of bad too, but there is always Cloudflare for example too.

---

<div class="post-metadata">

**Author:** ![kennethrc](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/kennethrc/32/833_2.png) [@kennethrc](https://forum.gl-inet.com/u/kennethrc)\
**Post date:** [May 23, 2018, 8:35pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/15 "2018-05-23T20:35:27Z")

</div>

I’m reluctant to suggest Cloudfare to newbies as it turns out that some vendors (and more than one hotel I’ve visited) are violating RFCs and using 1.0/8 as internal, non-routeable addresses (i.e., on AT&T U-Verse) so queries on 1.1.1.1 don’t make it out onto the network ☹

---

<div class="post-metadata">

**Author:** ![Johnex](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/johnex/32/300_2.png) [@Johnex](https://forum.gl-inet.com/u/Johnex)\
**Post date:** [May 23, 2018, 8:42pm UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/16 "2018-05-23T20:42:31Z")

</div>

Yeah you are right. I did a quick look and i couldn’t find any alternative DNS ips for Cloudflare, which is a shame.

Anyway, Google DNS is good enough, they also only save logs for 24 hours or something like that, i read about it somewhere. Also the sheer number of requests google gets means that any request you make will be hidden in the sea of data, so in that way you get even higher security i would say, compared to a smallish DNS service that can be potentially hacked.

BTW, AT&T said it was a mistake they blocked it and they would fix it, or have fixed it 😃

> **[AT&T explains why it blocked Cloudflare DNS: It was just an accident](https://arstechnica.com/information-technology/2018/05/att-is-blocking-cloudflares-privacy-focused-dns-calls-it-an-accident/)**
>
> AT&T blames "unintentional IP address conflict," promises to fix it.

---

<div class="post-metadata">

**Author:** ![Exile1975](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@Exile1975](https://forum.gl-inet.com/u/Exile1975)\
**Post date:** [May 24, 2018, 12:36am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/17 "2018-05-24T00:36:52Z")

</div>

Did you add the dhcp-option DNS nord.dns.here line into your ovpn file? Without this line pointing to Nords dns server the scripts won’t change to them.

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 24, 2018, 6:16am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/18 "2018-05-24T06:16:22Z")

</div>

Nope, I didn’t. I’m a noob.  
Could you please tell me where exactly should I add that line?

---

<div class="post-metadata">

**Author:** ![Exile1975](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@Exile1975](https://forum.gl-inet.com/u/Exile1975)\
**Post date:** [May 24, 2018, 6:31am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/19 "2018-05-24T06:31:55Z")

</div>

I don’t know the dns for Nord, but in your ovpn file that you get from them. Open it and add in the line dhcp-option DNS add.res.she.re before the security certificates. Then upload it to the router and try.

Edit try these two lines:

dhcp-option DNS 103.86.96.100  
dhcp-option DNS 103.86.99.100

---

<div class="post-metadata">

**Author:** ![psigli](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@psigli](https://forum.gl-inet.com/u/psigli)\
**Post date:** [May 24, 2018, 7:00am UTC](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646/20 "2018-05-24T07:00:15Z")

</div>

Ok thanks, but writing them in the ovpn file wouldn’t be the same as configuring them through the router’s interface?

[Next page](https://forum.gl-inet.com/t/gl-mt300n-v2-openvpn-setup/3646.md?page=2)
