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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content