Scripts for setting up network nodes such as modems, routers, gateways, physical/virtual interfaces, dynamic dns, dns cache resolver, proxies, tunnels, virtual private networks/servers/connections, encrypted NAS, etc.
cat << EOF > /usr/local/bin/ipv6-tunnel.sh
#!/bin/sh
LOCAL=${CHANGE_LOCAL_IPV4} # Client IPv4 address
ADDR=${CHANGE_IPV6_ADDR} # Client IPv6 address
REMOTE=${CHANGE_REMOTE_IPV4_SERVER} # Server IPv4 address
ip tunnel del he-ipv6 > /dev/null 2>&1
ip tunnel add he-ipv6 mode sit remote ${REMOTE} local ${LOCAL} ttl 255
ip link set he-ipv6 up
ip addr add ${ADDR} dev he-ipv6
ip route add ::/0 dev he-ipv6
EOF
# Ensure script is executable
chmod ugo+x /usr/local/bin/ipv6-tunnel.sh
# run script to brinhg up IPv6 Tunnel