How do I secure Red Hat Enterprise Linux so that incoming SSH requests are not allowed per IP address?

Updated -

There are 2 ways to deny SSH access via IP address.

Using iptables

Running the following command as root will reject all SSH access to 192.168.1.22. Please reference the iptables man page, man iptables from the command line, for additional options and usage:

# iptables -I INPUT -p tcp -i eth0 -s 192.168.1.22 --dport 22 -j DROP

You can...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In