Skip to content

Instantly share code, notes, and snippets.

@morungos
Created May 5, 2019 20:53
Show Gist options
  • Save morungos/8f9de939a9191117659d9ff6d6cff9a5 to your computer and use it in GitHub Desktop.
Save morungos/8f9de939a9191117659d9ff6d6cff9a5 to your computer and use it in GitHub Desktop.
Handy default route rule for debian
#!/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
@morungos
Copy link
Author

morungos commented May 5, 2019

Put this in /etc/dhcp/dhclient-enter-hooks.d/ to set default routes with multiple interfaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment