A Python application that updates your security group based off of your current IP address. Currently being expanded to more than just AWS provider.
Find a file
2025-11-23 21:19:30 -08:00
.gitignore updated .gitignore 2025-11-23 21:15:45 -08:00
cloud-fw-ip-updater.py minor change to get AWS to work again after other refactor, next will be refactoring of it.` 2025-11-17 18:51:24 -08:00
LICENSE Initial commit 2017-06-28 20:09:27 -07:00
Pipfile inital commits 2025-11-16 16:19:54 -08:00
Pipfile.lock inital commits 2025-11-16 16:19:54 -08:00
README.md latest 2025-11-16 19:28:39 -08:00

Cloud Firewall IP Updater

A Python application that updates a cloud provider firewall/security group based off of your current IP address.

Prerequisites

  • Python 3.13
  • pipenv is used for environment management.
  • AWS - Profile configured with a default profile specified has necessary permissions to update an EC2 Security Group (you can have this setup without having AWSCLI installed see HERE
  • Digital Ocean - An API Token with proper access to Firewall API. Instructions HERE for how to create

How do I get set up?

  • Run pipenv install to install the python requirements listed in Pipefile/Pipfile.lock in a new virtual environment. Make sure to install pipenv from above link before this.

Running the script

Before you can run the program you will need to activate/enter your python virtual environment using pipenv shell then run the following commands.

For AWS

python cloud-fw-ip-updater.py --cloud aws --fw_id sg-abc123456

For Digital Ocean

python cloud-fw-ip-updater.py --cloud do --fw_id AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE --do_token XXXXXXXXXXXXXXXXXXXXX

To display your current ip.

python cloud-fw-ip-updater.py --ip_check

ToDo

  • Add in functionality to be able to pass in which AWSCLI profile you want to use

Details

I frequently use a VPN, especially when on public or unknown Wi-Fi. For this reason I was always having to login to various Cloud providers console to update the cloud firewall updating my IP. I decided to write this python script to solve this problem.