Hello all
My apologies if I get some terminology a little wrong, this isn't my specialty. I have an Ubuntu Linux host that polls a set of remote sensors (each of which is a Linux host) for data at regular intervals, usually about every 10 seconds. Each physical location has a single network unit providing cellular connectivity, and runs a private LAN on which the individual sensors are uniquely addressed (i.e. there's a private subnet that I can access from my host via the VPN connection, transparently using the host's routing table). The connection from my host to the remote unit is over an OpenVPN connection that I have running as a system service using a configuration file provided by the CradlePoint vendor, and I have had a single location up and running for several months with no issues.
I am now ready to try to get a second location up and running, meaning that I will need to keep a second OpenVPN connection open. The vendor supplied the units all with the same subnet, so I will definitely have to change that so that the routing table doesn't get all bollixed up, but I was hoping someone could weigh in with other things to watch out for as I do my testing. Looking at the configuration files I see the following entries (redacting some things for privacy):
From one unit to the next, the only thing that varies is the remote VPN host IP address; they all use the same port number. I will obviously be changing the local subnets to be unique. I would like to leave the local binding the same as they are all communicating over the same physical interface. What else will I need to change in order to keep them all open at once? I see in the OpenVPN FAQ:
Thanks for any input.
My apologies if I get some terminology a little wrong, this isn't my specialty. I have an Ubuntu Linux host that polls a set of remote sensors (each of which is a Linux host) for data at regular intervals, usually about every 10 seconds. Each physical location has a single network unit providing cellular connectivity, and runs a private LAN on which the individual sensors are uniquely addressed (i.e. there's a private subnet that I can access from my host via the VPN connection, transparently using the host's routing table). The connection from my host to the remote unit is over an OpenVPN connection that I have running as a system service using a configuration file provided by the CradlePoint vendor, and I have had a single location up and running for several months with no issues.
I am now ready to try to get a second location up and running, meaning that I will need to keep a second OpenVPN connection open. The vendor supplied the units all with the same subnet, so I will definitely have to change that so that the routing table doesn't get all bollixed up, but I was hoping someone could weigh in with other things to watch out for as I do my testing. Looking at the configuration files I see the following entries (redacting some things for privacy):
client
dev tun
proto udp
port [port number redacted]
persist-tun
persist-key
keepalive 10 60
cipher AES-256-CBC
auth SHA512
local [local IP address redacted]
remote [remote VPN host IP address redacted] [port number redacted but same as above] udp
route [remote LAN subnet redacted] [remote LAN netmask redacted]
From one unit to the next, the only thing that varies is the remote VPN host IP address; they all use the same port number. I will obviously be changing the local subnets to be unique. I would like to leave the local binding the same as they are all communicating over the same physical interface. What else will I need to change in order to keep them all open at once? I see in the OpenVPN FAQ:
but this seems more directed to the server side of things, as I don't have any server, server-bridge, or ifconfig entries in my config file. Do the ports need to be different on my side given that they're contacting different server addresses? Keeping multiple services going on the host itself with systemctl seems to be no issue, but I tried to start one using perhaps naive settings and no new TUN device showed up in my 'ip a' output.Can I run multiple OpenVPN tunnels on a single machine?
Yes, of course.
If you are running 2 or more OpenVPN instances on the same machine, you will need a separate virtual TUN/TAP adapter and a separate port (using the port directive) for each instance.
Make sure each TUN/TAP adapter has a unique, non-overlapping subnet using server, server-bridge, or ifconfig.
Thanks for any input.