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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. cut Command Examples in Linux
  2. How to Install Apache, MariaDB, and PHP (FAMP) stack on FreeBSD 11
  3. Invalid ABI Option abi=aapcs-linux
  4. CentOS / RHEL 6 : How to rebuild Initial Ramdisk Image
  5. How to Configure Network Interface Teaming in CentOS/RHEL 7 and 8
  6. timedatectl: command not found
  7. ark Command Examples in Linux
  8. Beginners Guide to Tuning Profiles in CentOS/RHEL
  9. How to Disable IPv6 on Ubuntu 20.04 Focal Fossa
  10. e2image: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright