# Configuration file for setting IP addresses for a network interface. INTERFACE="$1" HWADDR="00:00:5e:00:53:ff" IPV6_ADDR_1="2001:db8::2" IPV6_ROUTE_1="2001:db8::/64" IPV4_ADDR_1="192.0.2.2/24" IPV4_ROUTE_1="192.0.2.0/24" ip link set dev $INTERFACE up ip link set dev $INTERFACE address $HWADDR ip -6 address add $IPV6_ADDR_1 dev $INTERFACE nodad ip -6 route add $IPV6_ROUTE_1 dev $INTERFACE ip address add $IPV4_ADDR_1 dev $INTERFACE ip route add $IPV4_ROUTE_1 dev $INTERFACE > /dev/null 2>&1 iptables -t nat -A POSTROUTING -j MASQUERADE -s $IPV4_ROUTE_1 sysctl -w net.ipv4.ip_forward=1 iptables -P FORWARD ACCEPT dnsmasq -C dnsmasq_nat.conf -x /var/run/dnsmasq_zeth.pid