Ask Your Question

how to create whitelist firewall for SSH connections using firewalld

asked 2017-02-24 15:06:16 -0500

fedoreo gravatar image

The first thing that happens to any new linux server brought online is a deluge of ssh dictionary attacks. The first firewall I usually put in place is an iptables firewall which drops port 22 and then whitelists our admin IPs. I can't find a way to do this with firewalld. I have found ways to create a whitelist for ALL connections, which I do not want to do. I only want to restrict port 22 connections.

Just when I was getting comfortable with iptables, it is being replaced with firewalld.

Please advise.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-25 17:39:45 -0500

aeperezt gravatar image

You need to use Firewalld rich language to accomplish what you want with it. Look at

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-02-24 15:06:16 -0500

Seen: 460 times

Last updated: Feb 24 '17