How to setup default firewall policies in Red Hat Enterprise Linux 6 during kickstart installation?

Solution Verified - Updated -

Issue

  • How to setup default firewall policies in Red Hat Enterprise Linux 6 during kickstart installation?
  • Would like to set default iptables policies for INPUT and FORWARD to DROP in Kickstart file.
  • The kickstart firewall settings are as follows:
firewall --port=3269:tcp --service=ssh
  • And a %post section that does the following
iptables -P INPUT DROP
iptables -P FORWARD DROP
  • However, when the system reboots after the kickstart finishes, the default policies for INPUT and FORWARD are ACCEPT. How to make that accepted in kickstart?

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.