Created
August 5, 2008 00:20
-
-
Save dctanner/3997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2-run-instances ami-2bb65342 -k gsg-keypair | |
ssh -i ~/.ec2/id_rsa-gsg-keypair [email protected] | |
On EC2 | |
--- | |
yum install -y openvpn | |
modprobe tun | |
modprobe iptable_nat | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -t nat -A POSTROUTING -s 10.4.0.1/2 -o eth0 -j MASQUERADE | |
openvpn --genkey --secret /mnt/secret.key | |
openvpn --proto udp --port 1194 --dev tun --ifconfig 10.4.0.1 10.4.0.2 --verb 1 --secret /mnt/secret.key --push "redirect-gateway def1" --push "dhcp-option DNS 172.16.0.23" | |
On local box | |
--- | |
ec2-authorize default -p 22 | |
ec2-authorize default -p 1194 -P udp | |
Get http://code.google.com/p/tunnelblick/ | |
vi Library/openvpn/openvpn.conf | |
dev tun | |
proto udp | |
port 1194 | |
remote ec2-67-202-32-198.compute-1.amazonaws.com | |
ifconfig 10.4.0.2 10.4.0.1 | |
secret /Users/dctanner/.secret.key | |
redirect-gateway def1 | |
persist-key | |
persist-tun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment