community.proxmox.proxmox_cluster_firewall module – Cluster-level firewall options management for Proxmox VE cluster
Note
This module is part of the community.proxmox collection (version 2.0.0).
You might already have this collection installed if you are using the ansible package.
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 community.proxmox.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.proxmox.proxmox_cluster_firewall.
New in community.proxmox 2.0.0
Synopsis
Manage firewall options at the cluster level in Proxmox VE.
Enable or disable the firewall cluster-wide, set default policies, ebtables, and log ratelimiting.
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer >= 2.3
requests
Parameters
Parameter |
Comments |
|---|---|
Specify the target host of the Proxmox VE cluster. Uses the |
|
Specify the OTP. Uses the |
|
Specify the password to authenticate with. Uses the |
|
Specify the target port of the Proxmox VE cluster. Uses the |
|
Time limit for requests towards the Proxmox VE API. Default: |
|
Specify the token ID. Uses the |
|
Specify the token secret. Uses the |
|
Specify the user to authenticate with. Uses the |
|
Path to a local certificate, which will be used to verify TLS connections. Ignored if |
|
Enable ebtables rules cluster-wide. Choices:
|
|
Default policy for forwarded traffic. Choices:
|
|
Default policy for incoming traffic. Choices:
|
|
Log ratelimiting settings. |
|
Initial burst of packages which will always get logged before the rate is applied. Default: |
|
Enable or disable log ratelimiting. Choices:
|
|
Frequency with which the burst bucket gets refilled. Must match the pattern Default: |
|
Default policy for outgoing traffic. Choices:
|
|
Enable or disable the firewall cluster-wide. Choices:
|
|
Validate the TLS certificates used for the connection to the Proxmox VE API. May be set through the environment variable Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Action group: community.proxmox.proxmox |
Use |
|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
See Also
See also
- Proxmox VE Firewall configuration
Complete reference of Proxmox VE Firewall
- Proxmox VE cluster-wide configuration
Complete reference of Proxmox VE Firewall
- Authentication
Complete guide for the Proxmox API authentication
Examples
- name: Set cluster-wide firewall options
community.proxmox.proxmox_cluster_firewall:
state: enabled
ebtables: true
input_policy: DROP
output_policy: ACCEPT
forward_policy: ACCEPT
log_ratelimit:
enabled: false
burst: 10
rate: 5/second
- name: Block ingress and allow egress traffic
community.proxmox.proxmox_cluster_firewall:
state: enabled
ebtables: true
input_policy: DROP
output_policy: ACCEPT
forward_policy: ACCEPT
- name: Set cluster-wide firewall ratelimiting options
community.proxmox.proxmox_cluster_firewall:
state: enabled
ebtables: true
log_ratelimit:
enabled: false
burst: 10
rate: 5/second
- name: Disable cluster-wide firewall
community.proxmox.proxmox_cluster_firewall:
state: disabled
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether ebtables is enabled cluster-wide. Returned: on success Sample: |
|
Whether the firewall is enabled cluster-wide. Returned: on success Sample: |
|
Default policy for forwarded traffic. Returned: on success Sample: |
|
Default policy for incoming traffic. Returned: on success Sample: |
|
Log ratelimiting settings (when present in cluster options). Returned: on success Sample: |
|
A short message on what the module did. Returned: always Sample: |
|
Default policy for outgoing traffic. Returned: on success Sample: |