• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL : How to add a null route in Linux

by admin

As Per the ip man page, there are three route types which will drop traffic in specific ways:

Route types:

unreachable – these destinations are unreachable. Packets are discarded and the ICMP message host unreachable is generated. The local senders get an EHOSTUNREACH error.

blackhole – these destinations are unreachable. Packets are discarded silently. The local senders get an EINVAL error.

prohibit – these destinations are unreachable. Packets are discarded and the ICMP message communication administratively prohibited is generated. The local senders get an EACCES error.

The null route or the blackhole route can be addded with the help of ip command using the blackhole route type. In the example here, we silently drop any packets destined for the 10.192.168.0/24 network:

# ip route add blackhole 10.192.168.0/24

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to set chroot jail for vsftp only for specific users
  2. pmap Command Examples in Linux
  3. rsync: command not found
  4. “hg branch” Command Examples
  5. do-release-upgrade Command Examples in Linux
  6. Beginners Guide to User and Group Administration in Linux
  7. envoy: A PHP-based task manager for Laravel remote servers
  8. rename: command not found
  9. chown: command not found
  10. pacstrap Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright