Project overview
LinuxCat is a hands-on Linux and cloud infrastructure project. Its goal is to operate an Ubuntu server in AWS and make it accessible through a registered domain, while documenting the administration and troubleshooting process.
Primary objectives
Provision a cloud server, secure remote access, connect a domain, investigate DNS hosting and publish a website.
Learning objectives
Practise Linux service management, network diagnostics, DNS records, web-server configuration and AWS cost awareness.
Target architecture
*BIND9 public authoritative service is a proposed/verification item. Namecheap BasicDNS is the DNS service confirmed in the project history.
AWS EC2 Ubuntu deployment
Ubuntu Server was launched as an Amazon EC2 instance. The instance provides the Linux environment for administration, DNS experimentation and web hosting.
- Sign in to the AWS Management Console and open EC2.
- Select Launch instances and name the instance
LinuxCat. - Choose an Ubuntu Server AMI and an appropriate instance type.
- Configure the key pair, VPC, subnet and security group.
- Allow only the required inbound traffic and launch the instance.
- Connect using the Ubuntu account and the configured SSH private key.
IP addresses encountered
| Address | Context |
|---|---|
| 54.195.229.213 | Elastic IP selected as the intended stable public endpoint. |
| 172.31.30.183 | Private IPv4 address observed in the AWS environment. |
| 3.249.193.58 | Earlier public IP observed during setup. |
| 54.74.135.207 | Public IP used in an SSH connection attempt. |
| 172.31.18.18 | Private address used in a connection attempt that timed out. |
Other public IPs appeared in earlier troubleshooting. Public addresses can change when an instance is stopped and started unless an Elastic IP is attached. Confirm the current instance and address in AWS before using them.
Secure SSH administration
Generate an ED25519 key pair
ssh-keygen -t ed25519 -f ~/.ssh/aws-ubuntu
The private key is ~/.ssh/aws-ubuntu; the public key is ~/.ssh/aws-ubuntu.pub. Keep the private key secret and copy only the public key to the server.
Configure server-side permissions
mkdir -p ~/.ssh
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
sudo chown -R ubuntu:ubuntu /home/ubuntu/.ssh
Connect to the EC2 instance
ssh -i ~/.ssh/aws-ubuntu ubuntu@54.195.229.213
Create a convenient SSH alias
vim ~/.ssh/config
Host linuxcat
HostName 54.195.229.213
User ubuntu
Port 22
IdentityFile ~/.ssh/aws-ubuntu
chmod 600 ~/.ssh/config
ssh linuxcat
The same private key must be securely available to the client machine (for example, the Ubuntu UTM VM) if it is to connect using this method.
Permission denied (publickey) usually points to a username, key, permissions or authorized_keys issue. A timeout usually points to reachability, routing or security-group rules rather than an incorrect key.Password authentication investigation
sudo passwd ubuntu
sudo vim /etc/ssh/sshd_config
PasswordAuthentication yes
PubkeyAuthentication yes
sudo sshd -t
sudo systemctl restart ssh
Password login was explored, but successful password-based access was not confirmed. Prefer SSH keys and avoid enabling password authentication unless there is a clear operational need.
AWS security group
Security groups act as stateful virtual firewalls for EC2. The intended inbound rules are:
| Service | Protocol | Port | Recommended source |
|---|---|---|---|
| SSH | TCP | 22 | Administrator public IP /32 |
| HTTP | TCP | 80 | 0.0.0.0/0 (public website) |
| HTTPS | TCP | 443 | 0.0.0.0/0 (public website) |
| DNS | UDP + TCP | 53 | Only if intentionally operating public DNS |
In the AWS Console: EC2 → Instances → select LinuxCat → Security → security group → Edit inbound rules.
Elastic IP allocation
An Elastic IP provides a stable public IPv4 address for the EC2 instance. The project recorded 54.195.229.213 as the intended LinuxCat endpoint.
- Open EC2 → Network & Security → Elastic IPs.
- Choose Allocate Elastic IP address.
- Select the allocated address and choose Associate Elastic IP address.
- Select the LinuxCat instance and the appropriate private IP, then associate it.
- Verify the address in the EC2 instance details and test connectivity.
An allocated but unused Elastic IP may incur charges. Review current AWS public IPv4 pricing and release addresses that are no longer needed.
Connecting linuxcat.site
The domain was registered through Namecheap and used Namecheap BasicDNS. The nameservers observed were:
dns1.registrar-servers.com
dns2.registrar-servers.com
Configure the root A record
| Type | Host | Value |
|---|---|---|
| A | @ | 54.195.229.213 |
In Namecheap: Domain List → Manage → Advanced DNS → Host Records. Set the root host (@) to the Elastic IP.
Optional www alias
| Type | Host | Value |
|---|---|---|
| CNAME | www | linuxcat.site |
Verify DNS records
dig @8.8.8.8 linuxcat.site A
dig @8.8.8.8 linuxcat.site NS
dig @8.8.8.8 www.linuxcat.site
nslookup linuxcat.site
nslookup linuxcat.site 8.8.8.8
A successful public DNS response was observed for the root domain, returning 54.195.229.213 from Google's resolver. The NS lookup returned the Namecheap registrar nameservers.
BIND9 installation and zone configuration
BIND9 was investigated as DNS server software for hosting an authoritative zone. Installing BIND9 on EC2 does not automatically make it authoritative for linuxcat.site; public DNS delegation must also point to the BIND nameservers.
Install packages
sudo apt update
sudo apt install bind9 bind9-utils dnsutils -y
named -v
sudo systemctl status bind9
Important configuration files
| File | Purpose |
|---|---|
| /etc/bind/named.conf | Main BIND configuration |
| /etc/bind/named.conf.options | Global options and access policy |
| /etc/bind/named.conf.local | Local zone declarations |
| /etc/bind/db.linuxcat.site | LinuxCat zone data file |
Declare the zone
sudo vim /etc/bind/named.conf.local
zone "linuxcat.site" {
type master;
file "/etc/bind/db.linuxcat.site";
};
Example zone file
sudo vim /etc/bind/db.linuxcat.site
$TTL 86400
@ IN SOA ns1.linuxcat.site. admin.linuxcat.site. (
2026110801
3600
1800
604800
86400
)
@ IN NS ns1.linuxcat.site.
ns1 IN A 54.195.229.213
@ IN A 54.195.229.213
www IN CNAME linuxcat.site.
This is an illustrative starting point, not evidence that the zone was deployed. A production authoritative setup needs suitable nameserver hostnames, glue records where required, delegation at the registrar, correct firewall rules, and a reliable DNS design. Do not point public delegation at this server until it is correctly configured and tested.
Validate and test
sudo named-checkconf
sudo named-checkzone linuxcat.site /etc/bind/db.linuxcat.site
sudo systemctl restart bind9
sudo systemctl status bind9
dig @127.0.0.1 linuxcat.site A
systemd enable error encountered
sudo systemctl enable bind9
Failed to enable unit: Refusing to operate on linked unit file bind9.service
Investigate the installed unit and alias rather than forcing the operation:
systemctl list-unit-files | grep -E 'bind|named'
systemctl status bind9
systemctl status named
Apache2 and Nginx
Nginx was reported as running. Apache2 was also investigated, including its environment configuration. Both commonly listen on TCP port 80, so they should not compete for the same address and port.
Apache2
Configuration directory: /etc/apache2/
Environment file: /etc/apache2/envvars
Nginx
Main config: /etc/nginx/nginx.conf
Default site: /etc/nginx/sites-available/default
Install and inspect Apache2
sudo apt update
sudo apt install apache2 -y
sudo systemctl status apache2
sudo apache2ctl configtest
sudo apache2ctl -S
Inspect Apache environment variables
sudo vim /etc/apache2/envvars
Variables such as APACHE_RUN_DIR, APACHE_PID_FILE, APACHE_RUN_USER, APACHE_RUN_GROUP and APACHE_LOG_DIR define Apache's runtime and logging environment. On Ubuntu, manage Apache through systemd and the packaged control utilities rather than launching the daemon manually without its expected environment.
Manage Nginx
sudo systemctl status nginx
sudo systemctl start nginx
sudo systemctl enable nginx
sudo nginx -t
sudo systemctl restart nginx
Example LinuxCat Nginx server block
server {
listen 80;
listen [::]:80;
server_name linuxcat.site www.linuxcat.site;
root /var/www/linuxcat;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
Create a simple test website
sudo mkdir -p /var/www/linuxcat
sudo vim /var/www/linuxcat/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>LinuxCat</title>
</head>
<body>
<h1>Welcome to LinuxCat</h1>
<p>LinuxCat Linux Server Project</p>
</body>
</html>
sudo chown -R www-data:www-data /var/www/linuxcat
sudo find /var/www/linuxcat -type d -exec chmod 755 {} \;
sudo find /var/www/linuxcat -type f -exec chmod 644 {} \;
sudo nginx -t
sudo systemctl restart nginx
If using a separate site file, create it under /etc/nginx/sites-available/linuxcat and enable it with a symlink in /etc/nginx/sites-enabled/. The example above is a suggested configuration, not a verified deployed site.
Check for port conflicts
sudo ss -tulpn | grep ':80'
sudo systemctl stop apache2
sudo systemctl disable apache2
Only stop and disable Apache2 if Nginx is the chosen web server and Apache2 is not needed. Alternatively, configure a deliberate reverse-proxy arrangement.
Network and service troubleshooting
| Observed symptom | Likely area to investigate | Useful checks |
|---|---|---|
| Permission denied (publickey) | SSH username, private key, key permissions, authorized_keys | ssh -v, chmod, server auth logs |
| Connection timed out | Security group, route, public/private IP, network ACL | nc -zv, ip route, AWS console |
| Connection refused | Service not listening, wrong port, local firewall | ss -tulpn, systemctl status |
| DNS NXDOMAIN | Record missing, wrong zone or delegation | dig, dig NS |
| DNS timeout | Resolver connectivity, firewall, DNS service | dig @8.8.8.8, ss -tulpn |
| Web server won't start | Port conflict or invalid configuration | nginx -t, apache2ctl configtest |
General diagnostic commands
ip addr
ip route
hostname -I
ping -c 4 8.8.8.8
ping -c 4 linuxcat.site
traceroute linuxcat.site
curl -4 ifconfig.me
sudo ufw status
sudo journalctl -xe
Check listening ports
sudo ss -tulpn
-t TCP · -u UDP · -l listening · -p process · -n numeric output.
AWS billing and monitoring
The project target is to keep AWS expenditure visible and aim for a monthly budget of $10. This is a budget target, not a guaranteed maximum charge.
Create a monthly AWS budget
- Open Billing and Cost Management → Budgets.
- Create a cost budget with a monthly period.
- Set the budget amount to
10 USD. - Configure alert thresholds, for example 50%, 80% and 100%.
- Add an email notification recipient and create the budget.
Suggested daily review metrics
| Metric | What to monitor |
|---|---|
| EC2 usage | Instance state and running hours |
| Compute cost | Estimated EC2 charges |
| Elastic IP / public IPv4 | Allocation, association and applicable charges |
| Data transfer | Outbound traffic and related charges |
| Budget consumption | Actual and forecast spend against $10 |
Useful AWS services include Cost Explorer, AWS Budgets and CloudWatch. A daily dashboard or report requires additional configuration; creating a budget alone does not create a complete daily report.
Project status and next steps
This status is based on the available project conversation and configuration notes. It is not a live inspection of the AWS account or server.
| Component | Status | Evidence / next action |
|---|---|---|
| EC2 Ubuntu instance | Created | Instance deployment discussed and used. |
| SSH key authentication | Configured | ED25519 key and SSH connection workflow documented. |
| Elastic IP | Allocated | 54.195.229.213 recorded as intended stable endpoint. |
| Namecheap domain / BasicDNS | Configured | Registrar nameservers and root A lookup observed. |
| www CNAME | Verify | Check dig www.linuxcat.site. |
| BIND9 installation | Verify | Check installed packages and service status. |
| BIND9 public authority | Not verified | Complete zone, nameserver delegation and external tests if required. |
| Nginx | Reported running | Verify current service and site configuration. |
| Apache2 | Investigated | Check whether installed or required; avoid port conflict. |
| HTTPS / TLS | Verify | Install and test a certificate for root and www hostnames. |
| $10 AWS budget | Verify | Confirm budget and notification thresholds in Billing. |
| Daily reporting | Verify | Configure a report or dashboard schedule. |
Recommended completion checklist
- Confirm the current EC2 instance and Elastic IP association.
- Confirm SSH access using the
linuxcatalias. - Confirm root and www DNS records.
- Choose whether DNS remains with Namecheap or moves to a self-hosted authoritative BIND9 service.
- Choose one web-server architecture and verify the site responds over HTTP.
- Configure HTTPS and test certificate renewal.
- Confirm AWS budget alerts and cost reporting.
LinuxCat command reference
System update and packages
sudo apt update && sudo apt upgrade -y
sudo apt install bind9 bind9-utils dnsutils -y
sudo apt install nginx -y
sudo apt install apache2 -y
SSH
ssh-keygen -t ed25519 -f ~/.ssh/aws-ubuntu
chmod 700 ~/.ssh
chmod 600 ~/.ssh/aws-ubuntu
chmod 600 ~/.ssh/config
ssh -i ~/.ssh/aws-ubuntu ubuntu@54.195.229.213
ssh linuxcat
DNS and BIND9
dig @8.8.8.8 linuxcat.site A
dig @8.8.8.8 linuxcat.site NS
dig @8.8.8.8 www.linuxcat.site
nslookup linuxcat.site
sudo named-checkconf
sudo named-checkzone linuxcat.site /etc/bind/db.linuxcat.site
sudo systemctl status bind9
Web services
sudo nginx -t
sudo systemctl status nginx
sudo systemctl restart nginx
sudo apache2ctl configtest
sudo systemctl status apache2
sudo systemctl restart apache2
curl -I http://linuxcat.site
curl -I https://linuxcat.site
Network diagnostics
ip addr
ip route
hostname -I
curl -4 ifconfig.me
sudo ss -tulpn
sudo ss -tulpn | grep ':80'
nc -zv 54.195.229.213 22
ping -c 4 8.8.8.8
traceroute linuxcat.site
sudo ufw status
sudo journalctl -xe
Learn by building. Document what works.
LinuxCat brings together practical Linux administration and cloud infrastructure skills: provisioning an Ubuntu host, securing remote access, managing DNS, configuring a web server and monitoring cloud costs.
Domain: linuxcat.site · Platform: AWS EC2 · OS: Ubuntu Server