November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

CentOS 7 / RHEL firewalld settings

CentOS 7 / RHEL firewalld settings

CentOS 7 has adopted firelwalld by default over the previous iptables, which will require some new steps to configure your firewall:

# new CentOS/RHEL 7 Firewall:
(see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html )

# create a new service e.g. for webmin:

$ cat /etc/firewalld/services/webmin.xml


Webmin
Server admin service. Restrict access and do not leave running.

# add service to zone:

nano /etc/firewalld/zones/public.xml
# OR
$ firewall-cmd –permanent –zone=public –add-service=webmin

# reload to add:

$ firewall-cmd –reload

# check:
$ firewall-cmd –zone=public –list-all

## apache / httpd:
$ firewall-cmd –permanent –add-service=http
$ firewall-cmd –permanent –add-service=https
$ systemctl restart firewalld

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>