{"id":373,"date":"2014-03-12T11:23:39","date_gmt":"2014-03-12T00:23:39","guid":{"rendered":"https:\/\/icicimov.com\/blog\/?p=373"},"modified":"2017-01-09T23:27:47","modified_gmt":"2017-01-09T12:27:47","slug":"373","status":"publish","type":"post","link":"https:\/\/icicimov.com\/blog\/?p=373","title":{"rendered":"IPSec VPN server setup in Amazon VPC with OpenSwan"},"content":{"rendered":"<p><div class=\"fx-toc fx-toc-id-373\"><h2 class=\"fx-toc-title\">Table of contents<\/h2><ul class='fx-toc-list level-1'>\n\t<li>\n\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#overview\">Overview<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#server-installation-and-setup\">Server installation and setup<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#installation\">Installation<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#ipsec-configuration\">IPsec configuration<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#chap-authentication\">CHAP authentication<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#xl2tpd-daemon\">XL2TPD daemon<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#firewall\">Firewall<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#configure-the-kernel\">Configure the kernel<\/a>\n\t\t\t<\/li>\n\t\t<\/ul>\n\t<li>\n\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#clients-setup\">Clients setup<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#linux\">Linux<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/icicimov.com\/blog\/?p=373#mac\">Mac<\/a>\n\t\t\t<\/li>\n<\/ul>\n<\/ul>\n<\/div>\n<br \/>\nThe access to our Amazon VPC&#8217;s atm is based on ssh key pairs. While this is working fine and is pretty much secure it requires though each EC2 instance having public subnet interface which is not always desired. Usually the service layout is vertically divided in tiers with only LB&#8217;s and some application servers on the top being publicly accessible while the rest of them are private subnets only like application servers, databases, shared storage etc, thus keeping the public and private traffic separated. Also sometimes a situation may arise when we need access to a VPC but we don&#8217;t have the access keys on us or we need to access via untrusted wireless network. For this reasons setting up a VPN instance to allow clients, so called <code>road worriers<\/code>, to connect becomes necessity.<\/p>\n<h1><span id=\"overview\">Overview<\/span><\/h1>\n<p>The VPN server setup will be on EC2 micro instance so monthly costs for running this server are around $5. It will be IPsec\/L2TP VPN server which offers high security.<\/p>\n<p>In short, the following are the key elements of the setup:<\/p>\n<ul>\n<li>OS = Ubuntu 12.04 Server LTS<\/li>\n<li>Kernel = 3.2.0-59-virtual<\/li>\n<li>L2TP daemon = xl2tpd 1.3.1<\/li>\n<li>IPsec Implementation = Openswan 2.6.37-1<\/li>\n<li>IPsec Stack = Netkey (26sec) &#8211; (supplied as part of Kernel 2.6)<\/li>\n<li>IKE \/ Key management daemon = pluto &#8211; (supplied as part of <code>Openswan<\/code>)<\/li>\n<\/ul>\n<p>I&#8217;m going to give a short description of each of the parts involved here.<\/p>\n<p><code>xl2tpd<\/code>: is a Layer 2 Tunneling Protocol (L2TP) used to support virtual private networks (VPNs) (RFC2661). <code>L2TP<\/code> facilitates the tunneling of Point-to-Point Protocol (PPP) packets across an intervening network in a way that is as transparent as possible to both end-users and applications. The main purpose of this protocol is to tunnel PPP frames through IP networks using the Link Control Protocol (LCP) which is responsible for establishing, maintaining and terminating the PPP connection. L2TP does not provide any encryption or confidentiality itself; it relies on an encryption protocol to encrypt the tunnel and provide privacy, hence L2TP is used with <code>IPSec<\/code> that provides the encryption<\/p>\n<p><code>Openswan<\/code>: is a set of tools for doing IPsec on Linux operating systems. The tool-set consists of three major components:<\/p>\n<ul>\n<li>configuration tools<\/li>\n<li>key management tools (aka <code>pluto<\/code> )<\/li>\n<li>kernel components (KLIPS and sec)<\/li>\n<\/ul>\n<p><code>pluto<\/code>: is the key management daemon, it is an IPsec Key Exchange (IKE) daemon. <code>IKE's<\/code> Job is to to negotiate Security Associations for the node it is deployed on. A Security Association (SA) is an agreement between two network nodes on how to process certain traffic between them. This process involves encapsulation, authentication, encryption, or compression.<\/p>\n<p><code>netkey<\/code>: is the name of the IPSec <code>stack<\/code> in the 2.6 kernel used to encrypt the PPP packets over the L2TP tunnel. <code>Netkey<\/code> is a relatively new IPsec stack is based on the KAME stack from BSD. Netkey is also referred to as <code>26sec<\/code> or <code>native<\/code> stack. Netkey supports both IPv4 and IPv6.<\/p>\n<p><code>pppd<\/code>: is the Point-to-Point Protocol daemon which is used to manage network connections between two nodes. Specifically <code>pppd<\/code> sets up the transport for IP traffic within the L2TP tunnel for the VPN.<\/p>\n<p><code>VPN client<\/code>: any pc, mobile device or network using an IPsec PSK tunnel with the <code>l2tp<\/code> secret enabled. The client can also support PPTP, basic L2TP and also certificate based authentication.<\/p>\n<h1><span id=\"server-installation-and-setup\">Server installation and setup<\/span><\/h1>\n<h2><span id=\"installation\">Installation<\/span><\/h2>\n<p>Installation is fairly simple, we just run:<\/p>\n<pre><code>root@vpn-server:~# aptitude install -y openswan xl2tpd\n<\/code><\/pre>\n<h2><span id=\"ipsec-configuration\">IPsec configuration<\/span><\/h2>\n<p>We take backup of the ipsec config file <code>\/etc\/ipsec.conf<\/code> and modify it as follows:<\/p>\n<pre><code>version 2.0\n\nconfig setup\n  dumpdir=\/var\/run\/pluto\/\n  nat_traversal=yes\n  virtual_private=%v4:10.0.0.0\/8,%v4:192.168.0.0\/16,%v4:172.16.0.0\/12,%v4:25.0.0.0\/8,%v6:fd00::\/8,%v6:fe80::\/10\n  oe=off\n  protostack=netkey\n  nhelpers=0\n  interfaces=%defaultroute\n  #plutodebug=all\n\nconn vpnpsk\n  auto=add\n  left=172.31.12.198\n  leftid=&lt;my-vpn-server-dns&gt;\n  leftsubnet=172.31.12.198\/32\n  leftnexthop=%defaultroute\n  leftprotoport=17\/1701\n  rightprotoport=17\/%any\n  right=%any\n  rightsubnetwithin=0.0.0.0\/0\n  forceencaps=yes\n  authby=secret\n  pfs=no\n  type=transport\n  auth=esp\n  ike=3des-sha1\n  phase2alg=3des-sha1\n  dpddelay=30\n  dpdtimeout=120\n  dpdaction=clear\n<\/code><\/pre>\n<p>Important thing here is that the <code>leftid<\/code> needs to be pointing to the public IP (EIP of the EC2 instance) or the DNS name as in my case that is hosted in Route53.<\/p>\n<p>Next we create random hard to guess PSK key (the one given below is not the one I used for the server of course):<\/p>\n<pre><code>root@vpn-server:~# ipsec ranbits --continuous 128\n0xe37ef1c5f42eb7dde93a974a5dcc7b2c\n<\/code><\/pre>\n<p>Then we use this password key in the secrets file <code>\/etc\/ipsec.secrets<\/code>:<\/p>\n<pre><code>&lt;my-vpn-server-dns&gt; %any  : PSK \"0xe37ef1c5f42eb7dde93a974a5dcc7b2c\"\n<\/code><\/pre>\n<p>This line translated say any client connected to this host (<my -vpn-server-dns>) should use this password as shared key. If we have created this for first time we need to set proper permissions:<\/p>\n<pre><code>root@vpn-server:~# chmod 600 \/etc\/ipsec.secrets\n<\/code><\/pre>\n<h2><span id=\"chap-authentication\">CHAP authentication<\/span><\/h2>\n<p>The CHAP authentication file <code>\/etc\/ppp\/chap-secrets<\/code> is where we put our users and their credentials.<\/p>\n<pre><code># Secrets for authentication using CHAP\n# client    server  secret          IP addresses\n\n&lt;my-user&gt;    l2tpd   &lt;my-password&gt;   *\n&lt;my-user-2&gt;  l2tpd   &lt;my-password-2&gt;   192.168.42.41\n<\/code><\/pre>\n<p>We have two users here with their user name and password. The last parameter in the line specifies the ip address the client should get upon successful connection. The first user will simply get the first available ip from the pool specified in the xl2tpd configuration in the next step. If we have created this for first time we need to set proper permissions:<\/p>\n<pre><code>root@vpn-server:~# chmod 0600 \/etc\/ppp\/chap-secrets\n<\/code><\/pre>\n<h2><span id=\"xl2tpd-daemon\">XL2TPD daemon<\/span><\/h2>\n<p>There two configuration files we need to setup here, first is <code>\/etc\/xl2tpd\/xl2tpd.conf<\/code>.<\/p>\n<pre><code>[global]\nport = 1701\n\n;debug avp = yes\n;debug network = yes\n;debug state = yes\n;debug tunnel = yes\n\n[lns default]\nip range = 192.168.42.10-192.168.42.250\nlocal ip = 192.168.42.1\nrequire chap = yes\nrefuse pap = yes\nrequire authentication = yes\nname = l2tpd\n;ppp debug = yes\npppoptfile = \/etc\/ppp\/options.xl2tpd\nlength bit = yes\n\/etc\/ppp\/options.xl2tpd\nipcp-accept-local\nipcp-accept-remote\nms-dns 8.8.8.8\nms-dns 8.8.4.4\nnoccp\nauth\ncrtscts\nidle 1800\nmtu 1280\nmru 1280\nlock\nconnect-delay 5000\n<\/code><\/pre>\n<h2><span id=\"firewall\">Firewall<\/span><\/h2>\n<p>We need to open TCP port 500, and UDP ports 500 (IKE), 1701 (L2TP) and 4500 (NAT-T) in the EC2 instance security group. On the server it self we need to set iptables for the ppp0 interface and the network the clients will get their ip&#8217;s from:<\/p>\n<pre><code>root@vpn-server:~# iptables -t nat -A POSTROUTING -s 192.168.42.0\/24 -o eth0 -j MASQUERADE\nroot@vpn-server:~# iptables -A FORWARD -i eth0 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT\nroot@vpn-server:~# iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT\n<\/code><\/pre>\n<p>To make this rules persist over reboots we need to install <code>iptables-persistent<\/code> package:<\/p>\n<pre><code>root@vpn-server:~# aptitude install iptables-persistent\nroot@vpn-server:~# iptables-save &gt; \/etc\/iptables\/rules.v4\n<\/code><\/pre>\n<h2><span id=\"configure-the-kernel\">Configure the kernel<\/span><\/h2>\n<p>Append the following to the end of the kernel config file.<\/p>\n<pre><code>net.ipv4.ip_forward=1\nnet.ipv4.conf.all.accept_redirects = 0\nnet.ipv4.conf.all.secure_redirects = 0\nnet.ipv4.conf.all.send_redirects = 0\nnet.ipv4.conf.default.accept_redirects = 0\nnet.ipv4.conf.default.secure_redirects = 0\nnet.ipv4.conf.default.send_redirects = 0\nnet.ipv4.conf.lo.accept_redirects = 0\nnet.ipv4.conf.lo.secure_redirects = 0\nnet.ipv4.conf.lo.send_redirects = 0\nnet.ipv4.conf.eth0.accept_redirects = 0\nnet.ipv4.conf.eth0.secure_redirects = 0\nnet.ipv4.conf.eth0.send_redirects = 0\n<\/code><\/pre>\n<p>save the file and make the rules effective:<\/p>\n<pre><code>root@vpn-server:~# sysctl -p\n<\/code><\/pre>\n<p>Final check<\/p>\n<pre><code>root@vpn-server:~# ipsec verify\nChecking your system to see if IPsec got installed and started correctly:\nVersion check and ipsec on-path                                 [OK]\nLinux Openswan U2.6.37\/K3.2.0-58-virtual (netkey)\nChecking for IPsec support in kernel                            [OK]\n SAref kernel support                                           [N\/A]\n NETKEY:  Testing XFRM related proc values                      [OK]\n    [OK]\n    [OK]\nChecking that pluto is running                                  [OK]\n Pluto listening for IKE on udp 500                             [OK]\n Pluto listening for NAT-T on udp 4500                          [OK]\nTwo or more interfaces found, checking IP forwarding            [OK]\nChecking NAT and MASQUERADEing                                  [OK]\nChecking for 'ip' command                                       [OK]\nChecking \/bin\/sh is not \/bin\/dash                               [WARNING]\nChecking for 'iptables' command                                 [OK]\nOpportunistic Encryption Support                                [DISABLED]\n<\/code><\/pre>\n<p>All is ok so now we can start the services and go on with client configuration.<\/p>\n<pre><code>root@vpn-server:~# \/etc\/init.d\/ipsec restart\nroot@vpn-server:~# \/etc\/init.d\/xl2tpd restart\n\nroot@vpn-server:~# ifconfig ppp0\nppp0      Link encap:Point-to-Point Protocol\n          inet addr:192.168.42.1  P-t-P:192.168.42.10  Mask:255.255.255.255\n          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1\n          RX packets:10809 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:10375 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:3\n          RX bytes:2054854 (2.0 MB)  TX bytes:3895668 (3.8 MB)\n<\/code><\/pre>\n<h1><span id=\"clients-setup\">Clients setup<\/span><\/h1>\n<h2><span id=\"linux\">Linux<\/span><\/h2>\n<p>Installing the client is fairly simple:<\/p>\n<pre><code>$ sudo aptitude install l2tp-ipsec-vpn\n<\/code><\/pre>\n<p>Then either launch the <code>L2TP ipces VPM Manager<\/code> from the Application menu or enable the L2TP applet as shown on the screen shot and click on it.<\/p>\n<p>This basically does the following:<\/p>\n<p>Adds the shared key to ipsec secrets file <code>\/etc\/ipsec.secrets<\/code>:<\/p>\n<pre><code>%any @&lt;my-vpn-server-dns&gt;: PSK 0t0xe37ef1c5f42eb7dde93a974a5dcc7b2c\n<\/code><\/pre>\n<p>Adds the connection to the xl2tpd conf file <code>\/etc\/xl2tpd\/xl2tpd.conf<\/code>:<\/p>\n<pre><code>[lac SAI_VPC_AU]\nlns = &lt;my-vpn-server-dns&gt;\npppoptfile = \/etc\/ppp\/SAI_VPC_AU.options.xl2tpd\nlength bit = yes\nredial = no\n<\/code><\/pre>\n<p>And sets the user credentials in the <code>\/etc\/ppp\/SAI_VPC_AU.options.xl2tpd<\/code> file<\/p>\n<blockquote><p>\n  This app has bug in the Ubuntu 12.04 version that doesn&#8217;t exist in 10.04, 11.04 or 11.10. The user password is not passed on during the connection and workaround is to set it manually in the <code>\/etc\/ppp\/SAI_VPC_AU.options.xl2tpd<\/code> file.\n<\/p><\/blockquote>\n<p>So right after name line we add password line as shown below in the <code>\/etc\/ppp\/SAI_VPC_AU.options.xl2tpd<\/code> file:<\/p>\n<pre><code># \/etc\/ppp\/SAI_VPC_AU.options.xl2tpd - Options used by PPP when a connection is made by an L2TP daemon\n# $Id$\n\n# Manual: PPPD(8)\n\n# Created: Sun Mar 9 16:54:40 2014\n#      by: The L2TP IPsec VPN Manager application version 1.0.6\n#\n# WARNING! All changes made in this file will be lost!\n\n#debug\n#dump\n#record \/var\/log\/pppd\n\nplugin passprompt.so\nipcp-accept-local\nipcp-accept-remote\nidle 72000\nktune\nnoproxyarp\nasyncmap 0\nnoauth\ncrtscts\nlock\nhide-password\nmodem\nnoipx\n\nipparam L2tpIPsecVpn-SAI_VPC_AU\n\npromptprog \"\/usr\/bin\/L2tpIPsecVpn\"\n\nrefuse-eap\nrefuse-pap\nrefuse-mschap\nrefuse-mschap-v2\n\nremotename \"\"\nname \"&lt;my-user&gt;\"\npassword \"&lt;my-password&gt;\"\n\nusepeerdns\n<\/code><\/pre>\n<p>Bad news is that when ever we use this VPN Manager again it will overwrite our changes and we&#8217;ll have to do it over again.<\/p>\n<p>The log file from the server showing the session being successfully established:<\/p>\n<pre><code>Mar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: Connection established to &lt;my-public-ip-reducted&gt;, 1701.  Local: 49762, Remote: 50824 (ref=0\/0).  LNS session is 'default'\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: control_finish: Warning: Peer did not specify transmit speed\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: start_pppd: I'm running:\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"\/usr\/sbin\/pppd\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"passive\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"nodetach\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"192.168.42.1:192.168.42.10\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"refuse-pap\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"auth\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"require-chap\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"name\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"l2tpd\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"file\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"\/etc\/ppp\/options.xl2tpd\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"ipparam\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"&lt;my-public-ip-reducted&gt;\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: \"\/dev\/pts\/3\"\nMar  8 11:00:28 ip-172-31-12-198 xl2tpd[23625]: Call established with &lt;my-public-ip-reducted&gt;, Local: 32087, Remote: 16751, Serial: 1\nMar  8 11:00:28 ip-172-31-12-198 pppd[23907]: pppd 2.4.5 started by root, uid 0\nMar  8 11:00:28 ip-172-31-12-198 pppd[23907]: Using interface ppp0\nMar  8 11:00:28 ip-172-31-12-198 pppd[23907]: Connect: ppp0 &lt;--&gt; \/dev\/pts\/3\nMar  8 11:00:28 ip-172-31-12-198 pppd[23907]: local  IP address 192.168.42.1\nMar  8 11:00:28 ip-172-31-12-198 pppd[23907]: remote IP address 192.168.42.10\n<\/code><\/pre>\n<p>Then I was able to connect to one of the servers in the VPC from my pc by simply using its private ip:<\/p>\n<pre><code>igorc@silverstone:~$ ssh ubuntu@172.31.18.41\nThe authenticity of host '172.31.18.41 (172.31.18.41)' can't be established.\nECDSA key fingerprint is d2:93:cd:e5:cc:6c:45:52:76:09:34:bf:6f:a4:fc:9d.\nAre you sure you want to continue connecting (yes\/no)? yes\nWarning: Permanently added '172.31.18.41' (ECDSA) to the list of known hosts.\nubuntu@172.31.18.41's password:\nWelcome to Ubuntu 12.04.2 LTS (GNU\/Linux 3.2.0-49-virtual x86_64)\n\n * Documentation:  https:\/\/help.ubuntu.com\/\n\n  System information as of Sat Mar  8 22:04:24 EST 2014\n\n  System load:  0.16              Processes:           113\n  Usage of \/:   84.2% of 7.87GB   Users logged in:     0\n  Memory usage: 50%               IP address for eth0: 172.31.18.41\n  Swap usage:   0%                IP address for eth1: 172.31.51.41\n\n  Graph this data and manage this system at https:\/\/landscape.canonical.com\/\n\n159 packages can be updated.\n81 updates are security updates.\n\nGet cloud support with Ubuntu Advantage Cloud Guest\n  http:\/\/www.ubuntu.com\/business\/services\/cloud\n\nUse Juju to deploy your cloud instances and workloads.\n  https:\/\/juju.ubuntu.com\/#cloud-precise\n*** \/dev\/xvda1 will be checked for errors at next reboot ***\n\nYou have new mail.\nLast login: Thu Mar  6 15:25:36 2014 from &lt;\/my&gt;&lt;my -public-ip-reducted&gt;\nubuntu@ip-172-31-18-41:~$\n<\/code><\/pre>\n<p>If we prefer to do the things manually, the start step-by-step (without applet) would be:<\/p>\n<pre><code>root@igor-laptop:~# service xl2tpd restart\nroot@igor-laptop:~# service ipsec restart\nroot@igor-laptop:~# ipsec auto --add SAI_VPC_AU\nroot@igor-laptop:~# ipsec auto --up SAI_VPC_AU\nroot@igor-laptop:~# echo \"c SAI_VPC_AU\" &gt; \/var\/run\/xl2tpd\/l2tp-control\n<\/code><\/pre>\n<p>Then to end the VPN connection:<\/p>\n<pre><code>root@igor-laptop:~# ipsec auto --down SAI_VPC_AU\nroot@igor-laptop:~# echo \"d SAI_VPC_AU\" &gt; \/var\/run\/xl2tpd\/l2tp-control\nroot@igor-laptop:~# service ipsec stop\nroot@igor-laptop:~# service xl2tpd stop\n<\/code><\/pre>\n<h2><span id=\"mac\">Mac<\/span><\/h2>\n<p>Open your network settings:<\/p>\n<ul>\n<li>Click on the <code>+<\/code> button in the top-left corner of the interfaces list<\/li>\n<li>Select a VPN interface, with <code>IPSec L2TP<\/code> and give it a name<\/li>\n<li>In the address field, put the public IP of our VPN server (you can get it via <code>nslookup<\/code>)<\/li>\n<li>In the account name field, put the value of the VPN_USER variable that you defined earlier.<\/li>\n<li>Click on auth settings, fill your VPN_PASSWORD in the first field and your IPSEC_PSK in the second box. Click Ok<\/li>\n<li>Click on Advanced Settings, select &#8220;Send all traffic&#8221; and click ok.<\/li>\n<li>If you are running firewall then make sure the appropriate ports are not blocked (see the Firewall section)\n<\/li>\n<\/ul>\n<p><\/my><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The access to our Amazon VPC&#8217;s atm is based on ssh key pairs. While this is working fine and is pretty much secure it requires though each EC2 instance having public subnet interface which is not always desired. Usually the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12],"tags":[32,36],"class_list":["post-373","post","type-post","status-publish","format-standard","hentry","category-aws","category-devops","tag-aws","tag-vpn"],"_links":{"self":[{"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=373"}],"version-history":[{"count":2,"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/373\/revisions"}],"predecessor-version":[{"id":375,"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/373\/revisions\/375"}],"wp:attachment":[{"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icicimov.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}