Click here to Skip to main content
Click here to Skip to main content

Amazon AWS: Setting up FTP on EC2 Windows Instances

, 15 Jun 2012
Rate this:
Please Sign up or sign in to vote.
Amazon AWS: Setting up FTP on EC2 Windows Instances

Introduction

After reading this article, you will be able to successfully FTP to a running Amazon AWS EC2 Windows instance without an elastic IP.

Background

Amazon AWS offers a year of free instances to some great Windows 2008 virtual machines. This tool is awesome for anyone wanting to test code in the Windows 2008 environment but would rather not utilize their production machines. The documentation for some critical tasks in AWS leave a little to be desired though. A quick Google search turned up no detailed tutorial for setting up FileZilla (or any FTP Server) on a Windows instance. So I decided to write it!

Using the article

First, create a windows instance in Amazon AWS Management Console. Once the instance is accessible, we will need to change some settings:

  1. In AWS, select “Security Groups” from the left-hand menu.
  2. Select the name of the security group for the instance you just created
  3. In the window at the bottom of the screen select the “Inbound” tab from the small frame.
  4. Pick “Custom TCP Rule” from the “Create a new rule” dropdown.
  5. Enter 50000-51000 in the port range field.
  6. In the source field, use discretion. Leaving the field at 0.0.0.0/0 will allow all. That may be ok depending on your intended use, I’m using it as a disposable server, so I’m not going to get into security in this article.
  7. Select “Add Rule” and the “Apply Rule Changes” (Make sure you do both!!!).
  8. Now repeat the steps 4-7 for port 21.

We are now done setting up the security groups in AWS, let’s setup FileZilla Server. (You can setup any type of FTP server you want, I prefer FileZilla because it is free, rock-solid, and highly configurable. If you want to use something else, just apply the same settings.

  1. Install FileZilla Server on the Amazon Instance (after remoting in) and log into the server interface. (You will have to enable downloads in IE to download FileZilla from their website. )
  2. Click the settings icon on the interface.
  3. On the general settings tab, “Listen on these ports:” will be defaulted to 21. Just leave it.
  4. Select the “Passive mode settings” from the tree on the left.
  5. Place a check mark next to “Use custom port range” and set the port range to “50000-51000”.
  6. Now get your “Public DNS Name” from the Amazon AWS console. Your IP address will be in the Public DNS Name, or you can ping the DNS name to have it resolved for you. (you may be able to use the Public DNS Name, I don’t see why it wouldn’t work, but I personally use the IP instead.
  7. Enter the IP into the “Use the Following IP” field on FileZilla’s “Passive mode settings” screen.
  8. Now follow the instructions that come with FileZilla to setup a group and a user.

Now we are at the final step. You will now need to adjust the Windows Firewall settings to allow the ports we allowed in the AWS Security Group.

  1. On the instance open “Windows Firewall with Advanced Security”.
  2. Now click on “Inbound Rules” on the left-hand pane.
  3. Click on “New Rule” in the right-hand pane.
  4. You should really use the “Program” option***, but I’m going to use the port option and then click next.
  5. ***As I said before, I’m not going to cover the topic of security, I’m sure someone will tell you to never do it this way, but this is the way I need it for the testing I’m doing.  

  6. Select TCP and the “Specific local ports” option and enter 50000-51000 and press next.
  7. Select “Allow the connection” and press next.
  8. Leave all three options checked and press next.
  9. Type a name for your rule and hit finish. Then repeat these steps for port 21.

And you are done! Go ahead and connect with your favorite FTP client.

Points of Interest

This is my first CodeProject article, so go easy on me!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Timothy Svecz
Business Analyst Electro-Mechanical Corp.
United States United States
I'm an accountant and a programmer in Bristol, VA. I am passionate about what I do, and simply can't pick one.

Comments and Discussions

 
QuestionWhat type of instance should I select? PinmemberEllieBunny6-Jun-13 10:16 
GeneralMy vote of 5 PinmemberHoward Hart21-May-13 16:35 
QuestionFTP setup Pinmembervdtrip6-May-13 12:44 
QuestionGreat article! PinmemberVirath Sem19-Oct-12 3:23 
GeneralMy vote of 5 PinmemberJose A Pascoa22-Aug-12 9:03 
QuestionNice work PinmemberJose A Pascoa22-Aug-12 8:47 
GeneralMy vote of 5 PinmemberSirRob915-Jul-12 18:27 
GeneralMy vote of 5 PinmemberGustavo Fuentes29-Jun-12 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 15 Jun 2012
Article Copyright 2012 by Timothy Svecz
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid