• 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. SSH Connection Refused by TCP Wrapper
  2. iftop Command Examples in Linux
  3. duplicacy: A lock-free deduplication cloud backup tool
  4. geth: The go-ethereum command-line interface
  5. krita: command not found
  6. Swapon Fails To Mount Swap – Gives Invalid Argument Error
  7. CentOS / RHEL : How to adjust the telnet timeout (and how to disable it)
  8. CentOS / RHEL 6 : Lock User Account After N Number of Incorrect Login Attempts
  9. lshal Command Examples in Linux
  10. GlusterFS – Real Time Data Replication Across Multiple RHEL/CentOS Nodes

You May Also Like

Primary Sidebar

Recent Posts

  • “glab pipeline” Command Examples
  • “glab mr” Command Examples
  • “glab mr merge” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright