Automate the content of a Vultr firewall group using Python.
This script uses pipenv
to manage dependencies and environment variables, as such setup is as simple as.
- Install
python3
,python3-pip
. - Using
python3-pip
installpipenv
. - Access your Vultr account and generate and API key.
- Copy
.env.example
to.env
. - Populate the
.env
file as required, for example:VULTR_API_KEY=BG..<SNIP>..SHA LOGURU_LEVEL=INFO VULTR_FWGROUP_NAME=some-group-name TCP_PORTS=22,80,443 UDP_PORTS=53
- To install the script dependencies run
pipenv install
.
To run the script simply execute: pipenv run ./vultr.py