-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.crts_sudoers
23 lines (22 loc) · 1.32 KB
/
.crts_sudoers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This file, when placed in /etc/sudoers.d/, grants any user the sudo priveledges
# to run the following commands.
# These commands are necessary for connecting the CRTS_CR nodes in a network
# through the TUN interfaces.
# Add the special tunCRTS TUN interface if it doesn't exist already
ALL ALL = NOPASSWD: /sbin/ip tuntap add dev tunCRTS mode tun
# Bring up the tunCRTS TUN interface
ALL ALL = NOPASSWD: /sbin/ip link set dev tunCRTS up
# Bring down the tunCRTS TUN interface
ALL ALL = NOPASSWD: /sbin/ip link set dev tunCRTS down
# Set the tunCRTS interface with an arbitrary IP address
ALL ALL = NOPASSWD: /sbin/ip addr add [0-9.]*/24 dev tunCRTS
# Set the tunCRTS interface with an arbitrary IP address
ALL ALL = NOPASSWD: /sbin/ifconfig tunCRTS [0-9.]* netmask 255.255.255.0
# Set the route information for tunCRTS
ALL ALL = NOPASSWD: /sbin/route add -net 10.0.0.0 netmask 255.255.255.0 dev tunCRTS
# Delete the route information for tunCRTS
ALL ALL = NOPASSWD: /sbin/route del -net 10.0.0.0 netmask 255.255.255.0 dev tunCRTS
# Delete the special tunCRTS TUN interface
ALL ALL = NOPASSWD: /sbin/ip tuntap del dev tunCRTS mode tun
# Set the tx queue length for tunCRTS
ALL ALL = NOPASSWD: /sbin/ifconfig tunCRTS txqueuelen [0-9.]*