# Using OpenVPN with NAT IPv4



## trexos (Jun 23, 2013)

Hello,

I have a LowEndSpirit VPS and I would like to use it as VPN. I used this script: https://github.com/Nyr/openvpn-install and it worked on all of my other VPS, but it seems that there is a problem with the NAT IPv4. I would like to use the VPN because in Germany it's not possible to watch all YouTube videos for example Vevochannels. If I check the geolocation it says I'm from Netherlands, but I can't watch YouTube the videos, because it says it's not possible to watch them from Germany. I've already tried different browser and of course I've cleared all cookies and I've deleted the cache too. At the LowEndSpirit forums I created a thread too: http://forum.lowendspirit.com/viewtopic.php?pid=1022

Does anyone have an idea?

Thanks in advance!


----------



## acd (Jun 23, 2013)

Use an ip check thing like ifconfig.me or ipaddr.re to make sure your IP is being NATted to the IP you expect. Then check your DNS settings are set to those at the VPS endpoint after you connect to openvpn.


----------



## trexos (Jun 23, 2013)

All these sites say that my IP is the NATted IP. I can surf over it, the only problem is YouTube knows somehow that I'm from Germany 

What do you mean with the DNS settings sentence? I don't know what to do.


----------



## acd (Jun 23, 2013)

From windows, if you type ipconfig /ALL in a cmd prompt. Under your VPN adaptor (mine is TAP-Win32 Adapter V9), it will say DNS Servers. These should either be some anycast DNS like Google DNS, or they should be the DNS servers your VPS provider offers. They should not be the DNS servers used by your ISP and they should not be unset.


----------



## trexos (Jun 24, 2013)

I checked it with the network center in windows and indeed, the DNS was set to "automatical". I've set it now to 8.8.8.8 and 8.8.4.4, but it whoer.net says DNS:

74.125.18.214

Germany

When I use a Geolocation tool it says:

*IP-Adresse:*

 

74.125.18.214

*Provider:*

 

Google

*Organisation:*

 

Google Translate

*Region:*

 

Berlin (DE)






I'm a bit confused, but the problem is I can't watch Vevochannels from Germany 

btw: Sometimes I have an UK DNS IP adress too, but it doesn't change anything. Here is a screen: http://i.imagebanana.com/img/9igttpk3/20130622_191402.png


----------



## acd (Jun 24, 2013)

Consider getting a VPS inside the US. It doesn't look like it's solvable from your current VPS provider.


----------



## johnlth93 (Jun 24, 2013)

Can Netherlands watch these particular videos you mentioned?

-Edit-

read your post on LES forum, seem that you resolve youtube via ipv6

why don't you disable ipv6 of your internet adapter

by that you should be able to resolve youtube via ipv4 (vpn in this case)


----------



## happel (Jun 24, 2013)

Has nothing to do with you being in Germany, I'm in the Netherlands and youtube is in German for me when I'm connected via my lowendspirit vpn. I guess youtube needs to update their geolocation information.


----------



## earl (Jun 24, 2013)

I don't think you need to use VPN just to watch youtube.. follow this guide and see if it works..

http://blog.ashurex.com/2012/03/15/creating-ssh-proxy-tunnel-putty/

Tunneling with putty would save you a lot of memory since you don't need to install anything on your VPS


----------



## mikho (Jun 24, 2013)

johnlth93 said:


> Can Netherlands watch these particular videos you mentioned?
> 
> 
> -Edit-
> ...


In that thread it was tried to disable ipv6.


I sen him here in hopes that a "master of vpn" should be able to help. But it looks like youtube thinks that the IP is in Germany. Or they they marked it as a proxy ip and uses something to find the real IP of the user.


----------



## johnlth93 (Jun 25, 2013)

mikho said:


> In that thread it was tried to disable ipv6.
> 
> 
> I sen him here in hopes that a "master of vpn" should be able to help. But it looks like youtube thinks that the IP is in Germany. Or they they marked it as a proxy ip and uses something to find the real IP of the user.


I see, i din't really read the whole thread @ LES (just scroll through  )

I will double check with that LES @ NL and will get back to TS


----------



## happel (Jun 25, 2013)

earl said:


> I don't think you need to use VPN just to watch youtube.. follow this guide and see if it works..
> 
> http://blog.ashurex.com/2012/03/15/creating-ssh-proxy-tunnel-putty/
> 
> ...


meh. Maybe you can save time and disk space, but memory? I wouldn't be so sure. My openvpn server uses only 3M of memory per logged on user, a ssh tunnel on the same server consumes 5.5M. You do the math ;-).


----------



## earl (Jun 25, 2013)

happel said:


> meh. Maybe you can save time and disk space, but memory? I wouldn't be so sure. My openvpn server uses only 3M of memory per logged on user, a ssh tunnel on the same server consumes 5.5M. You do the math ;-).


That's if you use your VPS for just a VPN..but I do a variety of things on my VPS that I normally have a putty session open anyways, so installing openVPN to watch youtube would just be redundant..


----------



## D. Strout (Jun 25, 2013)

Is it possible the request to YT is going out over IPv6 from the VPS? I know YT supports IPv6, but the geolocation on IPv6 blocks is messed up because it's so new and _huge_.


----------



## happel (Jun 25, 2013)

earl said:


> That's if you use your VPS for just a VPN..but I do a variety of things on my VPS that I normally have a putty session open anyways, so installing openVPN to watch youtube would just be redundant..


In that case you can indeed save a couple of megabytes of memory by using ssh .


----------



## happel (Jun 25, 2013)

D. Strout said:


> Is it possible the request to YT is going out over IPv6 from the VPS? I know YT supports IPv6, but the geolocation on IPv6 blocks is messed up because it's so new and _huge_.


The version of openvpn I'm using doesn't support IPv6.


It's just the geolocation of youtube being wrong.


----------



## mikho (Jun 25, 2013)

D. Strout said:


> Is it possible the request to YT is going out over IPv6 from the VPS? I know YT supports IPv6, but the geolocation on IPv6 blocks is messed up because it's so new and _huge_.


At first it was ipv6 (tried with wget). Then disabled ipv6 to test. Same result.


Perhaps e should ask the most common question, did you clear the browsers cache and cookie?


----------



## happel (Jun 25, 2013)

It's just youtube's geolocation being silly.


I'm Dutch, but get the german youtube when using my vpn. Everything else on the internet understands that the ip of the vps is in the Netherlands.


----------



## acd (Jun 25, 2013)

iirc, openvpn supports ipv6 on TAP since tap support was added (1.x series), and in TUN since 2.3. Switch adapter types if you need ipv6.


----------



## mikho (Jun 25, 2013)

happel said:


> It's just youtube's geolocation being silly.
> 
> 
> I'm Dutch, but get the german youtube when using my vpn. Everything else on the internet understands that the ip of the vps is in the Netherlands.


This is most likely the reason why it won't work. I would ask Anthony for a change to the uk node instead of the NL one. Ask on lowendspirit forum and I'm sure it will be ok if there is room on the UK node.


----------



## johnlth93 (Jun 26, 2013)

happel said:


> It's just youtube's geolocation being silly.
> 
> 
> I'm Dutch, but get the german youtube when using my vpn. Everything else on the internet understands that the ip of the vps is in the Netherlands.


http://forum.lowendspirit.com/viewtopic.php?pid=1026#p1026

Get one LES @ UK and you should be fine.


----------



## happel (Jun 26, 2013)

mikho said:


> This is most likely the reason why it won't work. I would ask Anthony for a change to the uk node instead of the NL one. Ask on lowendspirit forum and I'm sure it will be ok if there is room on the UK node.


This might be a good solution for the OP, for me it won't be necessary, I only use this vpn when I'm on the go accessing the internet through shady unprotected wifi. (I'm actually very happy with the service )


----------



## trexos (Jun 26, 2013)

Hello,

So first thanks for your answers! I searched a bit and wikipedia says that vevo.com should be available from Netherlands, thats why I think I should be able to watch the Vevo videos on youtube too. I tested it, at vevo.com I can watch the videos over my VPN. From Germany not.

I think it's a geolocation bug from YouTube.

@ the dutch people, can you watch this video:






In germany and with the VPN I can't.


----------



## happel (Jun 26, 2013)

That video loads just fine for me.


----------



## trexos (Jun 26, 2013)

With my NL VPN I can't watch it, as usual it says something like "This video is not available from Germany because some problems with the GEMA"


----------



## mikho (Jun 26, 2013)

trexos said:


> With my NL VPN I can't watch it, as usual it says something like "This video is not available from Germany because some problems with the GEMA"


Post a request on Lowendspirit forum if you change from NL to UK. The latency wouldn't matter much for watching youtube.


----------



## trexos (Jun 26, 2013)

I got banned there because I linked a file upload (I think thats why). Have to wait until I get unblocked (if this happens  ). Till then I try to get it working.


----------



## mikho (Jun 26, 2013)

I'll unban in a few minutes.


----------



## trexos (Jun 29, 2013)

I bought a 2nd UK server and YouTube works perfectly from this, so the problem is solved  Thanks for all your great answers!


----------



## trexos (Jul 1, 2013)

Short update: tried to download the youtube video, which didn't work via VPN, with youtube-dl (http://rg3.github.io/youtube-dl/download.html) and it worked. I don't get it


----------



## mikho (Jul 1, 2013)

trexos said:


> Short update: tried to download the youtube video, which didn't work via VPN, with youtube-dl (http://rg3.github.io/youtube-dl/download.html) and it worked. I don't get it


From you NL vps?


Probably because it goes straight to the source and doesnt load the part from youtube that checks for the country.


Try it from home and see if it works there aswell.


----------



## trexos (Jul 2, 2013)

I tried it with my german VPS, didn't work. It said something with GEMA.


----------

