Created
November 26, 2016 23:03
-
-
Save davidbeauchamp/dada6acfb8fc94869175aa774825af35 to your computer and use it in GitHub Desktop.
tinc-up and tinc-down using ip instead of ifconfig
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
tinc-up.sh, don't forget to chmod +x | |
#!/bin/sh | |
ip link set $INTERFACE up | |
ip addr add your.ip.addr.here/32 dev $INTERFACE | |
ip route add your.ip.subnet.here/24 dev $INTERFACE | |
# tinc-down.sh, don't forget to chmod +x | |
#!/bin/sh | |
ip route del your.ip.subnet.here/24 dev $INTERFACE | |
ip addr del your.ip.addr.here/32 dev $INTERFACE | |
ip link set $INTERFACE down |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment