A
A
Anton2018-10-19 19:47:05
linux
Anton, 2018-10-19 19:47:05

How to make a public owncloud server behind NAT via VPS?

There is a home owncloud server that runs on a raspberry and is only available within the local network. I want to set up access via the Internet, and it is desirable that you can reach through the domain.
Am I getting the big picture right? The application on the phone knocks on the domain and the requests go to the VPS (I have already done this part, at least my machine is pinged on the domain). Next, a VPN server rises on this machine (here I’m not sure if vpn needs to be raised on this machine, because I need to somehow break through NAT). And then all requests go to the local owncloud server.
I already tried to set up vpn, it seemed to work. but I could not connect to raspberry (raspbian). And I tested it from Windows, everything connects, but there is no Internet (but this is a completely different story, it does not apply to the topic yet).
Actually questions:
1. correctly I represent to the general schemes of work?
2. Do I think I still need to do something on the remote machine so that it sends traffic to my owncloud?
3. Where do I need to deploy a vpn server?
4. Do I need a vpn at all, or are there other ways to break through NAT?
ps if at the same time the issue with setting up vpn is resolved, I will be very grateful :)
5bca090e49fd8301994740.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-10-19
@Tabletko

On a vps with a white ip, you raise a router and a VPN server on it. Malinka cling to the router via VPN. On the router, configure DST-NAT towards the raspberry. In dns, specify the ip of the router to the vps.

A
Alexey Cheremisin, 2018-10-19
@leahch

Install openvpn and make a tunnel.
On the VPS, into the tunnel, and further to the home computer (owncloud), you pass it through port forwarding, or set a reverse-proxy like nginx.
You can also tunnel through ssh.
And through IKEV2 and a bunch of others.
Oh yes, you can do without the tunnel! If you make a connection via IPv6 on the server with Rasberry, and go only using this protocol. If you want to access it from IPv4, then you need to install a reverse-proxy on the VPS, since you cannot forward the port and traffic directly from IPv4 and IPv6 (although I'm not sure here).
Why is a tunnel needed? The answer is simple, your computer behind NAT is not visible from the Internet, and you can reach it only through the tunnel it has laid.
PS. In fact, setting up IPv6 on your home Rassberry will be the easiest and cheapest option! (Even as a tunnel to an IPv6 provider)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question