diff --git a/2025/linux/solution/task1.md b/2025/linux/solution/task1.md new file mode 100644 index 000000000..d33a1d891 --- /dev/null +++ b/2025/linux/solution/task1.md @@ -0,0 +1,52 @@ +# Week 2: Linux System Administration & Automation + +## 🧑‍💻 1. Create a New User +### command +**sudo adduser -m devops_user** + +✅ Verify: + +cat /etc/passwd + +## 👥 2. Create a Group and Add User +### command +**sudo groupadd devops_team** + +**sudo usermod -aG devops_team devops_user** + +✅ Verify: + +cat /etc/group + +## 🔑 3. Set or Change Password +### command +**sudo passwd devops_user** + +Enter and confirm the new password. + +## ⚙️ 4. Grant Sudo Access +### command +**sudo gpasswd devops_user sudo** + +✅ Verify: + +cat /etc/group | grep "sudo" + +## 🚫 5. Restrict SSH Login for Certain Users +### command +**sudo vim /etc/ssh/sshd_config** + +add one of these lines at the end: + +**AllowUsers ubuntu** + +It means only the user ubuntu is allowed to log in via SSH, and all other users are automatically denied SSH access. + + OR + +**DenyUsers devops_user** + +Only devops_user is denied SSH access, +and all other users are still allowed (unless blocked by other SSH rules or permissions). + + diff --git a/2025/linux/solution/task2.md b/2025/linux/solution/task2.md new file mode 100644 index 000000000..ae9df0bd7 --- /dev/null +++ b/2025/linux/solution/task2.md @@ -0,0 +1,23 @@ +# File & Directory Permissions(WEEK-2) + +## 1. Create the Directory +**sudo mkdir /devops_workspace** + +## 2. Create a File Inside It +**sudo touch /devops_workspace/project_notes.txt** + +## 3. Set Permissions +**sudo chmod 640 /devops_workspace/project_notes.txt** + +## 4. Verify Permissions +**sudo ls -l /devops_workspace** + + +| Item | Command | Purpose | +| ---------------- | ------------------------------- | ----------------- | +| Create directory | `mkdir /devops_workspace` | New workspace | +| Create file | `touch project_notes.txt` | Empty notes file | +| Change owner | `chown devops_user:devops_team` | Set owner/group | +| Set permissions | `chmod 640 project_notes.txt` | rw-, r--, --- | +| Verify | `ls -l` | Check permissions | + diff --git a/2025/networking/solution/task1.md b/2025/networking/solution/task1.md new file mode 100644 index 000000000..f3ce3c83d --- /dev/null +++ b/2025/networking/solution/task1.md @@ -0,0 +1,41 @@ +# Understanding OSI & TCP/IP Models — Real-World Examples + +## 1. The OSI (Open Systems Interconnection) Model + +Purpose: A conceptual, 7-layer framework used to understand and design network interactions. It's a theoretical standard. + +## 2. The TCP/IP (Transmission Control Protocol/Internet Protocol) Model + +Purpose: A practical, 4-layer model that describes the protocols the modern internet is built on + +### 💡 Examples: + +**Application Layer**: HTTP, HTTPS (web communication) + +**Function**: Provides network services directly to the user's applications. This layer defines the format and meaning of the data. + +**Transport Layer**: TCP, UDP (data transmission control) + +**Function**: Manages end-to-end communication between two hosts. It handles data segmentation, flow control, and error recovery. + +**Network Layer**: IP, ICMP (routing & addressing) + +**Function**: Handles the logical addressing and routing of packets across multiple networks (from your local network to the internet and back). + +**Data Link Layer**: Ethernet, MAC (local communication) + +**Function**: Responsible for node-to-node data transfer on the same physical link (e.g., between your PC and your router). It handles physical addressing and error detection. + +**Physical Layer**: Cables, Wi-Fi (signal transmission) + +**Function**: Defines the electrical, mechanical, and procedural specifications for the physical transmission of the raw bitstream. + +## The Return Journey + +The web server at example.com receives the request and goes through the same process in reverse: + +The **Physical layer** converts signals back to bits. +The **Data Link layer** checks the MAC address and removes the frame, passing the packet up. +The **Network layer** checks the IP address and routes the packet internally, removing the IP header. +The **Transport layer** (TCP) reassembles the segments, acknowledges receipt, and passes the correct data stream to the web server software listening on port 443. +The **Application layer** (the web server software) processes the HTTPS request, fetches the webpage, and sends the HTML data back to you, starting the entire packaging process over again. \ No newline at end of file diff --git a/2025/networking/solution/task2.md b/2025/networking/solution/task2.md new file mode 100644 index 000000000..903b5ec58 --- /dev/null +++ b/2025/networking/solution/task2.md @@ -0,0 +1,49 @@ +# 🌐 Essential Networking Protocols and Ports for DevOps Engineers +Networking for DevOps (edit from Remote) + +In DevOps Networking knowledge is essential for deploying micro services, automation infrastructure or monitoring system, understanding protocol's and port is help you to troubleshoot issue, configure firewall and secure your system. + +## **Application Layer Protocol** + + +These protocols is used to operate with Apllication layer(Layer-7) and are used by services and tool you intract with daily. + +1. **HTTP**(Hypertext transfer Protocol), **Port**- 80, standard web commmunication protocol and used in Web Server. +2. **HTTPS**(HyperText Transfer Protocol Secure), **Port**- 443, Secure HTTP using SSL/TLS(Secure Sockets layer/ Transport layer Sercurity) +3. **FTP**(File Transfer protocol), **Port**- 21, Transfer file between Client and Server. +4. **SFTP/SCP**(Secure FTP/ Secure Copy protocol), **Port**- 22, Secure file transfer over SSH +5. **SSH**(Secure Shell), **Port**- 22, Secure Shell for remote access and Automation. +6. **DNS**(Domain Name System), **Port**- 53, Resolve domain names to IP addresses. +7. **SMTP**(Secure MAil transfer Protocol), **Port**- 25/587/465, Sends Email Notifications +8. **SNMP**(Simple Network Managemnt Protocol), **Port**- 161, Monitors and manage network devices. +9. **NTP**(Network Time Protocol), **Port**- 123, Synchronizes time across systems. + +## **Transport Layer Protocol** + +1. **TCP**(Transmission control protocol), **Port**- , reliable and connection-oriented data delivery. +2. **UDP**(User Datagram Protocol), **Port**- , fast andd connectionless data transfer. + +## **Internet and Networking Protocol** + +1. **DHCP**(Dynamics Host Configuration Protocol), **Port**- 67/68, Assigns IP address dynamically. +2. **ARP**(Address Resolutions Protocol), **Port**- , Maps IP to MAC address on local network. +3. **DoH(DNS Over HTTPS)**, **Port**- 443, Encrypt DNS lookups, improve privacy and security in cloud applications. + +## **DevOps Tool-Specific ports** + +1. **Jenkins** **Port**- 8080 +2. **Docker Registry** **Port**- 5000 +3. **Kubernetes API Server** **Port**- 6443 +4. **Prometheus** **Port**- 9090 +5. **Prometheus** **Port**- 9090 +6. **Grafana** **Port**- 3000 +7. **Elasticsearch** **Port**- 9200 +8. **Kibana** **Port**- 5601 +9. **GitLab runner/CI** **Port**- 8081/443 + +Networking is the **Foundation of All DevOps practices.** Knowing these Protocol and their Ports empowers you to:- +1. Secure your environment +2. Debbug network issue +3. Automate deployment +4. Build reliable cloud-native system + diff --git a/2025/networking/solution/task3.md b/2025/networking/solution/task3.md new file mode 100644 index 000000000..a071201d4 --- /dev/null +++ b/2025/networking/solution/task3.md @@ -0,0 +1,50 @@ +# EC2-Security-Group-Guide +Step-by-step guide for how to create and configure Security Groups. + +## **Step 1: Sign in to AWS Console** ## + +1. Go to AWS Management Console. +2. Sign in to your credential. +3. Navigate to **EC2** under the **Commute**. + +## **Step 2: launch an EC2 Instance** ## + +1. click **Launch Instance**. +2. Create a Name tag for EC2 Instance. +3. Choose an Amazon Machine Image(**AMI**). +4. Select an **Instance Type**. +5. Create or Select already existing **Key** Pair. + +## **Step 3: Configure Security Group** ## +Security group defines who can access your instance. + +1. Create New Security group + + • Enter **name** for Security group. + + • Write **description** for Security Group. +2. Add Inbound Rules(traffic coming to the instance) + + •**SSH(TCP 22)** - To connect via SSH. + + •**HTTP(TCP 80)** - To allow web traffic if hosting a website. + + •**HTTPS(TCP 443)** - To allow Secure web traffic. + +3. Add Outbound Rules(traffic leaving the instance) + + •By default all outbound traffic is allowed, you can leave it as is. + +## **Step 4: Configure storage** ## +1. You can configure storage for your instance as you need and by default **8GB** is selected. + +## **Step 4: Review and launch** ## +1. Review all settings: **Instance Type, AMI, Security Group, etc.** +2. Check Acknowledgement box and click **launch instances**. + +## **Step 5: Connect to your EC2 Instance** ## +1. Go to Instances in EC2 dashboard. +2. Select the instance and click **Connect**. +3. And Follow the SSH instructions. + + diff --git a/2025/networking/solution/task4.md b/2025/networking/solution/task4.md new file mode 100644 index 000000000..51606522b --- /dev/null +++ b/2025/networking/solution/task4.md @@ -0,0 +1,23 @@ +# Networking Basic Commands + +**Get hands-on with these key commands 👇** + +1️⃣ **ping** — Check network connectivity between hosts. + +➡️ **Example**: ping google.com + +2️⃣ **traceroute / tracert** — Trace the path that packets take to reach a destination. + +➡️ **Example**: traceroute google.com + +3️⃣ **netstat** — Display active connections and listening ports. + +➡️ **Example**: netstat -tuln + +4️⃣ **curl** — Make HTTP requests and test web/API responses. + +➡️ **Example**: curl -I example.com + +5️⃣ **dig / nslookup** — Perform DNS lookups and troubleshoot domain resolution. + +➡️ **Example**: dig +short google.com \ No newline at end of file diff --git a/README.md b/README.md index aff67ddb9..ab80684aa 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ Welcome to **90DaysOfDevOps**, a structured and hands-on DevOps challenge by **TrainWithShubham**. -This repository is designed to help you **build real DevOps skills step by step in 90 days** — not by watching endless videos, but by **doing daily tasks**, building projects, and thinking like a **production-ready DevOps engineer**. This is not a theory-heavy course. This is a **discipline + execution challenge**.