Skip to main content

Maintain a whitelist of IP address blocks to access AWS over SSH

Project description

A small tool to make it pretty simple to add and remove ip addresses (or CIDR blocks) from an AWS security group. This acts like a sort of oversimplified VPN, where you can quickly give yourself SSH access to a project as you move about from netwowrk to network.

Better Solutions

Anyone who knows enough to use a tool like this likely knows that there are better options available, from hardware VPNs to software VPNs hosted on an EC2 instance, and so forth. If you are using this tool and you haven’t even considered using something better, this is your chance: look at the better options, and see if they fit your needs.

Of course, most of those other options require you to get additional hardware or software resources involved and might come with costs. I understand, that’s why I made a little tool to make do.

Installing

This is a python tool, packaged as a python module, so you should be able to just run

$ pip install awswl

Of course, if you don’t know what a python module is, or you don’t have python and pip installed, you may have additional work ahead of you.

Usage

If you want usage help at the command line, try:

$ awswl --help

You can list the IP address blocks that are authorized:

$ awswl --list

Authorize your current IP Address:

$ awswl --add-current

Remove authorization for your current IP:

$ awswl --remove-current

For each of these commands, you need to tell awswl which security group to use, which you can do with the --sgid command-line option or using an environment variable.

Environment

All of these require you to have AWS credentials set up in advance, stored in ~/.aws/credentials, and if you need to use a profle, you can configure it with AWS_PROFILE. If you want to identify the security group using a command-line variable so that you don’t have to put it into each command invocation, you can put it in AWSWL_SGID.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
awswl-1.0.0a1-py2.py3-none-any.whl (6.4 kB) Copy SHA256 hash SHA256 Wheel py2.py3
awswl-1.0.0a1.tar.gz (5.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page