bundlewrap/bundles/pppd/files/ip-up

19 lines
419 B
Text
Raw Normal View History

#!/bin/bash
INTERFACE=$1
2023-09-24 18:59:58 +00:00
echo "add rule nat postrouting oifname $INTERFACE masquerade" > /etc/nftables-rules.d/90-pppd
% for rule in sorted(nftables):
echo "add rule ${rule}" >> /etc/nftables-rules.d/90-pppd
% endfor
echo "net.ipv6.conf.$INTERFACE.accept_ra=2" > /etc/sysctl.d/90-pppd.conf
if systemctl is-active nftables;
then
systemctl reload nftables
else
systemctl restart nftables
fi
rdisc6 $INTERFACE