Create a network Topology Setup in such a way so that System A can ping to two Systems System B and System C but both these systems should not be pinging each other without using any security rule e.g firewall etc .

Rutujakonde
2 min readDec 18, 2020

We have 3 computers A, B, and C. Our objective is to allow A to communicate with B and C. At the same time, B and C can only communicate with A and not with each other. The set up is based on the diagram shown below.

Step 1:

We find the IP addresses and netmasks of the 3 computers (or VMs) we will be using from the following command

ifconfig enp0s3

In my case

A — IP=192.168.43.88, netmask=255.255.255.0

B — IP=192.168.43.224,netmask=255.255.255.0

C — IP=192.168.43.59,netmask=255.255.255.0

From the IP addresses and netmasks, we can say that all 3 computers belong to the same subnet, and they also share the same default gateway (192.168.43.1).

Step 2:

A simple way to prevent B and C from pinging each other is to use the reject option in the route add -host sub command. By adding the reject option, we are preventing the tracking of a route to the mentioned host. The command is as shown below.

route add -host <IP address of host> reject

Step 3:

Now check the connectivity by the commands

A → B (it is pingable)

A →C (it is pingable)

ping 192.168.43.224
ping 192.168.43.59

B → A(it is pingable)

B → C (not pingable)

ping 192.168.43.88
ping 192.168.43.59

C → A(it is pingable)

C → B(not pingable)

ping 192.168.43.88
ping 192.168.43.59

--

--