kowabunga.cloud.firewall role – Install, configure, and start iptables or nftables based firewall.
Note
This role is part of the kowabunga.cloud collection (version 0.1.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it use: ansible-galaxy collection install kowabunga.cloud
.
To use it in a playbook, specify: kowabunga.cloud.firewall
.
Entry point main
– Install, configure, and start iptables or nftables based firewall.
Synopsis
Install, configure, and start iptables or nftables based firewall.
Parameters
Parameter |
Comments |
---|---|
List of DNAT rules to be applied. Only relevant when nftables firewall mode is enabled. Default: |
|
Destination IP address to NAT to. |
|
Name of the network interface. Usually the one holding the public IP address. |
|
User-friendly rule name, description or comment. |
|
List of ports to NAT to (e.g. 80, 443 …) |
|
Protocol to accept Choices:
|
|
Turn on iptables on public (i.e. Internet-facing) network interface. Useless if no public network interface is to be found. Setup a deny-all filtering policy, with blocked ICMP requests and explicitly opened UDP/TCP ports. Private network interface remains unfiltered. Choices:
|
|
List of network interfaces that shall be added as accept all in LAN/VLAN interfaces. Used for inter-VLANs communication. Default: |
|
List of extra LAN firewall rules to be applied. Default: |
|
Action to be performed. Choices:
|
|
Destination port. All if unspecified. |
|
Source IP address, CIDR formatted. |
|
User friendly rule name, description or comment. |
|
Name of network protocol to be used. Example: udp, tcp, other custom ones … |
|
Destination IP address, CIDR formatted. |
|
Defines which firewalling stack is to be configured Choices:
|
|
List of TCP ports to be explictly opened on network firewall. Default: |
|
List of UDP ports to be explictly opened on network firewall. Default: |
|
Turn firewall as a pass-through router. Source/Destination NAT will be enabled from/to any interface. Only relevant when nftables firewall mode is enabled. Dangerous: recommended not to use on Internet-exposed instances. Choices:
|
|
List of remote public IP addresses to be trusted, accepting SSH traffic from CIDR formatted. Default: |
|
List of extra WAN firewall rules to be applied. Default: |
|
Action to be performed. Choices:
|
|
Destination port. All if unspecified. |
|
Source IP address, CIDR formatted. |
|
User friendly rule name, description or comment. |
|
Name of network protocol to be used. Example: udp, tcp, other custom ones … |
|
Destination IP address, CIDR formatted. |