Friday, October 5, 2007

EC2, CentOS and PPTP

Continuing on my EC2 journey.. I wanted to allow my ec2 hosts to talk to a private network at the office. We use a Microsoft PPTP vpn -- it's the quickest way for me to set up the VPN.

I've been the Rightscale CentOS 5 AMI for my testing. In order to get my PPTP vpn connection up and running, I used pptpclient. To install it, I mostly followed their instructions.

  1. Install their yum repos with

    # this isn't documented on their site
    rpm -Uvh http://pptpclient.sourceforge.net/yum/stable/rhel5/\ pptp-release-current.noarch.rpm

  2. Install the required RPM's via yum
  3. Follow their Configure by Hand instructions
  4. The pon script wasn't in the path. To start my VPN, I had to run

    # of course, substitue $TUNNEL with whatever you
    # set in the Configure by Hand steps
    bash /usr/share/doc/ppp-2.4.4/scripts/pon $TUNNEL
  5. Set up any required routes

    route add -net 1.2.3.4/24 gw $PPTP_GATEWAY
That's it. The next step is to automate the processes further. I'm guessing there is a config file that could easily be added to /etc/sysconfig/network-scripts to make this happen.

No comments: