Anonymous Anonymous - 1 month ago 180 0

With this commands you will allow access from only specific ips to the ssh port with firewalld.

Bash

Firewalld open ssh port for specific ip address

firewall-cmd --zone=internal --add-service=ssh --permanent
firewall-cmd --zone=internal --add-source=1.2.3.4/32 --permanent
firewall-cmd --zone=internal --add-source=5.6.7.8/32 --permanent
firewall-cmd --zone=public --remove-service=ssh --permanent
firewall-cmd --reload
Comments