SHOW:
|
|
- or go back to the newest paste.
1 | #!/bin/bash | |
2 | #Add table "admin" to /etc/iproute2/rt_tables | |
3 | myotherdevice=eth0 | |
4 | myothernetwork=10.0.0 | |
5 | myothergateway=10.0.0.138 | |
6 | myotherip=$(ifconfig | grep $myothernetwork | cut -d: -f2 | cut -f1 -d' ') | |
7 | - | ip route add $myothernetwork.0/24 dev $myotherdevice src $myotherip table admin |
7 | + | ip route add ${myothernetwork}.0/24 dev $myotherdevice src $myotherip table admin |
8 | ip route add default via $myothergateway dev $myotherdevice table admin | |
9 | - | ip rule add from $myotherip/32 table admin |
9 | + | ip rule add from ${myotherip}/32 table admin |
10 | - | ip rule add to $myotherip/32 table admin |
10 | + | ip rule add to ${myotherip}/32 table admin |
11 | ip route flush cache |