role firewall: add support for installation of gateway firewall - maybe not realy usable..

This commit is contained in:
2021-04-01 15:57:48 +02:00
parent 76fb3c68ac
commit 529e115716
6 changed files with 2344 additions and 1878 deletions

View File

@ -1,5 +1,21 @@
# {{ ansible_managed }}
{%- if groups['gateway_server']|string is search(inventory_hostname) %}
[Unit]
Description=IPv6 Firewall with ip6tables
After=network.target
[Service]
SyslogIdentifier="ip6t-gateway"
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/sbin/ip6t-firewall-gateway start
ExecStop=/usr/local/sbin/ip6t-firewall-gateway stop
User=root
[Install]
WantedBy=multi-user.target
{% else %}
[Unit]
Description=IPv6 Firewall with ip6tables
After=network.target
@ -13,4 +29,5 @@ User=root
[Install]
WantedBy=multi-user.target
{% endif %}

View File

@ -1,5 +1,23 @@
# {{ ansible_managed }}
{%- if groups['gateway_server']|string is search(inventory_hostname) %}
[Unit]
Description=IPv4 Firewall with iptables
After=network.target
[Service]
SyslogIdentifier="ipt-gateway"
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/sbin/ipt-firewall-gateway start
ExecStop=/usr/local/sbin/ipt-firewall-gateway stop
User=root
[Install]
WantedBy=multi-user.target
{% else %}
[Unit]
Description=IPv4 Firewall with iptables
After=network.target
@ -13,4 +31,5 @@ User=root
[Install]
WantedBy=multi-user.target
{% endif %}