Advertisement
iklio

Adding a 2nd default route (linux)

May 3rd, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. #!/bin/bash
  2. ip route add 10.0.0.0/24 dev eth1 src 10.0.0.1 table admin
  3. ip route add default via 10.0.0.138 dev eth1 table admin
  4. ip rule add from 10.0.0.1/32 table admin
  5. ip rule add to 10.0.0.1/32 table admin
  6. ip route flush cache
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement