Site Tools


openvpn_extra_connection

This is an old revision of the document!


Additional OpenVPN Server/Client connections

There are rare cases when you might want to add more connections (Server/client) than the Web interface allows you to define. First, you should consider whether you're using the right technology. For multiple site-to-site connection, you'll probably find tinc to be a better and easier to manage technology.

If you decide you still want to go ahead with additional OpenVPN connections, this example allows you to 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.1683521359.txt.gz · Last modified: 2023/05/08 05:49 by hogwild