mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-12 07:22:41 +01:00
Fix missing /etc/sysctl.d directory on some systems
Create the directory before writing to it to avoid errors on systems like CentOS Stream 9 containers where it may not exist.
This commit is contained in:
@@ -1113,6 +1113,7 @@ verb 3" >>/etc/openvpn/server.conf
|
||||
|
||||
# Enable routing
|
||||
log_info "Enabling IP forwarding..."
|
||||
mkdir -p /etc/sysctl.d
|
||||
echo 'net.ipv4.ip_forward=1' >/etc/sysctl.d/99-openvpn.conf
|
||||
if [[ $IPV6_SUPPORT == 'y' ]]; then
|
||||
echo 'net.ipv6.conf.all.forwarding=1' >>/etc/sysctl.d/99-openvpn.conf
|
||||
|
||||
Reference in New Issue
Block a user