Linux Networking Setup:
The task today is to 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.
Now we have to setup rules in these three systems. To check there IP addresses we use ifconfig command:
System A:
IP= 172.31.41.231, netmask= 255.255.240.0
System B:
IP= 172.31.43.99 , netmask= 255.255.240.0
System C:
IP= 172.31.47.33 , netmask= 255.255.240.0
Here all 3 computers A, B and C belong to the same subnet.
We need the setup in which system B and C can't ping each other and there are many ways of doing so but here I'm going to use the most simple option which is to use the reject option with the route add -host command.
When we use the reject option we are preventing the tracking of a route to the mentioned host. The command used is:
route add -host <IP> reject
Now running this command in Computer C and try to ping Computer B:
we can see here if we try to ping Computer B it can't ping, but it can ping to Computer A.
Now we move to the Computer B and try to ping Computer C:
You can see it is trying to ping Computer C but can't reach the host but it can ping to Computer A .
Now in Computer A and try to ping Computer B and Computer C from it:
Now you can see Computer A can successfully ping both Computer B and Computer C . So, our task is now completed.