2
1
Problem statement: Not able to ssh from pc1 to any other pc's mentioned below after adding the IP rules tried below
System setup: I have a set of 4 machines connected to HUB.
Their N/W config: Network Address : 172.30.11.0 subnet mask : 255.255.255.0
pc1 : 172.30.11.121 pc2 : 172.30.11.122 pc3 : 172.30.11.123 pc4 : 172.30.11.124
I have created a user routing table named "LAN" in pc1 and added the IP rule mapping this table.
Cmds:
ip rule add from 172.30.11.121/24 table LAN
ip route add default via 172.30.11.97 table LAN
After the addition of this rule, I can't able to SSH to any other PC's but ping succeeds.
Output of IP rules:
root@debian:~# ip rule list
0: from all lookup local
32765: from 172.30.11.121/24 lookup LAN
32766: from all lookup main
32767: from all lookup default
root@debian:~# ip route show table LAN
default via 172.30.11.97 dev eth0
Can you add the actual error message you're getting when you attempt to ssh? If you can ping but not ssh it usually implies the remote host isn't taking calls... – Shadur – 2014-09-09T09:46:35.140
Have you set up an equivalent rule on the computer you're trying to ssh to? Also, try "ping -R" to show you the route the ping packets are taking... – ed. – 2014-09-09T10:32:44.283
May I suggest using IPtables instead. It is a well-known and a well-documented firewall application, and you can get lots of support with that. – Cybex – 2019-05-04T17:05:49.490