Giter Club home page Giter Club logo

aws-ipranges-api's Introduction

AWS-IPRanges-API

Serverless website that outputs AWS IP prefixes as web feeds for use by firewalls and other applications. Allows IP address lookup of corresponding Region, service and network border group.

Description

AWS publishes its IP ranges in json format through ip-ranges.json. The IP prefixes are commonly used by network firewalls for inbound and/or outbound network access control.

A common use case is Amazon CloudFront with on-premise web server as origin; only CloudFront origin facing (and if in use Route 53 Health Checks) IP prefixes are allowed inbound access at perimeter network firewall. Another use case is for egress control where firewall administrators allow-list or deny-list outbound network acess to all or specific AWS service or Region such as Route 53 name servers or Amazon S3

Typically, the firewall administrator will extract out required IP prefixes from ip-ranges.json for use in firewall rules. The IP prefixes need to be updated whenever there are changes and users can subscribe to AWS IP address ranges notifications

This project makes IP prefixes available as web feeds for automatic updates by firewalls. Users have the option to filter IP prefixes by service, Region and network border group, and in combined IPv4 and IPv6, IPv4 only or IPv6 only format. Entire solution is serverless and can be deployed with a single CloudFormation template.

Solution is mentioned in blog post How to enhance CloudFront origin security of on-premise web servers using third-party firewalls

Architecture Diagram

image

Deployment Options

The solution can be implemented using different AWS Services. Click on links below for deployment details:

Firewall Setup

Firewalls that support external IP prefixes web feeds include (but not limited to)

Refer to vendor website documentation for configuration steps.

Output options

Use different URLs to return IP prefixes and other values:

  • / : return CloudFront origin facing prefixes, customizable via awsServices in CloudFormation template and Lambda function SERVICES environment variable
  • /SERVICE : listing of available services
  • /REGION : listing of available Regions
  • /NETWORK : listing of network border groups which are a unique set of Availability Zones or Local Zones from where AWS advertises IP addresses
  • /SERVICE/<SERVICE> : prefixes for specific SERVICE, e.g. /SERVICE/CLOUDFRONT_ORIGIN_FACING
  • /SERVICE/<SERVICE>/<REGION> : prefixes for specific SERVICE and REGION, e.g. /SERVICE/S3/us-east-1
  • /REGION/<REGION> : prefixes for specific REGION, e.g. /REGION/ap-southeast-1
  • /NETWORK/<NETWORK> : prefixes for specific network border group, e.g. /NETWORK/us-east-1-nyc-1
  • /SEARCH/<IP ADDRESS>: IPv4 or IPv6 address to query, e.g. /SEARCH/13.34.96.200. This will return any matching entries, e.g.
    ip_prefix,region,service,network_border_group
    13.34.96.224/27,ap-southeast-1,AMAZON,ap-southeast-1
    
  • /createDate : ip-ranges.json publication date and time, in UTC YY-MM-DD-hh-mm-ss format
  • /syncToken : ip-ranges.json publication time, in Unix epoch time format

For IP prefixes, you can append /ipv4.txt or /ipv6.txt to filter by IPv4 or IPv6 respectively, e.g. /SERVICE/ROUTE53_HEALTHCHECKS/ipv4.txt

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-ipranges-api's People

Contributors

amazon-auto avatar limmike avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.