Issue when creating a firewall rule

Sam0x

New Member
Mar 1, 2023
3
0
1
Hi,

When I was trying to create a new firewall rule through the api, I used the pos parameter but it didn't have any effect on the position.
pvesh create /nodes/{node}/qemu/{vmid}/firewall/rules --action "DROP" --type "in" --comment "create rule at some position" --pos 2
Even though I had more that 3 rules, it wouldn't set it to position 2.
 
Hello,

Sorry for resurrecting old one.
i'm using pve-manager/8.1.10/4b06efb5db453f29, and I have the very similar issue.

We've created internal Python tool to populate the firewall rules on a VM level by POST on /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules as described on https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/firewall/rules

Experiencing the same - each and every rule I create got created on position 0, regardless on the pos I supply on the json. It is either a bug or I'm really missing something here.

For the moment, I'll solve it with sorting the rules in reverse order before posting it with the API. First we clear all existing rules, and then POST 1 by 1 in reverse order, so we can have it correctly.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!