Apr 22, 2003 #1 haneo Programmer Jan 2, 2002 274 CA How to block ssh from some IPs? with wu-ftpd it just a matter of changing /etc/hosts.allow what about the ssh server i user redhat 8.0 (kernel 2.4.20) thanks
How to block ssh from some IPs? with wu-ftpd it just a matter of changing /etc/hosts.allow what about the ssh server i user redhat 8.0 (kernel 2.4.20) thanks
Apr 22, 2003 #2 QatQat IS-IT--Management Nov 16, 2001 1,031 IT Here is a solution iptables -A INPUT -s ip_address_to_block --dport 22 -j DROP iptables -A FORWARD -s ip_address_to_block --dport 22 -j DROP service iptables save I know that there is a way of doing this directly from SSH config files like known_hosts or something similar. If I find if I will post it. In the meantime iptables should do. Bye Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore) Upvote 0 Downvote
Here is a solution iptables -A INPUT -s ip_address_to_block --dport 22 -j DROP iptables -A FORWARD -s ip_address_to_block --dport 22 -j DROP service iptables save I know that there is a way of doing this directly from SSH config files like known_hosts or something similar. If I find if I will post it. In the meantime iptables should do. Bye Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
Apr 22, 2003 #3 QatQat IS-IT--Management Nov 16, 2001 1,031 IT Hoops, I forgot something... iptables -A INPUT -j DROP -s ip_to_block/subnet -p tcp --dport 22 and the same for the FORWARD chain. If you don't specify the protocol then you can't use --dport. Bye Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore) Upvote 0 Downvote
Hoops, I forgot something... iptables -A INPUT -j DROP -s ip_to_block/subnet -p tcp --dport 22 and the same for the FORWARD chain. If you don't specify the protocol then you can't use --dport. Bye Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)