浏览代码

Merge pull request #21 from aboe76/update_config_6.x

update firewalld formula for firewalld > 0.6
tags/v0.6.2
Javier Bértoli 6 年前
父节点
当前提交
8694a11de5
没有帐户链接到提交者的电子邮件
共有 5 个文件被更改,包括 35 次插入0 次删除
  1. +11
    -0
      firewalld/backend.sls
  2. +1
    -0
      firewalld/defaults.yaml
  3. +21
    -0
      firewalld/files/firewalld.conf
  4. +1
    -0
      firewalld/init.sls
  5. +1
    -0
      pillar.example

+ 11
- 0
firewalld/backend.sls 查看文件

@@ -0,0 +1,11 @@
# == State: firewalld.backends
#
# This state ensures that /etc/firewalld/backends/ exists.
#
{% from "firewalld/map.jinja" import firewalld with context %}

{%- if salt['pillar.get']('firewalld:installbackend') %}
package_backend:
pkg.installed:
- name: {{ firewalld.backendpackage }}
{%- endif %}

+ 1
- 0
firewalld/defaults.yaml 查看文件

@@ -3,5 +3,6 @@
firewalld:
package: firewalld
ipsetpackage: ipset
backendpackage: nftables
service: firewalld
config: /etc/firewalld.conf

+ 21
- 0
firewalld/files/firewalld.conf 查看文件

@@ -55,3 +55,24 @@ IndividualCalls={{ firewalld.IndividualCalls|default('no') }}
# Default: off
LogDenied={{ firewalld.LogDenied|default('off') }}
{%- endif %}
{%- if firewalld.get('AutomaticHelpers', False) %}

# AutomaticHelpers
# For the secure use of iptables and connection tracking helpers it is
# recommended to turn AutomaticHelpers off. But this might have side effects on
# other services using the netfilter helpers as the sysctl setting in
# /proc/sys/net/netfilter/nf_conntrack_helper will be changed.
# With the system setting, the default value set in the kernel or with sysctl
# will be used. Possible values are: yes, no and system.
# Default: system
AutomaticHelpers={{ firewalld.AutomaticHelpers|default('sytem') }}
{%- endif %}
{%- if firewalld.get('FirewallBackend', False) %}

# FirewallBackend
# Selects the firewall backend implementation.
# Choices are:
# - nftables (default)
# - iptables (iptables, ip6tables, ebtables and ipset)
FirewallBackend={{ firewalld.FirewallBackend|default('nftables') }}
{%- endif %}

+ 1
- 0
firewalld/init.sls 查看文件

@@ -18,6 +18,7 @@ firewalld-unsupported:
include:
- firewalld.config
- firewalld.ipsets
- firewalld.backend
- firewalld.services
- firewalld.zones
- firewalld.direct

+ 1
- 0
pillar.example 查看文件

@@ -2,6 +2,7 @@
firewalld:
enabled: True
ipset: True
installbackend: False
default_zone: public

services:

正在加载...
取消
保存