Apr 22, 2003 #1 haneo Programmer Joined Jan 2, 2002 Messages 274 Location 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 Joined Nov 16, 2001 Messages 1,031 Location 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 Joined Nov 16, 2001 Messages 1,031 Location 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)