Workaround for Netplan

- Newer Ubuntu versions use netplan instead of ifupdown by default for
  network configuration
- Scripts in /etc/network/if-pre-up.d/ does not work under netplan
- Add workaround in /etc/rc.local for the above
This commit is contained in:
hwdsl2 2017-10-26 01:30:37 -05:00
parent 087306dbf5
commit d7e420340c

View File

@ -435,6 +435,7 @@ cat >> /etc/rc.local <<'EOF'
(sleep 15
service ipsec restart
service xl2tpd restart
[ -f "/usr/sbin/netplan" ] && iptables-restore < /etc/iptables.rules
echo 1 > /proc/sys/net/ipv4/ip_forward)&
exit 0
EOF