Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

**VIDEO GUIDE** How to setup a virtual VPN router to route any device through a vpn

Featured Replies

Hi, Guys here's a tutorial on how to build your own VM VPN router on unRAID. This will allow you to route any device in your home through a VPN while leaving others through your regular internet. Great if you want to run your tv through a VPN for geo locked services. Hope you find it useful :)

 

 

 

  • 2 weeks later...

Could I setup a docker image to run through this router?

  • 1 month later...

Saw  this on youtube and wanted to give it a try. Ran through all the steps with ease but ran into one issue.   After everything was setup running through the VPN with no DNS leaks detected rebooting the VM would break everything.  Took me a while to figure it out but finally found that on reboot, the VM could not resolve the DNS of the VPN host.  It's couldn't resolved any DNS for that matter.  nslookups would fail.  

 

I imagine this is due to the dns leak fix that sets the dns from the vpn tunnel, but because the vpn tunnel cannot be established the dns is never set.  

 

Not sure if this was the right was to do this or not but this is what I did.  

 

sudo nano /etc/resolvconf/resolv.conf.d/base

#Add the following line - mine was balnk, adjust ip for ip of your VM.

nameserver 192.168.1.254 

Crtl+O, Enter, Ctrl+X

 

Then, 

sudo nano /etc/network/interfaces

#Adjust dns--nameservers to the following - adjust ip for ip of your vm

dns-nameservers 192.168.1.254

Crtl+O, Enter, Ctrl+X

 

sudo reboot

 

Then ifconfig to check the tunnel was up, nslookup google.com to ensure DNS was working.  And finally checked PIA to show I was connected through tunnel and http://dnsleak.com/ to make sure no dns leaks were detected.  

 

Not sure why this happened or if I missed something in the tutorial or even if this is the right way to fix it but it worked for me.  Maybe someone with a little more knowledge on the topic can comment on this. @gridrunner you following this thread still?  

 

Also on a side note, removing the dnsmasq package and rebooting brought everything back up but the DNS leak still persisted.  Reinstalling dnsmasq would then correct the dns leak if I remember right (it's late) but then on reboot it would all quit again.  

 

I plan on adjusting the DCHP service on my pfsense box tomorrow to hand out the gateway and DNS of the VPN VM so everything connected to my network is routed through the tunnel to see how it goes.  The nice thing then is everything is included in the VPN tunnel by default, but if I want to exclude a device, I just set a static ip with the gateway and DNS from my pfsense box to bypass the tunnel.  That is the thought anyway. 

 

Hope this helps if anyone else tries this out and runs into the same problem.  

 

Also, it would be awesome to see something like this as a docker image.

 

And gridrunner, keep up the amazing videos.  I think I have watched most more than once!!!   

 

 

  • 3 months later...

Having a issue with DNS leak after watching and rewatching video - Is this the best place for assistance

  • 6 months later...

Hi spaceinvader one,

 

I followed your guide and my proxy is working flawlessly. Great instructional video.

 

Quick question: What ports do I use when forcing a web browser through the router's ip?

 

For example, I want to use Vivaldi has my VPN protected web browser on my desktop. I downloaded several extensions and I can't seem to get any of them to work.

 

I'm using the IP we set up as our virtual router, which works perfectly when applied in my Windows IPV4 settings for my entire desktop.

 

1) Does it have something to do with the specific ports I'm trying  to use? Most extensions want HTTP, HTTPS, FTP ports, and the default ones do not work properly.

 

2) How do I point specific dockers to this VPN Router's address for VPN protection? Google searches yield "you can't use different IP address per each Unraid Docker".

 

Thanks again ?

 

 

 

 

Edited by bmilcs

  • 1 year later...

Hey guys,

I have been using this and it's been working perfectly. But I recently switched from PIA to Mullvad and I Cannot get this to work. I updated the username and password and moved the new mullvad config files to the new directory, but just can't get this to work. Can someone help me out please?

Struggled all day and just can’t get it to work with Mullvad vpn. 
seems like the mullvad vpn config files are missing one of the files that came with PIA OpenVPN set up. I just can’t get this to work now. 
 

@SpaceInvaderOne or any one else. Any advice on how to get this working?

Anyone?

edit

Edited by maxse

edit

Edited by maxse

  • 2 weeks later...

edit

Edited by maxse

On 12/9/2019 at 6:38 AM, maxse said:

Just couldn’t get this working. 
looks like I’ll have to spend some money and buy a router that could do vpn. Really sucks that I can’t get mullvad to work with this especially since it’s also openvpn Supported.

no one is using it huh?

 

My suggestion if you're spending money on a new router is get a small embedded PC and run pfSense on it. You will get a much more flexible solution than any out of the box router.  I use the built in pfSense VPN client to route specific traffic via Mullvad VPN, and also use the Mullvad port forwarding feature.

 

I have one of these, in a case, cost about USD100

https://pcengines.ch/apu2.htm

 

Anything with 2 NIC's will do though really.  PC Engines have a bunch of options https://www.pcengines.ch/newshop.php?c=4

 

There's also a bunch of pfSense provided options https://www.pfsense.org/products/ - the SG1100 is pretty good value at $179.

 

Mine gets its internet via an old ADSL2 modem in bridge mode (hopefully by fibre box soon!).  I just use my old router as a Wifi access point, but you could get something fancier like UniFi or Google Wifi.  The point is each device (Modem/NTU, Wifi AP, Router) does something specific very well, and then you can individually upgrade them if needed.

 

You can also run pfSense in a VM if you want to test it out, but I think it's better for your internet access to be independent of your unraid server.

 

 

Edited by jammin

GOT IT WORKING! Thanks so much spaceinvaderone! You are THE man!

It was a different port that I need to open (part of the iptables commands) 1197 and not 1198.

I did accidentally open the PIA port by copy and pasting your commands before realizing I needed different port.

But I don't know how to close the PIA one that I opened. Do I need to worry about this? Or does it get closed on reboot sicne I saved the new iptables, after correcting it? @SpaceInvaderOne

 

Also, I am still getting a DNS Leak when tested on the web site. and those last 2 lines of code to the conf file were already a part of the mullvad conf file. Should I be concerned about this? I don't know why it's still showing that my DNS is leaking

 

*EDIT*

BTW, in order to save this exact vm and setting, I can just use the CA backup plugin I've been using and just select a destination for libvert.img correct?

 

This is amazing, thank you so much!

Edited by maxse

  • Author

Hi @maxse I am glad that you got it all working with mulvad

If you want to backup the vm. Manually backup the vdisk for it that you will find in the domains share   /mnt/user/domains

The libvirt image just contains the xml for the vm not its 'contents'

 

I will be making a new video for a virtual router that will be much easier to configure very soon. :)

Thanks bud, you're the man! Love your videos. 

  • 2 months later...

I've just got this running, but can anyone tell me if it's possible to route your dockers through the VPN VM (e.g. the standard version of qbittorrent) ?

 

Seen this question asked multiple times, but no one's ever given an answer.

On 12/12/2019 at 12:09 PM, SpaceInvaderOne said:

Hi @maxse I am glad that you got it all working with mulvad

If you want to backup the vm. Manually backup the vdisk for it that you will find in the domains share   /mnt/user/domains

The libvirt image just contains the xml for the vm not its 'contents'

 

I will be making a new video for a virtual router that will be much easier to configure very soon. :)

How soon is soon!? I'm very very excited for that. I'm struggling with this now as I think a few things have changed. Can't wait!

  • Author

Hi @NoxeyI have a couple of videos i must finsish first. But i will try and make it for the end of the month. Send me a pm towards the end of the month to remind me :)

23 hours ago, SpaceInvaderOne said:

Hi @NoxeyI have a couple of videos i must finsish first. But i will try and make it for the end of the month. Send me a pm towards the end of the month to remind me :)

Fantastic. Thank you, can't wait! I'm currently struggling to adjust the .conf file as I think things have changed since your initial video. Having issues getting it to work. 

 

Thanks for your response and all of your videos. You're fantastic. 

 

  • 4 weeks later...
On 3/9/2020 at 2:22 PM, SpaceInvaderOne said:

Hi @NoxeyI have a couple of videos i must finsish first. But i will try and make it for the end of the month. Send me a pm towards the end of the month to remind me :)


Thanks for this as well. I was having issues getting this version up and running and was wondering if there was another way to do this. Found this thread and am happy to see an update/rework is coming!

Thanks for the video mate. When I test the config i get auth-failed I have setup the login file with my correct PIA username and password. Any ideas?

7 hours ago, Theldron said:

i get auth-failed I have setup the login file with my correct PIA username and password. Any ideas?

Try using only alpha numeric for your password.

  • 3 weeks later...
On 4/10/2020 at 2:36 PM, jonathanm said:

Try using only alpha numeric for your password.

Thanks, but my PIA password is already just numbers and letters mate.

  • 2 months later...
On 3/9/2020 at 2:22 PM, SpaceInvaderOne said:

Hi @NoxeyI have a couple of videos i must finsish first. But i will try and make it for the end of the month. Send me a pm towards the end of the month to remind me :)

Hey there! Did you ever make this updated video? I can't seem to find it on your profile. Now that NBA is back I want to put my Apple TV on a VPN in Ireland to make it easier to watch games!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.