Added tun device setup script

This commit is contained in:
Thomas Kolb 2019-08-07 20:18:40 +00:00
parent 58bd3d3c26
commit bd14eec4e0

12
setup-tundev.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
set -e
if [ -z "$1" ]; then
echo IP+Subnet argument required.
exit 1
fi
sudo ip tuntap add dev hamnet70 mode tun user $UID
sudo ip link set dev hamnet70 up
sudo ip addr add dev hamnet70 $1