🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Cybersecurity › Linux for Cybersecurity › Lesson 5
TEC-CYBE44-04 · Lesson 5 · 14.5 clock hours · demo

Linux Networking Fundamentals

Objective. Students configure network interfaces, test connectivity, and use Linux networking tools to enumerate hosts and inspect traffic.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Linux Networking Fundamentals

Understanding how Linux manages network interfaces, connections, and traffic is a core skill for any cybersecurity professional. Whether you are hardening a server, responding to an incident, or performing a vulnerability assessment, you need to move quickly and accurately at the command line. This lesson covers the tools and concepts you will use every day on the job.

Network Interfaces and the ip Suite

Linux refers to each physical or virtual network adapter as a network interface. Common names are `eth0`, `ens33`, `ens3`, or `lo` (the loopback). The `ip` command (part of the `iproute2` package) is the modern replacement for the older `ifconfig`.

To view current interface addresses, run `ip addr show`. To view the routing table, run `ip route show`. These commands give you the information you need to understand how the host reaches other systems.

Configuring a static IP address means telling the system to use a fixed address rather than requesting one from DHCP. On Ubuntu/Debian systems that use Netplan, you edit a YAML file under `/etc/netplan/` and then apply it with `sudo netplan apply`. On systems using NetworkManager (common on Red Hat-family and many desktops), you use `nmcli` to set addresses and routes. Always verify your configuration persists after a reboot — a setting that disappears on restart was never truly configured.

After setting an address, confirm connectivity with `ping <destination>` and trace the path packets take with `traceroute <destination>` (or `tracepath` if `traceroute` is not installed). Both tools rely on ICMP; firewalls that block ICMP will cause them to show timeouts, which is itself useful information.

Listing Open Ports and Connections

Knowing what network ports are open on a system is essential for hardening. An unexpected open port can indicate a misconfigured service, unauthorized software, or an active compromise.

`ss` (socket statistics) is the modern tool for listing connections and listening ports. The flag combination `ss -tlnp` is particularly useful:

`netstat` from the `net-tools` package provides similar output with `netstat -tlnp` and is still widely found on older systems and in exam scenarios. When you identify a port that should not be open on a hardened server — such as Telnet (port 23) or an unknown service on a high-numbered port — document it and investigate the owning process before taking action.

Capturing and Analyzing Traffic with tcpdump and Wireshark

`tcpdump` is a command-line packet capture tool available on nearly every Linux system. To capture traffic on interface `ens33` and save it for later analysis, run:

```

sudo tcpdump -i ens33 -w capture.pcap

```

Press Ctrl+C to stop after your desired interval, or use the `-G` flag with `-W` for timed rotation. The resulting `.pcap` file can be opened in Wireshark, a graphical protocol analyzer, for detailed inspection.

In Wireshark, two patterns are fundamental to recognize:

1. DNS query and response — Look for packets using the DNS protocol (UDP or TCP port 53). The query packet asks for an address; the response returns it. The Wireshark display filter `dns` isolates these quickly.

2. TCP three-way handshake — Every TCP connection begins with three packets: SYN (client to server), SYN-ACK (server to client), and ACK (client to server). In Wireshark, filter by a specific IP or port and look for this flag sequence in the Info column.

Understanding these patterns lets you confirm normal operation, spot scanning activity, or identify data exfiltration attempts.

Safety and Responsible Use

Packet capture is a powerful and potentially sensitive activity. Always obtain written authorization before capturing traffic on any network you do not personally own. In a professional environment, unauthorized packet capture may violate organizational policy, federal law under the Electronic Communications Privacy Act, or both. In this lab you are working on your own VM and virtual network — traffic capture there is appropriate. Never redirect captures from your VM environment onto a production or campus network segment.

When running commands with `sudo`, confirm you understand what each command does before executing it. Misconfiguring a network interface can cause loss of remote access to a system; in a production context that may require physical console access to recover. Always document your steps so changes can be reversed.

Connecting to Security Credentials

The concepts in this lesson map directly to objectives in CompTIA Security+ (network configuration, traffic analysis, hardening) and CompTIA CySA+ (host and network analysis, identifying anomalous traffic). The ISC2 CC exam also covers network concepts including protocols, ports, and basic traffic analysis. Mastery of Linux networking tools gives you practical skill behind the theory those exams test.

Key terms8

Network interfaceA hardware or virtual adapter that connects a Linux host to a network, identified by a name such as eth0, ens33, or lo (loopback).
Static IP addressA manually assigned, fixed IP address that does not change between reboots, as opposed to a dynamically assigned address obtained from a DHCP server.
NetplanA YAML-based network configuration system used on Ubuntu and some Debian-family Linux distributions; changes are applied with the netplan apply command.
ss (socket statistics)A Linux command-line tool that displays information about network sockets, including listening ports and established connections, and can identify the owning process with the -p flag.
tcpdumpA command-line packet capture utility for Linux that can write captured packets to a .pcap file for later analysis in tools such as Wireshark.
TCP three-way handshakeThe three-packet sequence (SYN, SYN-ACK, ACK) used to establish a TCP connection between a client and a server before data is exchanged.
DNS (Domain Name System)A protocol that resolves human-readable hostnames to IP addresses; DNS traffic typically uses UDP or TCP on port 53 and is visible in packet captures.
Port hardeningThe process of identifying and closing or restricting network ports that are not required for a system's intended function, reducing the attack surface.
In class: Configure a static IP address on a VM network interface using ip addr and ip route (or nmcli on systems using NetworkManager), verify connectivity with ping and traceroute, and document the configuration in /etc/netplan or the equivalent file. · Use ss and netstat to list all listening ports and established connections on the local system; identify which process owns each port using ss -tlnp; flag any ports that should not be open on a hardened server. · Capture 60 seconds of network traffic with tcpdump on the VM's interface, save the capture to a .pcap file, open it in Wireshark on the host, and identify at least one DNS query and one TCP three-way handshake — annotating both in a screenshot report.
Materials: Linux VM with two virtual NICs, Wireshark installed on host, tcpdump, ip-suite tools, CompTIA Security+ Study Guide (network fundamentals chapters), ISC2 CC network concepts notes
Check: Instructor verifies static IP configuration persists after reboot and reviews annotated Wireshark screenshot report; pass = correct IP assignment, at least two open ports correctly attributed to processes, and both packet patterns correctly identified.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CompTIA Security+ — Network Security / Hardening
1. A security analyst wants to view all TCP listening ports on a Linux server along with the process that owns each port. Which command produces this output?
CompTIA Security+ — Network Configuration
2. After editing a Netplan YAML configuration file on an Ubuntu server, which command must be run to apply the changes to the live system?
CompTIA Security+ — Hardening / Vulnerability Management
3. A junior analyst notices that port 23 appears in the output of ss -tlnp on a freshly built web server. What is the most likely security concern?
CompTIA CySA+ — Network Traffic Analysis
4. An analyst runs tcpdump and opens the resulting .pcap file in Wireshark. She wants to isolate only DNS traffic. Which Wireshark display filter should she apply?
CompTIA Security+ — Network Protocols
5. In a Wireshark capture, a student observes three consecutive packets between the same two hosts with TCP flags SYN, then SYN-ACK, then ACK. What does this sequence represent?
CompTIA CySA+ — Network Traffic Analysis
6. A system administrator wants to capture all traffic on interface ens33 for analysis and save it to a file named lab.pcap. Which tcpdump command is correct?
ISC2 CC — Security Governance / Legal and Regulatory Issues
7. Which of the following best describes why packet capture requires written authorization before use on a network you do not personally own?
CompTIA Security+ — Network Configuration
8. A student configures a static IP address on a VM but after rebooting the address is gone and the VM has returned to DHCP. What is the most likely cause?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.