This phase focuses on essential networking concepts and commands used to inspect and troubleshoot network configurations on a Linux system. The commands were executed on a remote Fedora host accessed via hardened SSH from a MacBook terminal.
π Click here to download the complete Linux Networking Lab PDF
- Display and interpret IP address configuration
- Inspect routing table entries
- Check device status with
nmcli - Explore network interfaces using
ip link
ip aβ shows IP address assignmentip routeβ displays routing tablenmcli device statusβ checks network manager statusip link showβ inspects interface state and stats- Fedora Linux (target node)
- macOS Terminal (control node)
1. IP Address Output
2. Routing Table
3. NMCLI Device Status
4. IP Link Summary
All outputs were captured during real command-line sessions as part of the
linux-networking-lab. This project is part of a Linux+ certification training path and documents validated system behavior on a Fedora server.
Manually assign a static IP to the Fedora laptop and map it to a custom hostname using /etc/hosts. This setup improves SSH stability, scripting, and internal network recognition β all critical for sysadmin and DevOps tasks.
# 1. Set static IP, gateway, and DNS via nmcli
sudo nmcli con mod SHELL_5C4F_5G ipv4.addresses 192.168.1.50/24
sudo nmcli con mod SHELL_5C4F_5G ipv4.gateway 192.168.1.1
sudo nmcli con mod SHELL_5C4F_5G ipv4.dns "1.1.1.1 8.8.8.8"
sudo nmcli con mod SHELL_5C4F_5G ipv4.method manual
sudo nmcli con down SHELL_5C4F_5G && sudo nmcli con up SHELL_5C4F_5G
# 2. Confirm IP works with ping
ping -c 3 8.8.8.8
# 3. Set custom hostname
sudo hostname fedora-lab
# (hostnamectl set-hostname failed due to PolicyKit auth timeout)
# 4. Update /etc/hosts
sudo nano /etc/hosts
# β Add line: 192.168.1.50 fedora-lab
# 5. Validate hostname resolution
ping -c 3 fedora-lab| β Checkpoint | Result |
|---|---|
Static IP applied via nmcli |
192.168.1.50/24 assigned to Wi-Fi |
| Internet test with ping | Successful: packets returned from 8.8.8.8 |
hostname command output |
Transient hostname set to fedora-lab |
/etc/hosts manually updated |
Maps 192.168.1.50 to fedora-lab |
ping fedora-lab |
<1 ms latency β local resolution working |
| Step | Description | Screenshot |
|---|---|---|
| 1οΈβ£ | nmcli static IP config + ping test |
![]() |
| 2οΈβ£ | Hostname set via hostnamectl attempt |
![]() |
| 3οΈβ£ | ping fedora-lab successful |
![]() |
In this section, we configure DNS resolvers manually and validate DNS resolution using diagnostic tools.
| Step | Command | Purpose |
|---|---|---|
| 1οΈβ£ | sudo nano /etc/resolv.conf |
Edit DNS configuration file manually |
| 2οΈβ£ | Add the following lines: nameserver 1.1.1.1 nameserver 8.8.8.8 |
Set Cloudflare and Google as DNS resolvers |
| 3οΈβ£ | Save and exit (CTRL + O, Enter, CTRL + X) |
Apply the DNS changes |
| 4οΈβ£ | cat /etc/resolv.conf |
Confirm resolvers are correctly set |
| Step | Command | Description |
|---|---|---|
| β | dig github.com |
Query DNS to resolve GitHubβs IP address |
Expected Output:
- You should see an ANSWER SECTION with GitHub's IP addresses.
Query time,SERVER, andWHENvalues validate DNS resolution is working.
| Step | Command | Description |
|---|---|---|
| β | ping -c 3 github.com |
Validate name resolution + connectivity |
Expected Output:
- 3 replies from GitHubβs IP (usually a
20.x.x.xaddress). - 0% packet loss, and time in milliseconds.
In this phase, we tested and validated network configurations, DNS functionality, service routes, and port availability using key diagnostic tools.
| Command | Purpose |
|---|---|
ping |
Test basic IP connectivity |
dig |
Perform DNS lookup |
ss -tuln |
Show listening ports (TCP/UDP) |
netstat -tuln |
Legacy alternative to ss |
nmcli dev show |
Display detailed device connection info |
journalctl -u NetworkManager |
View network-related logs |
ip route |
View current routing table |
traceroute |
Show packet path to destination |
This section validates that SSH is securely configured and running on the Fedora lab machine, using diagnostics and a successful remote login from the MacBook.
Checked whether the SSH daemon is listening on the correct custom port (2222):
sudo ss -tuln | grep 2222β
Validation: Port 2222 is actively listening for incoming SSH connections.
Inspected /etc/ssh/sshd_config to confirm secure options:
Port 2222PasswordAuthentication noPermitRootLogin noAllowUsers sysopsProtocol 2
sudo nano /etc/ssh/sshd_configπΈ Screenshots:
Used journalctl to view logs for sshd and confirm service restart and activity:
sudo journalctl -u sshd --since "15 minutes ago"β Validation: SSH service restarted and bound to the correct port.
Used the MacBook Terminal to connect to the Fedora machine via:
ssh [email protected] -p 2222β Login successful using SSH key-based authentication.
β Result: SSH is securely configured, actively running on port 2222, and accessible only via key-based login from trusted devices.
This phase focused on inspecting and modifying the Fedora firewall using firewalld to allow secure access on the custom SSH port (2222). We validated port accessibility with system commands and remote scanning tools.
- Confirm firewalld is running and managing zones
- Open TCP port 2222 permanently
- Reload firewall rules
- Validate SSH port status with
ss,nmap, and a live SSH login
| Command | Purpose |
|---|---|
firewall-cmd |
Manage firewalld rules and zones |
ss -tuln |
Show listening TCP/UDP ports |
nmap |
Scan open ports from another machine |
ssh |
Test connectivity to the SSH service |
| β Checkpoint | Output |
|---|---|
sudo firewall-cmd --state |
running β confirms firewalld is active |
sudo firewall-cmd --get-active-zones |
Displays zones: FedoraWorkstation, trusted, drop |
sudo firewall-cmd --list-all |
Shows drop as default with custom rules |
πΈ Screenshots:
| Action | Command(s) Executed |
|---|---|
| Open port temporarily | sudo firewall-cmd --add-port=2222/tcp |
| Open port permanently | sudo firewall-cmd --permanent --add-port=2222/tcp |
| Reload firewall | sudo firewall-cmd --reload |
| Confirm rule took effect | sudo ss -tuln | grep 2222 |
πΈ Screenshots:
From the Fedora machine, we scanned its own IP to ensure port 2222 is open:
sudo nmap -p 2222 192.168.1.50β
Output: Port 2222 was reported as open.
πΈ Screenshot:
Final test from MacBook to Fedora:
ssh [email protected] -p 2222β Result: Login successful with public key authentication.
πΈ Screenshot:
| β Task | Status |
|---|---|
| firewalld confirmed active | β |
| port 2222 opened temporarily + permanently | β |
| firewall rules reloaded successfully | β |
ss confirmed SSH daemon listening |
β |
nmap confirmed remote visibility |
β |
| SSH login using port 2222 validated | β |
π Why this matters: Real-world servers are often protected by firewalls with limited open ports. Knowing how to inspect, configure, and validate firewall access is essential for sysadmins, DevOps, and security professionals.
This final phase summarizes the outcomes of our Linux Networking Lab across Phases 3Aβ3E, validating that each core concept was understood, tested, and documented.
| Phase | Topic | Objective | Status | Evidence |
|---|---|---|---|---|
| 3A | Interfaces & Static IP Setup | Display IP, set static IP, inspect routes | β Done | Screenshots 01β04, 05 |
| 3B | Hostname & DNS Configuration | Set hostname, edit /etc/hosts, configure DNS, test resolution | β Done | Screenshots 06β07, 08β10 |
| 3C | Network Diagnostics Tools | Use ping, dig, ss, netstat, nmcli, journalctl, traceroute |
β Done | Screenshots 11β18 |
| 3D | SSH & Remote Connectivity | Harden SSH config, verify logs, test login via port 2222 | β Done | Screenshots 19β21 |
| 3E | Firewall & Port Control | Validate firewalld, open SSH port, reload, test via Nmap and SSH |
β Done | Screenshots 22β29 |
All key networking and security topics were executed live in a Fedora Linux environment and remotely validated from a MacBook control node. This lab proves hands-on mastery over:
- IP and DNS configuration
- SSH hardening and access control
- Firewall zone and port management
- Service diagnostics using real-world CLI tools






























