Site Tools


openvpn_extra_connection

Additional OpenVPN Server/Client connections

There are rare situations when you might want to add more OpenVPN connections (Server/client) than are allowed in the Web interface.

First, consider whether you're using the right technology. For multiple site-to-site connections, you'll probably find tinc to be a better and easier to manage technology. It scales more easily.


If you decide you still want additional OpenVPN connections, this example will define a server named “Server3”:


mkdir /tmp/etc/openvpn/server3/
cd /tmp/etc/openvpn
ln -s /usr/sbin/openvpn vpnserver3
cd /tmp/etc/openvpn/server3
echo "daemon 
ifconfig 10.0.3.1 10.0.3.2
proto udp
port 1195
dev tun23
cipher AES-128-CBC
keepalive 15 60
verb 3
secret static.key
status-version 2
status status
script-security 2
route 10.0.3.1 255.255.255.0
fast-io
persist-tun" > /tmp/etc/openvpn/server3/config.ovpn
chmod 777 /tmp/etc/openvpn/server3/config.ovpn

sleep 1

cp /etc/openvpn/server1/static.key /etc/openvpn/server3/  ##I use the same key as per server1 here
/etc/openvpn/vpnserver3 --cd /etc/openvpn/server3 --config config.ovpn



openvpn_extra_connection.txt · Last modified: 2023/06/06 20:50 by hogwild