network-accept/reject

Accept or reject network connections to system services using firewalld rules.

Task 1:

You will configure a server running on your system serving content using a non standard port (82)

Solution:

systemctl status httpd #check port
vim /etc/httpd/conf/httpd.conf #change from 80 to 82
---
semanage port -l | grep 80
semanage port -a -t http_port_t tcp 82
sysstemctl restart httpd
systemctl enable httpd

Task 2:

The firewall must be open.

Solution:

yum install firewalld -y
systemctl start firewalld 
systemctl enable firewalld
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --reload
systemctl status firewalld
firewall-cmd --list-all

Last updated

Was this helpful?