Listen to this Post
You Should Know:
To share large files securely over the internet using Amazon AWS EC2 and Microsoft IIS, follow these steps:
1. Spin Up an AWS EC2 Instance:
- Log in to your AWS Management Console.
- Navigate to EC2 and launch a new instance.
- Choose a Windows Server AMI and configure the instance settings.
- Ensure the instance has sufficient storage and bandwidth for your file-sharing needs.
2. Install IIS Role:
- Connect to your EC2 instance via RDP.
- Open Server Manager and add the IIS role.
- Ensure the Web Server (IIS) role is installed with the necessary features.
3. Configure Virtual Directory:
- Open IIS Manager.
- Create a new virtual directory pointing to the folder where your files are stored.
- Set the appropriate permissions to allow access to the files.
4. Edit MIME Types:
- In IIS Manager, select the virtual directory.
- Open the MIME Types settings.
- Add or edit MIME types for each file extension (e.g., .ISO, .EXE, .MSI, .DOC, .PDF, .ZIP, .TGZ) to ensure they default to “file -> download” when clicked.
5. Secure the IIS Server:
- Install an SSL certificate to avoid browser warnings about insecure downloads.
- If you choose not to install an SSL certificate, users can still download files by clicking the download icon in the browser toolbar and selecting “Download Insecure File.”
6. Restrict Access Using AWS Security Groups:
- Navigate to the EC2 Security Groups settings.
- Edit the Inbound Rules to allow HTTP (port 80) access only from specific public IP addresses.
- Ensure your public IP address is included in the allowed list for testing.
- Restrict RDP access to your public IP address only.
Commands and Codes:
- AWS CLI Command to Launch EC2 Instance:
aws ec2 run-instances --image-id ami-0abcdef1234567890 --instance-type t2.micro --key-name MyKeyPair --security-group-ids sg-903004f8 --subnet-id subnet-6e7f829e
-
PowerShell Command to Install IIS:
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
-
IIS Configuration Command (Command Line):
appcmd set config /section:staticContent /+"[fileExtension='.iso',mimeType='application/octet-stream']"
-
AWS CLI Command to Update Security Group:
aws ec2 authorize-security-group-ingress --group-id sg-903004f8 --protocol tcp --port 80 --cidr 203.0.113.0/24
What Undercode Say:
Sharing large files securely over the internet is a common requirement, and using Amazon AWS EC2 with Microsoft IIS provides a robust solution. By configuring the virtual directory and MIME types correctly, you ensure that files are downloaded rather than opened in the browser. Additionally, securing the server with SSL and restricting access via AWS Security Groups adds an extra layer of protection. This setup is ideal for organizations that need to share large files with specific users or clients securely. Always remember to test your configuration thoroughly and restrict access to only those IP addresses that require it.
For more detailed instructions, refer to the AWS Documentation and Microsoft IIS Documentation.
References:
Reported By: Charlescrampton If – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅



