Posts

Showing posts from December, 2012

OpenVPN on EC2/AWS

EC2 Instance
Allow UDP to port 1194 under the instance's security groupto the world or just your IP network Install and configure OpenVPN instance/server
apt-get install openvpncd /etc/openvpnopenvpn --genkey --secret my.keyPut code below into /etc/openvpn/server.confRun: openvpn --config /etc/openvpn/server.confLeave running while taking remaining stepsAllow NATmodprobe iptable_natecho 1 | sudo tee /proc/sys/net/ipv4/ip_forwardiptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j MASQUERADEChecks for the paranoidlsof -nP -ilsof -c openvpn
port 1194
proto udp
dev tun
secret /etc/openvpn/my.key
ifconfig 192.168.2.1 192.168.2.2
keepalive 10 120
comp-lzo
persist-key
persist-tun
status server-tcp.log
verb 3

If on Mac, use tunnelblick to open a file like myopenvpn.ovpn with below codeReplace hostname with yoursYou'll need the my.key file in the same directory as the myopenvpn.ovpn fileOn LinuxPut below in /etc/openvpn/client.confPut my.key in /etc/openvpn as wellRun: openvpn --config /etc…