1

Being behind a 4G-ISP with CGNAT, I can't connect to my QNAP 269L NAS from the internet. I have set up a Raspberry 3B+ as a VPN-server (PiVPN) at a friend's place, with a fast internet connection. I have a DDNS (NoIP) on the PiVPN-server, and by typing that I would like to end up at my NAS, from out on the net. Could some of you bright people please give me a step-by-step instruction on how to set up this? If I have understood days of googling right, I need to set up reverse proxy'ing, and some sort of port forwarding on the piVPN-server, and iptables, but I haven't been able to get anything working, due to lack of knowledge... Thank you very much in advance, Mitscha, Denmark

1 Answer 1

0

I do quite a lot with VPNs, but not exactly your setup. I don't think reverse proxying is needed.

In theory, you should be able to install your Pi at your friends (where I assume you have also placed your QNAP, otherwise this won't work, Pi and QNAP need to be on the same network). Your DDNS should point to your fiends router. You will need to open the VPN ports on the router, and have them forwarded to your Pi.

Assuming that you are using openvpn, you would usually forward port 1194 (as openvpn works on either UDP or TCP, probably best you forward it for both). Your Pi needs to be on a fixed IP address. You would forward 1194 on the router to the ip address of your Pi.

You can save your self a world of trouble by make sure that the subnet of the lan you are connecting from is different to the subnet of the lan you are connecting to. I.e. your friends network is something like 192.168.1.x and your network is 192.168.0.x

It sounds like you already have the VPN setup on the Pi, so just on the lan, try connecting to it using the Pi's ip address. Then you know you can connect to the Pi.

Once you have made the router changes, it should hopefully be as simple as connecting to the Pi from the internet, that should give you access to your friends lan, and in turn you QNAP (which should also have a fixed IP).

I am sorry this is somewhat generic, but I know noting about any of the other parts in your setup. It should hopefully at least get you on the right path.

Thanks

1
  • 1
    Thank you very much for your elaborate answer! This is an example of how important it is to pose the right question, when one wants a good answer...I forgot to say that the Qnap is also used as a recorder for some security videocamaras, and must therefore be placed behind the CGNAT. Thank you again! Commented Mar 4, 2020 at 9:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .