||3 months ago|
|.gitignore||3 months ago|
|LICENSE||4 years ago|
|Pipfile||4 months ago|
|Pipfile.lock||3 months ago|
|README.md||3 months ago|
|cloud-fw-ip-updater.py||3 months ago|
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?
pipenv installto 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.