How import blacklist domain to Proxmox 6.4-3

Apr 9, 2021
12
0
6
26
Hi

I exported blacklist domains from older Proxmox Gateway to file blacklist.txt.
This file has this structure
[
{
"descr" : "bizwebsite.com",
"domain" : "bizwebsite.com",
"id" : "2881",
"ogroup" : 2,
"otype" : 1002,
"otype_text" : "Domain",
"receivertest" : 0
}, ....
]
How Can I import this blacklist to new Proxmox Gateway?

Best regards
 
In that case you can use the PMG-API or pmgsh:
https://pmg.proxmox.com/pmg-docs/api-viewer/index.html#/config/ruledb/who
(is the api-path you're interested in (and the POST method there)

the REST-API of PMG is quite similar to the one of PVE - check out the docs for it:
https://pve.proxmox.com/wiki/Proxmox_VE_API

the text-file looks like a json-dump - you should be able to get all information in a sensible way out using jq (or any other json parser)
https://lzone.de/cheat-sheet/jq

I hope this helps!
 

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!