Skip to content

Download VPN Configurations and convert to vendor config (As same as Download Configuration from AWS console).

License

Notifications You must be signed in to change notification settings

asantos2000/aws_vpn_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Download and convert AWS VPN Configuration to Vendor specific config file

This utility download and converts the VPN configuration file from Boto3 EC2 Client

    client = boto3.client('ec2')

    response = client.describe_vpn_connections(
        VpnConnectionIds=[
            vpn_id,
        ],
        DryRun=False
    )

to vendor specific file configuration from http://ec2-downloads.s3.amazonaws.com/2009-07-15/customer-gateway-config-formats.xml

Install

$ git clone https://github.com/asantos2000/aws_vpn_config.git

$ cd aws_vpn_config

$ python setup.py build

$ python setup.py install

# Or
$ pip install .

# Or developer install
$ pip install -e . 

Usage

# The help file
$ aws-vpn-config --help
usage: aws-vpn-config [-h] {list,version,download} ...

Download VPN Configurations and convert to vendor config (As same as Download
Configuration from AWS console). Examples: $ aws-vpn-config download
--vpn-id vpn-08cad142f9189e87d -c 10. $ aws-vpn-config list

positional arguments:
  {list,version,download}
                        Commands
    list                List all converters
    version             Prints the version
    download            Download config and converter

optional arguments:
  -h, --help            show this help message and exit

$ aws-vpn-config download --help
usage: aws-vpn-config download [-h] [-c CONVERTER_ID] [-v VPN_ID]

optional arguments:
  -h, --help            show this help message and exit
  -c CONVERTER_ID, --converter-id CONVERTER_ID
                        ID of config converter. Use --list to see all options
  -v VPN_ID, --vpn-id VPN_ID
                        AWS VPN ID


# List options for conversion
$ aws-vpn-config list
+-------+------------------------+----------------------------+------------------------+--------------------------------------------+
| index |         Vendor         |          Platform          |        Software        |                  Filename                  |
+-------+------------------------+----------------------------+------------------------+--------------------------------------------+
|   0   |  Cisco Systems, Inc.   |     ISR Series Routers     |       IOS 12.4+        |    customer-gateway-cisco-ios-isr.xslt     |
|   1   | Juniper Networks, Inc. |      J-Series Routers      |       JunOS 9.5+       |   customer-gateway-juniper-junos-j.xslt    |
|   2   |        Generic         |            None            |    Vendor Agnostic     |       customer-gateway-generic.xslt        |
|   3   | Juniper Networks, Inc. | SSG and ISG Series Routers |     ScreenOS 6.2+      | customer-gateway-juniper-screenos-6.2.xslt |
|   4   | Juniper Networks, Inc. | SSG and ISG Series Routers |      ScreenOS 6.1      | customer-gateway-juniper-screenos-6.1.xslt |
|   5   |         Yamaha         |        RTX Routers         |     Rev.10.01.16+      |      customer-gateway-yamaha-rtx.xslt      |
|   6   |         Sophos         |            UTM             |           V9           |        customer-gateway-astaro.xslt        |
|   7   |         Sophos         |            ASG             |        V8.300+         |        customer-gateway-astaro.xslt        |
|   8   |  Cisco Systems, Inc.   |      ASA 5500 Series       |        ASA 8.2+        |      customer-gateway-cisco-asa.xslt       |
|   9   |        Fortinet        |    Fortigate 40+ Series    |   FortiOS 4.0+ (GUI)   |    customer-gateway-fortigate-gui.xslt     |
|   10  |        Fortinet        |    Fortigate 40+ Series    |      FortiOS 4.0+      |      customer-gateway-fortigate.xslt       |
|   11  |   Palo Alto Networks   |         PA Series          |   PANOS 4.1.2+ (GUI)   |     customer-gateway-paloalto-gui.xslt     |
|   12  |   Palo Alto Networks   |         PA Series          |      PANOS 4.1.2+      |       customer-gateway-paloalto.xslt       |
|   13  |         Vyatta         |     Vyatta Network OS      | Vyatta Network OS 6.5+ |        customer-gateway-vyatta.xslt        |
|   14  |       Microsoft        |       Windows Server       |        2008 R2         | customer-gateway-windows-server-2008.xslt  |
|   15  |          IIJ           |    SEIL/X1 and SEIL/X2     |      SEIL/X 3.70+      |       customer-gateway-iij-seil.xslt       |
|   16  |          IIJ           |          SEIL/B1           |     SEIL/B1 3.70+      |       customer-gateway-iij-seil.xslt       |
|   17  |          IIJ           |          SEIL/x86          |     SEIL/x86 2.30+     |       customer-gateway-iij-seil.xslt       |
+-------+------------------------+----------------------------+------------------------+--------------------------------------------+


# Download and convert the config
$ aws-vpn-config download --vpn-id vpn-11cad123f9876e90d -c 10
Files created: customer-gateway-fortigate.xslt, vpn-11cad123f9876e90d.xml and vpn-11cad123f9876e90d.txt

Issues

  • The config file generated by conversion (vpc_id.txt) is slight different from the file generate by AWS Console. I'm talking with AWS guys to figure out why.

References

License

Apache License Version 2.0

About

Download VPN Configurations and convert to vendor config (As same as Download Configuration from AWS console).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages