Skip to content

Commit

Permalink
Will now set "local" in server.conf to the chosen IP adderess
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
clickworkorange committed Aug 21, 2017
1 parent edbe4fe commit ad3c223
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openvpn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service
chmod 644 /etc/openvpn/crl.pem

# Generate server.conf
echo "local $IP" > /etc/openvpn/server.conf
echo "port $PORT" > /etc/openvpn/server.conf
if [[ "$PROTOCOL" = 'UDP' ]]; then
echo "proto udp" >> /etc/openvpn/server.conf
Expand Down

0 comments on commit ad3c223

Please sign in to comment.