Menu

Let's Us Share What We Know

  • HOME
  • BLOG
  • Amazon EC2 Windows Server IIS , FileZilla and SQL Server Express

Amazon EC2 Windows Server IIS , FileZilla and SQL Server Express

1,July,2011

This tutorial helps you understand how you could launch an EC2 instance quickly with FTP and SQL Server remote connectivity.

Note:  No method in this tutorial is considered safe and secure. This is just a basic tutorial which will help you setup an EC2 instance quickly, you would probably want to dump this instance in most cases or enhance your security parameters if you plan to continue using the created instance.

Launch an instance

Steps

  • Login to your Amazon EC2 Account
  • Click on Launch Instance
  • Select an Instance from the Quick Start tab. Since we are configuring a windows server, we will select Microsoft Windows Server 2008 R2 with SQL Server Express and IIS
  • In the next tab, select number of instances, Availability Zone.  Remember that EBS volumes may not be available across zones and Instance Type
  • Accept default values in next tab and  click on Continue
  • The next tab (“Create new Key Pair”) is more important because you will be retrieving Windows Administrator password using the Key Pair file you are creating in this tab. You could skip this tab if you already have an existing Key Pair File
  • From the Configure Firewall Tab, create a security group name and continue. Just make a note of the default port rules setup, we will extend this settings for Filezilla server later
  • Launch the instance

Reference Links

Setting up Remote Desktop Protocol(RDP)

Steps

  • For connecting to your instance using RDP , you will need to retrieve Administrator password of the instance. For this, select the instance from the Running instances list in EC2 console and select Get Windows Password. You will need the Key Pair file created earlier to decrypt the Administrator password. You may have to wait upto 15 minutes to get Administrator password of a fresh instance

Configuring and Enabling Remote Connectivity in SQL Server ( EC2)

Steps

  • Connect to instance using RDP.
  • By default, the SQL Server Related Services are not enabled and not set to start automatically in Large Instance with SQL Server Express. So you will have to enable SQL Server, SQL Agent  and SQL browser services and make them start automatically from control panel
  • Try connectivity to SQL express from the SQL Server management studio available in the instance. You could use windows Authentication. You will have to browse for the server name and wait for some time till the list of servers are retrieved.
  • Enable login for SA, set a password and try login with SA using SQL server authentication
  • Allow SQL Server to accept incoming connections using Windows Firewall-> Allow a program or Feature through this firewall. The SQL Server Express executable (sqlservr.exe) will be probably located in C:Program FilesMicrosoft SQL ServerMSSQL10_50.EC2SQLEXPRESSMSSQLBinn
  • Start SQL Server Configuration manager
  • Select SQL Server Network Configuration
  • Enable TCP/ IP
  • Right click on TCP / IP Properties (“IP Addresses”)
  • In the property sheet , select last Section “IPAll”
  • Remove any text set against “Dynamic Ports”
  • Set 1433 against TCP Port (This port needs to be added as a custom rule for the security group of this instance. As you have seen in the Launch Instance stage, this is automatically done by EC2)
  • Try connecting from a remote machine now. The server name is just the public DNS of this instance (or an IP address if you have attached an Elastic IP address to this instance)

Reference Links

Configuring and Enabling   FileZilla FTP Server (EC2)

Steps

  • Connect to instance using RDP.
  • Download File Zilla Server version
  • Install Filezilla. Select default values during installation
  • Start FileZilla server. (First time you may have to set an administrator password)
  • Select Edit -> Settings
  • Select Passive Mode Settings
  • Enable Use Custom Port Range and give values  1024 and 1048. (These ports needs to be added as a custom rule for the security group of this instance).
  • Also enable reteieve external ip address from …
  • Allow Filezilla server to accept incoming connections using Windows Firewall-> Allow a program or Feature through this firewall. The Filezilla server executable (FileZilla server.exe) will be probably located in C:Program Files (x86)FileZilla Server
  • Add 21(FTP port) under Custom TCP Rule in Security Group of the instance in Amazon EC2 console.
  • Add  1024-1048 under Custom TCP Rule in Security Group of the instance in Amazon EC2 console
  • Create a user name and password from File zilla server interface and try connecting with this information from a remote machine. The ftp host is just the public DNS of this instance (or an IP address if you have attached an Elastic IP address to this instance)

Reference Links

  1. André says:

    Thanks a lot! The IP All configuration was unbelievable. It took lots of hours before getting this solution.

  2. Khanh says:

    Please kindly help me open port on filezzilla
    I can not to connect on ftp
    That I have to off firewall on window to access FTP server…

    Kindly i got another way to access ftp when open firewall

  3. Theunis says:

    Make sure that SQL Server is set up to allow Mixed-Authentication. Mine was set to windows authentication only and couldn’t authenticate with a user.

    http://support.webecs.com/KB/a374/how-do-i-configure-sql-server-express-to-enable-mixed.aspx

    After I made this change, and restarted the SQL server service, I was able to connect as SA on the EC2 Instance and remotely.

  4. Marty McGee says:

    These are absolutely awesome instructions. Very professional with providing reference links. The only thing I had to do in addition to these instructions was to sign into SQL Express using Windows Authentication Mode, then right-click the server and choose Properties, then select the page “Security” and choose “SQL Server and Windows Authentication Mode” radio button, then click Save, then restart SQL Server services.

    I would perhaps mention this in between these 2 steps:

    — Try connectivity to SQL express from the SQL Server management studio available in the instance. You could use windows Authentication. You will have to browse for the server name and wait for some time till the list of servers are retrieved.

    — (Suggested step) Enable mixed login mode “SQL Server and Windows Authentication Mode” as mentioned above

    — Enable login for SA, set a password and try login with SA using SQL server authentication

    Great job!! I was looking for something like this for hours.

  5. Tom Kreyche says:

    Great thanks – you saved me a lot of time – posted your link on the Amazon dev web site!

  6. Andreas Hoogeveen says:

    Excellent!!

  7. Tom Waitman says:

    Awesome!!! I have been struggling with the SQL Server 2008 remote connection for about 12 hours. Your instructions worked perfectly!!! Thanks so much for taking the time to publish these answers.

Leave a Reply

Your email address will not be published. Required fields are marked *