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

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

Hi Guys heres 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

Thank you again for posting such great instructional videos.

Any chance have you played with PiHole in a docker or through a VM?

Why did you change the bios?

So, I followed the whole guide… no major issues. The tunnel appears to be up and running. I can reach the outside world from the server (The RX/TX bytes count up on the tunnel interface in ifconfig after doing pings.) However, when I configure clients with the openvpn IP (with or without the DNS servers pointing at that IP), I can’t seem to get out. I can ping other clients inside the network but I can’t reach any external sites or IPs.

Someone mentioned a similar issue in the youtube comments but I haven’t seen any replies.

Hi spaceinvader,

Thanks for another great video.

A quick question, I normally use delugevpn and allow privoxy and pass over the Unraid iP address and port to my local machine and it tunnels the traffic fine through delugevpn.

Is this method better?

Is there a way to make this server a transparent proxy?
I have several subnets for a specific purpose. Can I just route all my hosts from different subnet to the proxy server instead of changing each host’s default gateway.

Dude, I just love you and your videos. Your no nonsense “hi guys” videos are just fantastic. You inspired me to really start paying attention to my server again. I’ve replaced nearly all my hard drives and built a damn good Ryzen box and doubled my RAM, got a new video card and boom…I’ll playing Doom 2016 on a VM essentially built by you. THANK YOU!

Yes that will be this or next week :slight_smile:

I find some Linux systems as VMS work better as seabios than ovmf so it’s more habit than anything. It isn’t necessary for the VPN to work

Try running curl ipinfo.io/ip and see if that is resolving the correct IP (VPN IP) If that works and you can’t get a client to resolve an address through the tunnel then check you have forwarding enabled correctly.
Should be no hash before net.ipv4.ip_forward = 1 . Then run sudo sysctl -p and see what it says. It should read net.ipv4.ip_forward = 1.
Other than that the problem could be with your ip tables. You can type sudo iptables -S this will list the tables.

If they dont look right then run sudo iptables -F
Then enter the tables again.
Also worth checking that the default gateway is the IP address of your VM you get when you run ifconfig

The deluge vpn is great and works well with the proxy. But some things you cant proxy. Its okay for web browser etc.
Also this is good for devices that you cant set things up like this in like a smart tv

no sorry this method requires the gateway to be the vpn router

Your welcome /u/allroy1975A glad that you like the videos. I really hope to build a Ryzen machine too soon.

Any chance of building off this video and utilizing the VPN server? Thanks again for sharing the knowledge.

Jesh, somehow I missed your response. Thanks so much for taking the time to help.

All looks good up until I do iptables -F, at which point…I don’t know iptables so I have no clue if it’s right or not. With that said, I went back and added each command directly from your text file one by one. Did a full reboot and I still see the same issues on the client.

On the client side, I confirmed the gateway IP is the same as the one that appears when I do an ifconfig on the ubuntu machine. The one I setup to be static.

From the client, I can ping that IP successfully. In fact, I can ping anything on my local network successfully.

I’m beginning to wonder if this is related to my VPN service. Here’s what’s listed under tun0:
tun0
Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.200.61.62 P-t-P:10.200.61.61 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:109 errors:0 dropped:0 overruns:0 frame:0
TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12641 (12.6 KB) TX bytes:9943 (9.9 KB)

Those 10. addresses seem a little weird to me. However, when I did curl ipinfo.io/ip, I got a VPN IP address so that means the link is up and running…I think.

I’m at a loss.

So, I’ve been messing with the VPN conf options on the theory that something was wrong there. Even though the tunnel was up, I suspect it isn’t configured properly. First thing I discovered, my VPN provider used port 1194 rather than 1198. I changed that in the ip tables. Still no go.

Then I discovered that your config file used tls-client and mine did not. I tried adding it but it failed to authenticate. Would you think that would make a difference?

Still, on the clients I get DNS resolution (probably because I have google DNS listed as a second DNS server on the client) but no response to ping from anything outside.

I just don’t get what I’m doing wrong.

Thank you for the reply. I understand and will use your guide :slight_smile:

Ha sorry, I know it’s late. But it will be soon. Really :wink:

Got it. Sorry to bother.

My ethernet interface was named enp2s1. I failed to adjust the iptables accordingly. Works great now. Thanks for the great video!