First time to use github's gists to embed code here. This little weekend project will connect your Ubuntu 12.04 server to Amazon VPC through IPSec.


./ [amazon-generic-config-file.txt]

Where the parameter is the "Generic" and "Vendor Agnostic" config file downloaded from the Amazon Console. You also need to change REMOTE_NET and WAN_INT variables to suit your needs.

You do need the following for IPSec to work:

  • Public and static IP Address
  • Open ports for UDP 500, protocol AH, protocol ESP,  TCP 179 for BGP
This script has been test with Ubuntu 12.04.