1

I have a bunch of devices (raspberry pies) which are located in different buildings and networks and are constantly sending me some data. I need a way to be able to ssh to the devices. I am thinking of creating VPN, where all these devices will be connected prior to sending data; in such a way, every one of them will have private IP and I will be able to ssh to it in my VPN network. Assuming this is true (correct me if not), how could I identify which device is which if I just see a bunch of connected IPs?

I thought to use a preconfigured static IP for every device before connecting it to VPN. Would that work?

Is there any other better solution?

3
  • use client certs per device, setup bind/DNS to have hostnames for every client, setup static binding in openvpn, be done. (we use a similiar setup) – Dennis Nolte Feb 27 '17 at 8:40
  • what's more important - making sure you "know" which device is which, or knowing whatever the device is, that you manage it, own it etc. This is what issuing machine certs is about. – Jim B Feb 28 '17 at 4:04
  • Assigning each VPN client a static IP address is an entirely sensible approach. However how to do it an whether it is even possible in the first place depends on which VPN solution you are using. – kasperd Mar 11 '17 at 21:27
1

Static addresses are hard to manage. Are all devices connected to a public network? If the answer is yes you have additional challenge of costs attached with having static public address.
Alternatively you can have your devices allocated dynamic addresses and then create a VPN to a well known server with static IP.

Another option can be DynDNS registration of devices, but may be more complicated in case the devices are behind NAT. In latter case you will be able to originate an SSH connection on demand without the need for having all devices always connected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.