Search This Blog

2015-12-12

Kickstart Firewall Configuration

There are a couple ways to configure the firewall during a CentOS or Redhat kickstart installation.

Method 1 - Use the firewall command in Kickstart syntax

The firewall command is a supported kickstart command and is basically a wrapper for firewall-offline-cmd as it uses the same parameters

The following example opens up both port 80 and 443 to allow http and https traffic

firewall --enabled --port 80:tcp,443:tcp


Method 2 - Use the firewall-offline-cmd in the %post section

You can perform firewall config using the firewall-offline-cmd in the %post section of the kickstart file. However, you must be aware the syntax is different from the typical firewall-cmd that you may be used to using with firewalld

I do not have an example right now but as far as I am aware the syntax is very similar to the firewall command in method 1

No comments:

Post a Comment