Skip to content

Commit 831c4ba

Browse files
committed
Add Amazon's TaskIAM configuration to ecs image
- Implements the instructions in rancher/docs#2015, directly in the ecs-optimized image. - Depends on rancher/os-release#217
1 parent d6571c5 commit 831c4ba

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/install2disk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ EOF
3838
cat >cloud-config.yml<<EOF
3939
#cloud-config
4040
rancher:
41+
network:
42+
post_cmds:
43+
- iptables -t nat -A PREROUTING -p tcp -d 169.254.170.2 --dport 80 -j DNAT --to-destination 127.0.0.1:51679
44+
- iptables -t nat -A OUTPUT -d 169.254.170.2 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 51679
45+
- iptables --insert DOCKER-USER 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP
46+
- iptables --insert DOCKER-USER 1 --in-interface docker-sys --destination 169.254.169.254/32 --jump ACCEPT
47+
sysctl:
48+
net.ipv4.conf.all.route_localnet: 1
4149
services_include:
4250
amazon-ecs-agent: true
4351
modules: [ena]

0 commit comments

Comments
 (0)