2020-11-13 22:04:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
INTERFACE=$1
|
|
|
|
|
2021-06-03 11:59:15 +00:00
|
|
|
echo "add rule nat postrouting oif $INTERFACE masquerade" > /etc/nftables-rules.d/90-pppd
|
2021-12-14 15:18:11 +00:00
|
|
|
% for rule in sorted(nftables):
|
|
|
|
echo "add rule ${rule}" >> /etc/nftables-rules.d/90-pppd
|
|
|
|
% endfor
|
2020-11-13 22:56:59 +00:00
|
|
|
echo "net.ipv6.conf.$INTERFACE.accept_ra=2" > /etc/sysctl.d/90-pppd.conf
|
2020-11-13 22:04:43 +00:00
|
|
|
|
2021-06-04 05:20:10 +00:00
|
|
|
if systemctl is-active nftables;
|
|
|
|
then
|
|
|
|
systemctl reload nftables
|
|
|
|
else
|
|
|
|
systemctl restart nftables
|
|
|
|
fi
|
2020-11-14 11:11:51 +00:00
|
|
|
|
|
|
|
rdisc6 $INTERFACE
|