User Tools

Site Tools


networking:firewall:firewalld

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:firewall:firewalld [2014/11/21 13:53]
gcooper
networking:firewall:firewalld [2018/03/15 09:39] (current)
gcooper
Line 35: Line 35:
  
 firewall-cmd --zone=public --list-all firewall-cmd --zone=public --list-all
 +
 +firewall-cmd --zone=public --add-interface=eth0    # activate the (Public) firewall on ''eth0''
 </file> </file>
  
Line 45: Line 47:
 firewall-cmd --reload firewall-cmd --reload
 </file> </file>
 +
 +===== Change SSH Port =====
 +
 +:!: You may need to install some tools on minimal installs:
 +
 +<file>
 +yum -y install policycoreutils-python net-tools
 +</file>
 +
 +Change the port in the SSH daemon configuration:
 +
 +<file>
 +vim /etc/ssh/sshd_config
 +</file>
 +
 +Fix selinux RBAC:
 +
 +<file>
 +semanage port -a -t ssh_port_t -p tcp 2222
 +</file>
 +
 +Modify the firewall:
 +
 +<file>
 +firewall-cmd --permanent --zone=public --add-port=2222/tcp
 +firewall-cmd --reload
 +</file>
 +
 +Restart the SSH service:
 +
 +<file>
 +systemctl restart sshd.service
 +
 +netstat -tapn
 +</file>
 +
networking/firewall/firewalld.1416603236.txt.gz · Last modified: 2014/11/21 13:53 by gcooper