How To Quickly Make Free *nix Boxes on Amazon AWS (level: easy)

DJ SUBSTANCE
6 min readJun 26, 2022

Requirements:
* A Name, Address (full address can be anywhere)
* A somewhat valid callback / SMS # to receive validation
* A valid prepaid / paypal / or credit card to start the free service
— I have been doing this for years, I have never been charged —

Essentials:
— Stay in “free tier” and it will stay free — when the free account expires make more ;)

[ 9x datakit networks ]

Introduction:
T
his brief, step by step guide will walk you through setting up free Cloud based Amazon AWS hosted servers for 100% free. If you keep the settings aligned with this guide, it will never cost you anything. I have been doing this for a while, i know what works and what doesn't, what will cost you and not, and what you can get away with and not. Dont be greedy and setup 5 or 10 machines on the free tier account or you will quickly find out how not “free” it really can be. I will show you the elite tricks I know that will get your server up quick and free. It is your job to secure it, and I am not getting into anything beyond getting it setup right now. It can be tricky, also you can setup Windows instances if you wish, you can setup Kali linux (or other specific distros), but they will likely not remain in the free tier. The best bet from my experience is setup Ubuntu 20 (or the latest) in Free tier, with 30G magnetic storage, and I like to firewall my own boxes with IPTables, so I usually allow the AWS firewall to allow all in/out. Thats up to you. Without further adue:

Setting up free tier AWS boxes — the ninja way —

Step 1) Make free tier account @ Amazon AWS Console
https://aws.amazon.com/console/
Visit this URL and make a new account. I recommend against tying this account to your existing Amazon (prime, etc) account. Its up to you. There are 2 types of AWS Cloud accounts. Root Account (what you will use for this) and IAM (identity role account). We always start with a root account, and if it is going to be a enterprise or corporate Cloud environment, the Root account would rarely be used, and instead delegate access via the IAM control panel.

Once you create the account (the only real info required is a valid CC, and a way to get a SMS text) be creative. Assuming you get all that done. Once the account is activated (it should be 5 minutes if the billing is correct) again this is 100% free! If you follow along.

At the main AWS Cloud dashboard, you want to goto EC2 (Elastic Cloud 2) / Compute page. This is where we deploy “Compute” cloud instances.

You should see something like this:

DJ Substance displaying the Amazon AWS EC2 Compute Homepage
DJ Substance displaying the Amazon AWS EC2 Compute Homepage

2) Click Launch Instance
— Name the instance (this is the name of the server itself)

DJ Substance displaying to name instance
In this case ill call the machine r0b0k1t

3) Pick the OS Ubuntu 22 (or latest) and Free Tier

Ubuntu
Pick Ubuntu 22 / Free Tier should be displayed

4) Create Key Pair

Create new Key Pair — very important step

This is an essential step. AWS wont let you login with a regular account and password initially. The options are
a) Create a *nix .pem file for authorization (this is what we will do)
b) Create a .ppk / putty (download pagent.exe and have that loaded)

5) Name your Key Pair (for authorization / login)

Name your keypair — this is typically only used one time

Note: When you click Create key pair, it should prompt a download. The filename will be what you named your key with an extension of .pem or .cer. This is the Linux/BSD format for sshing with ssh binary.

6) Open the AWS Firewall allow/allow

It is recommended to always have a OS Based Firewall, either use this AWS firewall or use Linux IPTables

Note: Assuming that we will configure our firewall in the Linux system, using IPTables and for sake of time, we are allowing all traffic in and out.

You only need one rule, as seen above, all traffic, allowed.
0.0.0.0/0 indicates match any IP from 0.0.0.0 to 255.255.255.255 (all)

Step 7) Change default 8GB SSD Drive to 30GB Magnetic Drive

There is no way to run a good box of any use with 8gb of space, so it is still free to use 30gb magnetic

Note: I have noticed almost no speed difference from the magnetic vs SSD options here. 30GB is much more efficient and useful and you will be glad we picked this.

Step 8) Launch Instance

Verify your options are the *same* as seen above and click Launch

We will break down the next steps in succession and get you moving with your new box.

If all went well, you should see the following:

Typical instances take < 5 minutes to create

At the top left (assuming your using the new dashboard) click EC2 Dashboard to check on on the instance:

This brings us back to check on the progress

Verify the instance is building and also is running:

We can see there is one running instance — its almost ready

Click Instances (Running) to get the IP Address of our new host.

Click the check box next to the name of your instance to reveal the IP address

Make note of your public IP (in this case 34.226.x.x).

Step 9) Final Step — change permission on .cer or .pem key and ssh in!
Important Note: Locate your .cer or .pem (or ppk) file created earlier, we must change the permissions on the file.

In Windows — Look it up — never tried
In Linux — chmod 400 <filename.pem>
[ The extension may be .cer this is new it works the same]

Finally to connect:

ssh -i <filename.pem> ubuntu@<public ip from ec2 dashboard>

You have successfully created your AWS instance 100% free

It should auto login, once logged in type: sudo su. (you are now root) your ready to secure the box.

Conclusion:
I
f you followed this guide carefully, then you have a machine you can use for almost anything *keep it legal of course*. Some examples of what I have running.

Final Note:

Make sure you edit /etc/ssh/sshd_config and change PasswordAuthentication to yes

You can configure your box any way you want, however, I recommend these steps to insure you dont get locked out:
1) sudo su
2) Create regular user
3) Edit /etc/sudoers (add your user to be able to sudo)
4) Edit sshd_config / Allow password authentication (until ssh keys ready)
5) Change the SSHd port ! (these boxes are brute forced 24/7)
6) service ssh restart
7) apt-get -y update && apt-get -y upgrade && apt-get autoremove

I usually reboot, and verify the box comes back up. Once a month check your AWS dashboard billing console to verify its still free. There is no bandwidth limitation or bill increase for using the max thruput

Servers up now running:
Openvpn or Wireguard (All of my AWS machines are interconnected on VPN)
Asterisk (phone server)
Apache / PHP (Web Server)
MYSql / MariaDB (DB Server)
IRCd (Chat server)

You get the picture I hope. If you found this useful please click like, and share. This is fairly straight forward.

dj substance
https://9x.network

s t i c k and m o v e | eof | 9x networks

--

--

DJ SUBSTANCE

twenty years professionally as a Network Engineer, more recently I have focused on red teaming mostly, but I am always up for learning and exchanging info