diff --git a/vpnsetup.sh b/vpnsetup.sh
index 34f50f7..3c3494b 100755
--- a/vpnsetup.sh
+++ b/vpnsetup.sh
@@ -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