mirror of
https://github.com/namibia/openvpn-install.git
synced 2024-12-23 07:18:54 +00:00
Will now set "local" in server.conf to the chosen IP adderess
If you want to run OpenVPN in UDP mode on an secondary IP, UDP routing will fail unless you explicitly bind OpenVPN to the chosen IP address. This change includes the "local" parameter in the config and sets it to the IP address entered at the beginning.
This commit is contained in:
parent
edbe4fed90
commit
ad3c223385
@ -427,6 +427,7 @@ WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service
|
|||||||
chmod 644 /etc/openvpn/crl.pem
|
chmod 644 /etc/openvpn/crl.pem
|
||||||
|
|
||||||
# Generate server.conf
|
# Generate server.conf
|
||||||
|
echo "local $IP" > /etc/openvpn/server.conf
|
||||||
echo "port $PORT" > /etc/openvpn/server.conf
|
echo "port $PORT" > /etc/openvpn/server.conf
|
||||||
if [[ "$PROTOCOL" = 'UDP' ]]; then
|
if [[ "$PROTOCOL" = 'UDP' ]]; then
|
||||||
echo "proto udp" >> /etc/openvpn/server.conf
|
echo "proto udp" >> /etc/openvpn/server.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user