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:50]
gcooper
networking:firewall:firewalld [2018/03/15 09:39] (current)
gcooper
Line 2: Line 2:
  
 https://fedoraproject.org/wiki/FirewallD https://fedoraproject.org/wiki/FirewallD
 +
 +http://oracle-base.com/articles/linux/linux-firewall-firewalld.php
 +
 +http://www.certdepot.net/rhel7-get-started-firewalld/
  
 FirewallD is the default firewall implementation on CentOS 7. FirewallD is the default firewall implementation on CentOS 7.
Line 31: 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 39: Line 45:
 <file> <file>
 firewall-cmd --permanent --zone=public --add-service=http --add-service=https firewall-cmd --permanent --zone=public --add-service=http --add-service=https
 +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.1416603019.txt.gz · Last modified: 2014/11/21 13:50 by gcooper