A Python application that updates your security group based off of your current IP address. Currently being expanded to more than just AWS provider.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.8 KiB

Cloud Firewall IP Updater

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


  • Python 3.8
  • 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.


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


  • add in more error handling especially around checking jsonip.com
  • Change response to be a friendly message vs. json output
  • Add in functionality to be able to pass in which AWSCLI profile you want to use


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.