A tool to update Linode/ACC firewall rules with your current IP address.
Project description
acc-firewall_updater
A tool to automatically update the Akamai Connected Cloud (ACC) / Linode firewall rules to allow your IP
Description
acc-fwu
is a command-line tool to automatically update Linode/ACC firewall rules with your current IP address. This is particularly useful for dynamically updating firewall rules to allow access from changing IP addresses, like when you visit the gym or you're sat in an airport.
Installation
You can install the package via pip
:
pip install acc-fwu
Alternatively, you can install it directly from the source:
git clone https://github.com/johnybradshaw/acc-firewall_updater.git
cd acc-firewall_updater
pip install --use-pep517 .
Usage
First-time Setup
The first time you use acc-fwu
, you’ll need to provide your Linode/ACC Firewall ID and optionally the label for the rule you want to create or update:
acc-fwu --firewall_id <FIREWALL_ID> --label <RULE_LABEL>
For example:
acc-fwu --firewall_id 123456 --label "Allow-My-Current-IP"
This command will do two things:
- It will create or update the firewall rule with your current public IP address.
- It will save the
firewall_id
andlabel
to a configuration file(~/.acc-fwu-config)
for future use.
Subsequent Usage
After the initial setup, you can simply run acc-fwu
without needing to provide the firewall_id
and label
again:
acc-fwu
This will:
- Load the saved
firewall_id
andlabel
from the configuration file. - Update the firewall rule with your current public IP address.
Updating the Configuration
If you need to change the firewall_id
or label
, you can do so by running:
acc-fwu --firewall_id <NEW_FIREWALL_ID> --label <NEW_RULE_LABEL>
This will update the configuration file with the new values.
Removing Firewall Rules
You can remove the firewall rule by running:
acc-fwu --remove
Configuration File
The acc-fwu
tool saves the firewall_id
and label
in a configuration file located at ~/.acc-fwu-config
. This file is automatically managed by the tool, so you generally won’t need to edit it manually.
Summary of Changes
2024-08-20
- Fixes: Fixed issue with updating the firewall rule.
2024-08-18
- Remove Firewall Rules: Instructions on how to remove the firewall rule.
2024-08-17
- First-time Setup: Instructions on how to set the
firewall_id
andlabel
the first time you use the tool. - Subsequent Usage: Information about running the tool without additional arguments after the initial setup.
- Updating the Configuration: Guidance on how to change the stored
firewall_id
andlabel
if needed. - Configuration File: Brief explanation of the config file and its location.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file acc_fwu-0.1.2.tar.gz
.
File metadata
- Download URL: acc_fwu-0.1.2.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9953f61d1f2588a4d7674a1010b1d932789d9779a0b974164d7b944ee02a5de |
|
MD5 | f4bd4705421dc82617a7d07063a29c14 |
|
BLAKE2b-256 | f0a92ca1ee43425cc5adc36f3277966683932d2bbc19c96dd11bcf127e4f9912 |
File details
Details for the file acc_fwu-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: acc_fwu-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f5fe971433928a09280cc4f92942440cc88423c287c9601bf27ff032b8c7b0 |
|
MD5 | f0658988aa61fa7447a468c24262e68b |
|
BLAKE2b-256 | d382371318bcb2c516d7c85f4443d02175b2a2b76862f0dd5c703d3c61e6de7f |