Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Add table "admin" to /etc/iproute2/rt_tables
- myotherdevice=eth0
- myothernetwork=10.0.0
- myothergateway=10.0.0.138
- myotherip=$(ifconfig | grep $myothernetwork | cut -d: -f2 | cut -f1 -d' ')
- ip route add ${myothernetwork}.0/24 dev $myotherdevice src $myotherip table admin
- ip route add default via $myothergateway dev $myotherdevice table admin
- ip rule add from ${myotherip}/32 table admin
- ip rule add to ${myotherip}/32 table admin
- ip route flush cache
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement