Linux serverNETWORK ADMINISTRATIONS

Chapter 22 Red Hat Linux 7.x EX 300 exam Understanding firewalld, zones, services, rich rules



Support by Funding: https://paypal.me/geeklinuxvideos

Commands used in this chapter as follows.

Please never copy & paste it while you practise, Manual typing will help us to remember forever.

# systemctl stop iptables
# systemctl mast iptables
# systemctl statusfirewalld
# firewall-cmd –get-zones
# vim /etc/firewalld/firewalld.conf
# firewall-cmd –get-services
# cd /usr/lib/firewalld/services/
# firewall-cmd –state
# firewall-cmd –get-active-zones
# firewall-cmd –list-all
# firewall-cmd –reload
# firewall-cmd –set-deafult-zone=internal
# firewall-cmd –set-default-zone=internal
# firewall-cmd –get-default-zone
# firewall-cmd –get-zone-of-interface=eno16777728
# firewall-cmd –get-services
# firewall-cmd –add-service=http
# firewall-cmd –add-service=https
# firewall-cmd –add-service=http –permanent
# firewall-cmd –add-service=https –permanent
# firewall-cmd –zone=internal –remove-service=http
# firewall-cmd –zone=internal –remove-service=http –permanant
# cd /usr/lib/firewalld/services/
# cp ssh.xml http.xml https.xml /etc/firewalld/services/
# cd /etc/firewalld/services/
# touch geeklinux.xml
# firewall-cmd –reload
# firewall-cmd –add-service=geeklinux –permanent
# firewall-cmd –permanent –add-source=192.168.1.0/24
# firewall-cmd –add-port=443/tcp
# firewall-cmd –add-rich-rule ‘rule family=”ipv4″ source address=”192.168.107.0/24″ service name=”http” accept’ –permanent
# firewall-cmd –add-rich-rule ‘rule family=”ipv4″ source address=”192.168.107.0/24″ service name=”http” accept’ –permanent
# firewall-cmd –add-rich-rule ‘rule family=”ipv4″ source address=”172.16.152.0/24″ service name=”ftp” accept’ –permanent
# firewall-cmd –reload
# firewall-cmd –list-all

Provide you comments in below comment section and let us know your feedback.

Visit our Facebook page: https://www.facebook.com/redhatlinuxadmin/

Red hat enterprise 7 Linux video tutorial playlist

Subscribe to Our Channel

https://www.youtube.com/c/GeeksLinuxVideoTutorials

source
redhat linux

Leave a Reply

Your email address will not be published. Required fields are marked *