Site Tools


openvpn_extra_connection

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
openvpn_extra_connection [2022/09/08 10:39] – created rs232openvpn_extra_connection [2023/06/06 20:50] (current) – -add tinc link hogwild
Line 1: Line 1:
-There are some rare cases where you might want to add more connections (Server/client) that the GUI allows you to define. +====== Additional OpenVPN Server/Client connections ======
-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":+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 [[vpn-tinc|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":
 +
 + \\
 +
 +<code ->
 mkdir /tmp/etc/openvpn/server3/ mkdir /tmp/etc/openvpn/server3/
 cd /tmp/etc/openvpn cd /tmp/etc/openvpn
Line 10: Line 17:
 cd /tmp/etc/openvpn/server3 cd /tmp/etc/openvpn/server3
 echo "daemon  echo "daemon 
-ifconfig 1.1.1.1 1.1.1.2+ifconfig 10.0.3.1 10.0.3.2
 proto udp proto udp
 port 1195 port 1195
Line 21: Line 28:
 status status status status
 script-security 2 script-security 2
-route 1.1.1.1 255.255.255.0+route 10.0.3.1 255.255.255.0
 fast-io fast-io
 persist-tun" > /tmp/etc/openvpn/server3/config.ovpn persist-tun" > /tmp/etc/openvpn/server3/config.ovpn
 chmod 777 /tmp/etc/openvpn/server3/config.ovpn chmod 777 /tmp/etc/openvpn/server3/config.ovpn
  
-sleep 10+sleep 1
  
 cp /etc/openvpn/server1/static.key /etc/openvpn/server3/  ##I use the same key as per server1 here 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 /etc/openvpn/vpnserver3 --cd /etc/openvpn/server3 --config config.ovpn
 +</code>
 +
 + \\ \\
 +
 +
openvpn_extra_connection.1662629955.txt.gz · Last modified: 2022/09/08 10:39 by rs232