Skip to content

nodes / firewall ​

9 operations.

GET /nodes/{node}/firewall ​

ts
proxmox.nodes.$(node).firewall.$get()

Directory index.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node

GET /nodes/{node}/firewall/log ​

ts
proxmox.nodes.$(node).firewall.log.$get()

Read firewall log

Returns an array of object.

ParameterTypeRequiredNotes
limitnumbermin 0
nodestringyesThe cluster node name. — format pve-node
sincenumberDisplay log since this UNIX epoch. — min 0
startnumbermin 0
untilnumberDisplay log until this UNIX epoch. — min 0

GET /nodes/{node}/firewall/options ​

ts
proxmox.nodes.$(node).firewall.options.$get()

Get host firewall options.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node

PUT /nodes/{node}/firewall/options ​

ts
proxmox.nodes.$(node).firewall.options.$put()

Set Firewall options.

Returns nothing.

ParameterTypeRequiredNotes
deletestringA list of settings you want to delete. — format pve-configid-list
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
enablebooleanEnable host firewall rules. — default 1
log_level_forwardemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for forwarded traffic.
log_level_inemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for incoming traffic.
log_level_outemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for outgoing traffic.
log_nf_conntrackbooleanEnable logging of conntrack information. — default 0
ndpbooleanEnable NDP (Neighbor Discovery Protocol). — default 1
nf_conntrack_allow_invalidbooleanAllow invalid packets on connection tracking. — default 0
nf_conntrack_helpersstringEnable conntrack helpers for specific protocols. Supported protocols: amanda, ftp, irc, netbios-ns, pptp, sane, sip, snmp, tftp — format pve-fw-conntrack-helper, default ""
nf_conntrack_maxnumberMaximum number of tracked connections. — min 32768, default 262144
nf_conntrack_tcp_timeout_establishednumberConntrack established timeout. — min 7875, default 432000
nf_conntrack_tcp_timeout_syn_recvnumberConntrack syn recv timeout. — min 30, max 60, default 60
nftablesbooleanEnable nftables based firewall (tech preview) — default 0
nodestringyesThe cluster node name. — format pve-node
nosmurfsbooleanEnable SMURFS filter.
protection_synfloodbooleanEnable synflood protection — default 0
protection_synflood_burstnumberSynflood protection rate burst by ip src. — default 1000
protection_synflood_ratenumberSynflood protection rate syn/sec by ip src. — default 200
smurf_log_levelemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for SMURFS filter.
tcp_flags_log_levelemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for illegal tcp flags filter.
tcpflagsbooleanFilter illegal combinations of TCP flags. — default 0

GET /nodes/{node}/firewall/rules ​

ts
proxmox.nodes.$(node).firewall.rules.$get()

List rules.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node

POST /nodes/{node}/firewall/rules ​

ts
proxmox.nodes.$(node).firewall.rules.$post()

Create new rule.

Returns nothing.

ParameterTypeRequiredNotes
actionstringyesRule action ('ACCEPT', 'DROP', 'REJECT') or security group name. — ≤ 20 chars
commentstringDescriptive comment. — format pve-fw-comment-spec
deststringRestrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
dportstringRestrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-dport-spec
enablenumberFlag to enable/disable a rule. — min 0
icmp-typestringSpecify icmp-type. Only valid if proto equals 'icmp' or 'icmpv6'/'ipv6-icmp'. — format pve-fw-icmp-type-spec
ifacestringNetwork interface name. You have to use network configuration key names for VMs and containers ('net\d+'). Host related rules can use arbitrary strings. — format pve-iface, ≤ 20 chars
logemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for firewall rule.
macrostringUse predefined standard macro. — ≤ 128 chars
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0
protostringIP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'. — format pve-fw-protocol-spec
sourcestringRestrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
sportstringRestrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-sport-spec
typein | out | forward | groupyesRule type.

GET /nodes/{node}/firewall/rules/{pos} ​

ts
proxmox.nodes.$(node).firewall.rules.$(pos).$get()

Get single rule data.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0

PUT /nodes/{node}/firewall/rules/{pos} ​

ts
proxmox.nodes.$(node).firewall.rules.$(pos).$put()

Modify rule data.

Returns nothing.

ParameterTypeRequiredNotes
actionstringRule action ('ACCEPT', 'DROP', 'REJECT') or security group name. — ≤ 20 chars
commentstringDescriptive comment. — format pve-fw-comment-spec
deletestringA list of settings you want to delete. — format pve-configid-list
deststringRestrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
dportstringRestrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-dport-spec
enablenumberFlag to enable/disable a rule. — min 0
icmp-typestringSpecify icmp-type. Only valid if proto equals 'icmp' or 'icmpv6'/'ipv6-icmp'. — format pve-fw-icmp-type-spec
ifacestringNetwork interface name. You have to use network configuration key names for VMs and containers ('net\d+'). Host related rules can use arbitrary strings. — format pve-iface, ≤ 20 chars
logemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for firewall rule.
macrostringUse predefined standard macro. — ≤ 128 chars
movetonumberMove rule to new position <moveto>. Other arguments are ignored. — min 0
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0
protostringIP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'. — format pve-fw-protocol-spec
sourcestringRestrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
sportstringRestrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-sport-spec
typein | out | forward | groupRule type.

DELETE /nodes/{node}/firewall/rules/{pos} ​

ts
proxmox.nodes.$(node).firewall.rules.$(pos).$delete()

Delete rule.

Returns nothing.

ParameterTypeRequiredNotes
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0