How to Disable CentOS Firewall & Suexec

Written by william nagel
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Disable CentOS Firewall & Suexec
Change the operating settings of your CentOS server. (Thinkstock Images/Comstock/Getty Images)

If you're running a CentOS Linux server, deactivating the machine's firewall on and off can help make remote diagnostics and configuration easier. Apache suEXEC allows you to run your web processes as a user other than the default; disabling it ensures that all web processes are active under a single user. Knowing how to manipulate and configure the settings of your CentOS Linux server gives you more control over its behaviour and is a crucial part of network management.

Skill level:
Moderately Challenging

Things you need

  • Root privileges

Show MoreHide


  1. 1

    Log into your CentOS machine as the root user. You must be the root user to disable the firewall and suEXEC.

  2. 2

    Type "service iptables save" into the command line and press "Enter."

  3. 3

    Type "service iptables stop" into the command line and press "Enter." The firewall will deactivate.

  4. 4

    Type "chkconfig iptables off" into the command line and press "Enter." The firewall will no longer activate at start-up.

  5. 5

    Type "cd /usr/local/apache/sbin" and press "Enter" to navigate to the directory containing the suEXEC configuration file.

  6. 6

    Type "rm suexec" and press "Enter" to delete the suEXEC configuration file. If you want to temporarily disable suEXEC, type "mv suexec OFFsuexec" and press "Enter" to change the name of the configuration file. Restore your suEXEC configuration file by typing "mv OFFsuexec suexec" and pressing "Enter."

  7. 7

    Restart the server to ensure all changes are applied. Type "shutdown -r now" and press "Enter" to reboot the server.

Tips and warnings

  • If you are running an IPv6 firewall, type "ip6tables" instead of "iptables" in steps 2, 3, and 4 to disable the firewall.
  • Use the "rm suexec" command in step 6 only if you want to permanently disable suEXEC on the server. Once the file is removed, you will need to create a new suEXEC configuration file to use the service again.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.