Skip to content

Instantly share code, notes, and snippets.

View mcbhenwood's full-sized avatar

Mark Henwood mcbhenwood

View GitHub Profile
@aw
aw / gist:6823356
Created October 4, 2013 09:29
[FIX] Amazon EC2 gateway NAT doesn't work?
# Had this crazy networking problem when trying to use an EC2 instance as a NAT gateway.
#
# Here's a fix I found buried in documentation here:
# http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html
#
Disabling Source/Destination Checks
Each EC2 instance performs source/destination checks by default. This means that the instance must be the source or destination of any traffic it sends or receives. However, a NAT instance must be able to send and receive traffic when the source or destination is not itself. Therefore, you must disable source/destination checks on the NAT instance.