Site Tools


openvpn_extra_connection

This is an old revision of the document!


There are some rare cases where you might want to add more connections (Server/client) that the GUI allows you to define. First of all hyou should question yourself if you're using the right technology as for numerous site-to-site connection you'll find tinc a better/easier technology.

That said find here an example that allows you to define a “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.1662630103.txt.gz · Last modified: 2022/09/08 10:41 by rs232