Skip to content

Instantly share code, notes, and snippets.

@mayurah
Created July 2, 2014 11:48
Show Gist options
  • Save mayurah/902a9c8c06e5d1e4828f to your computer and use it in GitHub Desktop.
Save mayurah/902a9c8c06e5d1e4828f to your computer and use it in GitHub Desktop.
handy null route
#!/bin/bash
# echo $*
route add -host $* reject
ip route add blackhole $*
@mayurah
Copy link
Author

mayurah commented Jul 1, 2023

route add -host 64.1.2.3 reject
ip route add blackhole 202.54.5.2/29

route delete 65.21.34.4
route del -host 65.21.34.4 reject
ip route delete 1.2.3.4/26 dev eth0

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