Essential Linux Server Networking Debugging Quiz

Quickly identify and resolve common Linux networking issues by following clear troubleshooting steps, from checking running services to examining firewall rules. Ideal for anyone seeking to confidently diagnose unreachable services on Linux servers.

  1. Identifying the Issue Source

    What is the very first step before beginning network troubleshooting on a Linux server when a service is unreachable?

    1. Ping an external IP address
    2. Open all firewall ports
    3. Restart the server immediately
    4. Check that the service or process is running

    Explanation: It is important to confirm the service or process is running first, as there is no point in debugging the network if the workload itself is down. Restarting the server is unnecessary at this stage, opening all firewall ports can be risky and unrelated, and pinging an external IP is irrelevant if the service itself is not running.

  2. Testing Local Access

    If you cannot access your service on localhost from the server itself, what is the most likely cause?

    1. Firewall is blocking external traffic
    2. Application is not correctly running or bound
    3. DNS misconfiguration
    4. Network interface is down

    Explanation: Failure to connect to the service locally suggests it's not running or configured incorrectly. A down network interface, DNS issues, or firewall rules would not stop local access using localhost.

  3. Understanding Bind Addresses

    A web service runs on a Linux server but is only listening on 127.0.0.1. What is the result?

    1. External clients can connect without issues
    2. The service is unavailable even to the server
    3. All traffic is allowed through the firewall
    4. The service is only accessible from the local machine

    Explanation: Binding to 127.0.0.1 means the service is accessible only from the local machine. External clients cannot connect; the firewall and total unavailability options are unrelated to bind address settings.

  4. Checking Network Interfaces

    Which command shows the status and IP addresses of network interfaces on a Linux server?

    1. ip addr show
    2. dig example.com
    3. systemctl status
    4. ping 8.8.8.8

    Explanation: 'ip addr show' displays network interface status and their assigned IP addresses. 'ping' is for connectivity checks, 'dig' queries DNS, and 'systemctl status' checks service states.

  5. Restoring a Down Interface

    If your main network interface is down and has no IP, what command can you use to bring it up?

    1. sudo ip link set <interface> up
    2. sudo ufw allow 80/tcp
    3. nslookup example.com
    4. curl localhost:

    Explanation: 'sudo ip link set <interface> up' activates a network interface. 'ufw allow' manages firewalls, 'nslookup' queries DNS records, and 'curl' checks web service response but does not alter interface status.

  6. Routing Table Inspection

    Which command helps you identify the default network route used by a Linux server?

    1. cat /etc/resolv.conf
    2. ip route
    3. docker ps
    4. ss -tulpn

    Explanation: 'ip route' shows the system's routing table and the default network path. 'ss -tulpn' lists listening ports, 'cat /etc/resolv.conf' shows DNS configuration, and 'docker ps' lists Docker containers.

  7. Diagnosing Internet Connectivity

    If 'ping 8.8.8.8' fails from your server, what type of problem is most likely?

    1. Application misconfiguration
    2. Local network interface or routing issue
    3. Service not running
    4. Incorrect DNS server

    Explanation: A failure to reach 8.8.8.8, a public DNS server, indicates a network interface or routing issue. Application misconfiguration or a stopped service wouldn't affect low-level connectivity, and DNS is not involved with ping to an IP.

  8. DNS Resolution Troubleshooting

    Which command can you use to verify the IP address a hostname resolves to on your server?

    1. systemctl restart
    2. ufw status
    3. dig example.com
    4. ping 8.8.8.8

    Explanation: 'dig example.com' returns the resolved IP for a hostname. 'ping 8.8.8.8' checks network connectivity. 'ufw status' views firewall rules, and 'systemctl restart' restarts system services.

  9. Inspecting DNS Configuration

    How can you check which DNS servers your Linux system is currently using?

    1. ss -tulpn
    2. ip link show
    3. cat /etc/resolv.conf
    4. ufw status

    Explanation: 'cat /etc/resolv.conf' displays the current DNS servers. 'ss -tulpn' shows listening ports, 'ip link show' reveals interface states, and 'ufw status' checks firewall rules.

  10. Firewall Rule Verification

    Which command helps you check if a service port is allowed through the firewall on a Linux server using UFW?

    1. sudo ufw status
    2. dig @8.8.8.8 example.com
    3. ip route
    4. ps aux | grep

    Explanation: 'sudo ufw status' reveals which ports are allowed or blocked by the firewall. 'dig' checks DNS records, 'ps aux | grep' searches processes, and 'ip route' displays routing tables.