Skip to content

A command line utility to update AWS Security Groups rules.

License

Notifications You must be signed in to change notification settings

wagnerluis1982/ip-liberator

Repository files navigation

IP Liberator

Documentation Status

A command line utility to update AWS Security Groups rules.

Features

  • Update a list of security groups of your AWS account at once.
  • Grant access to informed ports for your current IP address or an informed IP.
  • Read profile files in JSON with all the information needed to contact.
  • Fit for use as script (e.g. to update your dynamic IP regularly).

Installation

$ pip install ip-liberator

Quickstart

Consider a file /path/my-profile.json with the following content:

{
  "credentials": {
    "access_key": "<AWS_ACCESS_KEY>",
    "secret_key": "<AWS_SECRET_KEY>",
    "region_name": "<AWS REGION>"
  },
  "config": {
    "operator": "John",
    "services": [
      {
        "name": "FTP+SFTP",
        "port": "21-22"
      },
      {
        "name": "HTTPS",
        "port": "443"
      }
    ],
    "security_groups": [
      "sg-<GROUP_ID_1>",
      "sg-<GROUP_ID_2>"
    ]
  }
}

Using the profile defined above will create or update two entries in the informed security groups:

  • John FTP+SFTP granting access for the current IP the ports 21 and 22.
  • John HTTPS granting access for the current IP the port 443.

To accomplish it, simply run:

$ ip-liberator --profile /path/my-profile.json
IP Liberator v0.2.4
-------------------
operator: 'John'
tag: 'ip-liberator'
-------------------
Authorizing rules ['FTP+SFTP (21-22)', 'HTTPS (443)']

Credits

Authors

About

A command line utility to update AWS Security Groups rules.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published