#!/bin/bash

INTERFACE=$1

echo "iptables -t nat -A POSTROUTING -o $INTERFACE -j MASQUERADE" > /etc/iptables-rules.d/90-pppd
echo "net.ipv6.conf.$INTERFACE.accept_ra=2" > /etc/sysctl.d/90-pppd.conf

/usr/local/sbin/iptables-enforce

rdisc6 $INTERFACE