Answer the question
In order to leave comments, you need to log in
How to access multiple Raspberries using OpenVPN?
Good afternoon, there are 5 raspberries all connected to the Internet, but there is no way to configure port forwarding, there is no white ip either. You need to be able to connect to the Raspberry as if it were on the local network via, ssh, vnc, etc.
The idea is this: buy a server like Amazon AWS, set up OpenVPN on it. Connect all raspberry to VPN and connect the laptop to VPN too and you will be able to access Raspberry.
Nuance, web services are running on the raspberry, they need to have access to the Internet bypassing the VPN. I plan to use the VPN only for configuring or monitoring Raspberry when needed.
How to set it all up?
Answer the question
In order to leave comments, you need to log in
Routes, for example, if web services then say that packets from 80 and 443 (or whatever you have there) of the port go to the provider's gateway, and not to the tunnel interface.
To help ip route
and ip rule
, we mark incoming packets to a specific port with iptables
, and give it all away Forip route
inspirationTYC
In order for the Raspberry web server to continue to accept requests from the Internet, you simply need to configure the OpenVPN server so that it does not make itself the default router for clients. To do this, it is enough not to specify / comment out one directive in the server config (however, in my opinion, it is already commented out by default):
push "redirect-gateway def1 bypass-dhcp"
Provide distribution of fixed IP addresses to clients in your VPN for Raspberry, otherwise you will constantly look for the right raspberry.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question