How to disable ping to a website using Linux? Last Updated : 23 Sep, 2021 Comments Improve Suggest changes Like Article Like Report In this article we are going to create a customized network setup, to restrict accessing specific sites. Suppose we want to access Google and don't want to access Facebook, for this we need to create a customized network setup by configuring some routing rules for our system router. So let's come to some terms regarding networking: Entries of an IP Routing Table: A routing table contains the information necessary to forward a packet along the best path toward its destination. Each packet contains information about its origin and destination. Routing Table provides the device with instructions for sending the packet to the next hop on its route across the network. Each entry in the routing table consists of the following entries: Network ID: The network ID or destination corresponding to the route.Net Mask: It is the ID that helps to know the network name.Below is the implementation Let's start and move ahead to the implementation part: Step 1: Check the rules available in the routing table. route -n To check the rules present in the routing table, we use the command route -n. Here we have a rule in the very first row 0.0.0.0 that allows us to access or ping any site, so to restrict the connectivity to Facebook we will delete this rule with the command route del -net 0.0.0.0\ route del -net 0.0.0.0 Step 2: Check the network name for Google and Facebook So now to check the network name we use the command: nslookup domain_name Step 3: Check connectivity to the network To check the connectivity we will ping the address which we get from the last step. Step 4: Add a rule to connect to Google To add a rule to connect to Google we will use the command route add -net 216.58.196.0 netmask 255.255.255.0 gw 192.168.43.1 enp0s8 Step 5: Check the connectivity to Google We use the ping command here and check the connectivity. Step 6: Check the connectivity to Facebook Not connected to Facebook. Hence we achieved our setup. Just like this, we can achieve any type of customized network setup by adding specific rules in the routing table and restrict them. Comment More infoAdvertise with us Next Article How to disable ping to a website using Linux? 3110palakjain Follow Improve Article Tags : Linux-Unix Blogathon Blogathon-2021 Linux-networking-commands Similar Reads Linux Commands Cheat Sheet Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous W 13 min read grep command in Unix/Linux The grep command in Unix/Linux is a powerful tool used for searching and manipulating text patterns within files. Its name is derived from the ed (editor) command g/re/p (globally search for a regular expression and print matching lines), which reflects its core functionality. grep is widely used by 7 min read Linux/Unix Tutorial Linux is one of the most widely used open-source operating systems. It's fast, secure, stable, and powers everything from smartphones and servers to cloud platforms and IoT devices. Linux is especially popular among developers, system administrators, and DevOps professionals.Linux is:A Unix-like OS 10 min read 25 Basic Linux Commands For Beginners [2025] While performing a task, we all need shortcuts. Shortcuts help us to complete a task quickly. Linux comes with such commands which are one to two words, using that commands, you can perform several operations in no time. As a beginner, you must be aware of those basic Linux commands to complete an o 13 min read Sed Command in Linux/Unix With Examples The SED command is one of the most powerful commands used during the process of text processing in Linux/Unix operating systems. The SED command is typically invoked for executing operations such as replace and search, text manipulation, and stream editing.With SED, you can manipulate text files wit 9 min read AWK command in Unix/Linux with examples Awk is a scripting language used for manipulating data and generating reports. The awk command programming language requires no compiling and allows the user to use variables, numeric functions, string functions, and logical operators. Awk is a utility that enables a programmer to write tiny but eff 8 min read How to Find a File in Linux | Find Command The find command in Linux is used to search for files and directories based on name, type, size, date, or other conditions. It scans the specified directory and its sub directories to locate files matching the given criteria.find command uses are:Search based on modification time (e.g., files edited 9 min read Introduction to Linux Shell and Shell Scripting If we are using any major operating system, we are indirectly interacting with the shell. While running Ubuntu, Linux Mint, or any other Linux distribution, we are interacting with the shell by using the terminal. In this article we will discuss Linux shells and shell scripting so before understandi 8 min read ZIP command in Linux with examples In Linux, the zip command compresses one or more files or directories into a single.zip archive file. This saves disk space, keeps data organized, and makes it simple to share or backup files. It's among the most used compression utilities, particularly when sharing large files via email or storing 6 min read screen command in Linux with Examples The screen command is an advanced terminal multiplexer that allows you to have multiple sessions within one terminal window. It's like having "tabs" in your Linux terminal â you can open, detach, switch, or resume sessions at any time without losing what you're working on. It's particularly convenie 7 min read Like