Populating a new routing table on linux without the default


/ Published in: Bash
Save to your folder(s)

Useful when you want to do policy routing on linux and need to populate a new routing table, without the default route.


Copy this code and paste it in your HTML
  1. ip route show table main | grep -Ev ^default | while read ROUTE; do ip route add $ROUTE table new-routing-table; done

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.