How to Configure ‘FirewallD’ in RHEL/CentOS 7 and Fedora 21

Page 1 of 3123

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Babin Lonston

I'm Working as a System Administrator for last 10 year's with 4 years experience with Linux Distributions, fall in love with text based operating systems.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

10 Responses

  1. Ben says:

    Another alternative to iptables is to use a service like HeatShield, which will let you set up a strong and powerful firewall to prevent unauthorized access to services running on your servers, such as SSH and MySQL. HeatShield also includes brute force blocking to prevent malicious SSH login attempts into your server.

  2. Bun Hin says:

    Hi Babin,
    I would like to transfer this below iptables rule to allow incoming nfs connection (example to allow only from network) into the firewalld rule, how to get correct or equivalent in the firewalld?

    -A INPUT -s -m state –state NEW -p udp –dport 111 -j ACCEPT
    -A INPUT -s -m state –state NEW -p tcp –dport 111 -j ACCEPT
    -A INPUT -s -m state –state NEW -p tcp –dport 2049 -j ACCEPT
    -A INPUT -s -m state –state NEW -p tcp –dport 32803 -j ACCEPT
    -A INPUT -s -m state –state NEW -p udp –dport 32769 -j ACCEPT
    -A INPUT -s -m state –state NEW -p tcp –dport 892 -j ACCEPT
    -A INPUT -s -m state –state NEW -p udp –dport 892 -j ACCEPT
    -A INPUT -s -m state –state NEW -p tcp –dport 875 -j ACCEPT
    -A INPUT -s -m state –state NEW -p udp –dport 875 -j ACCEPT
    -A INPUT -s -m state –state NEW -p tcp –dport 662 -j ACCEPT
    -A INPUT -s -m state –state NEW -p udp –dport 662 -j ACCEPT

    by reading your tutorial, i am assume to put the port in nfs.xml file, and add rich text rule in public zone? but not sure

    Could you please share to do it correctly.

    Thank you,

  3. DR says:

    Very good article, thanks.

  4. Zoran says:


    Thanks for this! Would it be possible to add a “bittorrent/p2p” service to firewalld and try blocking it?

  5. seighalani says:

    thanks a lot for your kind of help

  6. henry says:

    It’s easier to understand and use firewalld

  7. Eduardo Hernacki says:


    When using firewalld, you should also disable and mask the “ip6tables” and “ibtables” services.

Got something to say? Join the discussion.

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