This shows you the differences between two versions of the page.
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 | ||
</ | </ | ||
Line 45: | Line 47: | ||
firewall-cmd --reload | firewall-cmd --reload | ||
</ | </ | ||
+ | |||
+ | ===== Change SSH Port ===== | ||
+ | |||
+ | :!: You may need to install some tools on minimal installs: | ||
+ | |||
+ | < | ||
+ | yum -y install policycoreutils-python net-tools | ||
+ | </ | ||
+ | |||
+ | Change the port in the SSH daemon configuration: | ||
+ | |||
+ | < | ||
+ | vim / | ||
+ | </ | ||
+ | |||
+ | Fix selinux RBAC: | ||
+ | |||
+ | < | ||
+ | semanage port -a -t ssh_port_t -p tcp 2222 | ||
+ | </ | ||
+ | |||
+ | Modify the firewall: | ||
+ | |||
+ | < | ||
+ | firewall-cmd --permanent --zone=public --add-port=2222/ | ||
+ | firewall-cmd --reload | ||
+ | </ | ||
+ | |||
+ | Restart the SSH service: | ||
+ | |||
+ | < | ||
+ | systemctl restart sshd.service | ||
+ | |||
+ | netstat -tapn | ||
+ | </ | ||
+ |