Created
April 26, 2020 04:31
-
-
Save Legogris/e0ec7895f65251ef7e6ed651175d6003 to your computer and use it in GitHub Desktop.
ipip6tunnel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash /etc/rc.common | |
| # ipip6tunnel open-circuit | |
| # Legogris 2020 | |
| # Put in /etc/init.d/ipip6tunnel, enable service | |
| START=36 | |
| export IFNAME=eth0 | |
| export MYV6= | |
| export V6GATEWAY= | |
| start() { | |
| ip link set $IFNAME mtu 1460 | |
| ip -6 a add $MYV6/64 dev $IFNAME | |
| ip -6 tun add ip46tunnel local $MYV6 remote $V6GATEWAY dev $IFNAME mode ipip6 | |
| ip link set dev ip46tunnel up | |
| echo "Started ip46tunnel with IP $MYV6" | |
| ip -br a show | grep tunnel | |
| } | |
| stop() { | |
| ip link set dev ip46tunnel down | |
| ip -6 tun del ip46tunnel | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment