Listen on IPv4

Needed if you have more than one IPv4. Just listen on the configured IP on the install.
Tested in my environment.
I have apache server running on one interface with port 443. So its not bindable there. I have bought a second IP. Now OpenVPN needs to know which IP he should bind and not every. So simply setting it in the config. Without this I couldn't connect. Edited config and worked fine for me.
This commit is contained in:
xopez 2018-10-01 18:39:21 +02:00 committed by GitHub
parent c9c6089cd6
commit 0d667e49a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -660,6 +660,7 @@ function installOpenVPN () {
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 [[ "$IPV6_SUPPORT" = 'n' ]]; then if [[ "$IPV6_SUPPORT" = 'n' ]]; then
echo "proto $PROTOCOL" >> /etc/openvpn/server.conf echo "proto $PROTOCOL" >> /etc/openvpn/server.conf