Created
May 5, 2019 20:53
-
-
Save morungos/8f9de939a9191117659d9ff6d6cff9a5 to your computer and use it in GitHub Desktop.
Handy default route rule for debian
This file contains 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
#!/bin/bash | |
## Only the DHCP server talking to eth0 is allowed to give us a default | |
## route. Other interfaces only get local-segment configuration. | |
case ${interface} in | |
enp0s8) | |
;; | |
*) | |
unset new_routers | |
;; | |
esac | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this in
/etc/dhcp/dhclient-enter-hooks.d/
to set default routes with multiple interfaces