https://github.com/rubenv/ec2-disable-source-dest
Disable the EC2 source/dest check from within an instance.
https://github.com/rubenv/ec2-disable-source-dest
Last synced: about 1 year ago
JSON representation
Disable the EC2 source/dest check from within an instance.
- Host: GitHub
- URL: https://github.com/rubenv/ec2-disable-source-dest
- Owner: rubenv
- License: mit
- Created: 2016-10-06T09:08:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-29T14:33:02.000Z (about 8 years ago)
- Last Synced: 2025-04-02T06:43:13.291Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ec2-disable-source-dest
Small helper to disable the EC2 source/dest check from within an instance.
## Why?
Imagine you're setting up a [Kubernetes](http://kubernetes.io/) cluster, one
that scales automatically. On [Amazon EC2](https://aws.amazon.com/ec2/), you'd
do that with an autoscaling group.
Depending on your network configuration, you'll need to disable source/dest
checking on your instance. You can do this manually in the config panel. But
you can't do it in the launch configuration of the autoscaling group.
This little helper reconfigures your instances once they have booted, so you
don't have to worry about it.
## Usage
Simply run it inside your EC2 instance:
```
docker run --rm rubenv/ec2-disable-source-dest
```
You'll need to set up an appropriate IAM role/policy that is capable of using
`ec2:ModifyInstanceAttribute`.
## Running on boot (CoreOS)
Add the following unit file to your cloud-config:
```
[Unit]
Description=Disable EC2 source/dest check
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/docker run --rm rubenv/ec2-disable-source-dest
[Install]
WantedBy=multi-user.target
```