Skip to content

Commit

Permalink
bugfix. use public-hostname not public-ipv4
Browse files Browse the repository at this point in the history
Amazon does not let you retrieve a public IP address or
hostname of a newly created instance by querying
 http://instance-data/latest/meta-data/public-ipv4
but
 http://instance-data/latest/meta-data/public-hostname

does work.

The script was failing from not being able to retreive the public ip
address and use it to configure the tunnel
  • Loading branch information
algal committed Sep 2, 2013
1 parent bfa66da commit f116d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voodoo-vpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ VPN_PASSWORD=unsecure

# Those two variables will be found automatically
PRIVATE_IP=`wget -q -O - 'http://instance-data/latest/meta-data/local-ipv4'`
PUBLIC_IP=`wget -q -O - 'http://instance-data/latest/meta-data/public-ipv4'`
PUBLIC_IP=`wget -q -O - 'http://instance-data/latest/meta-data/public-hostname'`

apt-get install -y openswan xl2tpd

Expand Down

0 comments on commit f116d06

Please sign in to comment.