Created
October 29, 2018 15:54
-
-
Save sapran/b84610e69ba2260218d264dc1233be2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip rule add from $(ip route get 1 | grep -Po '(?<=src )(\S+)') table 128 | |
ip route add table 128 to $(ip route get 1 | grep -Po '(?<=src )(\S+)')/32 dev $(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)') | |
ip route add table 128 default via $(ip -4 route ls | grep default | grep -Po '(?<=via )(\S+)') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment