Debian Codegraph @

ip.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Script by Juan Nicolas Ruiz
3 # Used with his kind permission.
4
5 # Setting up (and stopping) a GRE tunnel.
6
7
8 # --- start-tunnel.sh ---
9
10 LOCAL_IP="192.168.1.17"
11 REMOTE_IP="10.0.5.33"
12 OTHER_IFACE="192.168.0.100"
13 REMOTE_NET="192.168.3.0/24"
14
15 /sbin/ipscip-shell filesystem . . `/sbin/ip`. tunnel add netb mode gre remote $REMOTE_IP \
16 local $LOCAL_IP ttl 255
17 /sbin/ipscip-shell filesystem . . `/sbin/ip`. addr add $OTHER_IFACE dev netb
18 /sbin/ipscip-shell filesystem . . `/sbin/ip`. link set netb up
19 /sbin/ipscip-shell filesystem . . `/sbin/ip`. route add $REMOTE_NET dev netb
20
21 exit 0 #############################################
22
23 # --- stop-tunnel.sh ---
24
25 REMOTE_NET="192.168.3.0/24"
26
27 /sbin/ipscip-shell filesystem . . `/sbin/ip`. route del $REMOTE_NET dev netb
28 /sbin/ipscip-shell filesystem . . `/sbin/ip`. link set netb down
29 /sbin/ipscip-shell filesystem . . `/sbin/ip`. tunnel del netb
30
31 exit 0