Pingability between systems in Network Topology Setup

Objective

Create a Network Topology Setup such that System A can ping to both System B and System C. Also, both these systems shouldn’t ping to each other unless any security rule like firewall/firewalld is mentioned.

Project Understanding

Prerequisite (For better understanding)

System A → 192.168.56.206

System B → 192.168.56.209

System C → 192.168.56.210

OS Used → RedHat 8

Step 1:

Let’s check if each system is pinging to each other

System A to System B & System C
System B to System A & System C
System C to System A & System B

Step 2:

  • Let’s enable ping operation within the firewalld in both System B & System C. First of all firewalld should be enabled on both systems and the command for the same is mentioned below:
systemctl enable firewalld --now
  • In order to enable ping operation within the same, it should be added as a rule in firewalld and could be done by using the command below:
firewall-cmd --permanent --add-service=ssh
  • Complete firewalld configuration could be obtained using the command mentioned below
firewall-cmd --list-all
Under services, ssh is specified which indicates that ping has been enabled within firewalld

Step 3:

After enabling ping operation within firewalld, check if both systems are pinging to each other.

System B to System C
System C to System B

Step 4:

Let’s understand the command that could be used to disable ping operation in both the systems as soon as firewalld is stopped. The command used is mentioned below:

  • For System B:
systemctl stop firewalld && iptables -A INPUT -p icmp --icmp-type echo-request  -s <System_C_IP_Address> -j DROP
  • For System C:
systemctl stop firewalld && iptables -A INPUT -p icmp --icmp-type echo-request  -s <System_B_IP_Address> -j DROP

After executing the above mentioned command, both the systems are unable to ping to each other

System B unable to ping to System C
System C unable to ping to System B

Step 5:

Let’s check if System A is able to ping to both System B & System C

From the above image, System A is able to ping to both System B & System C even though System B & System C are unable to ping to each other.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store