Skip to content

Instantly share code, notes, and snippets.

@davidbeauchamp
Created November 26, 2016 23:03
Show Gist options
  • Save davidbeauchamp/dada6acfb8fc94869175aa774825af35 to your computer and use it in GitHub Desktop.
Save davidbeauchamp/dada6acfb8fc94869175aa774825af35 to your computer and use it in GitHub Desktop.
tinc-up and tinc-down using ip instead of ifconfig
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