UnixDroid

Intermediate · 6 missions

Networking basics — Linux terminal practice

Your IP address, ping, DNS lookups, your own open ports and fetching a web page with curl.

student@unixdroid: ~

Missions in this track

IP address, ping, DNS, apne open ports aur curl.

  1. 1

    Your IP

    Show your network interfaces and submit your IP address on eth0.

    Show the command
    ip a

    10.x, 172.16-31.x and 192.168.x are private (local network) addresses.

  2. 2

    Known hosts

    Read /etc/hosts to see the lab machines.

    Show the command
    cat /etc/hosts

    This file is checked before DNS. Malware sometimes edits it to redirect sites.

  3. 3

    Is it up?

    Send 3 pings to target.lab.

    Show the command
    ping -c 3 target.lab

    No reply does not always mean down — firewalls often block ping.

  4. 4

    DNS lookup

    Look up the DNS records of files.lab with dig or nslookup.

    Show the command
    dig files.lab

    DNS turns names into IP addresses; dig shows exactly what the DNS server answered.

  5. 5

    Your open ports

    List the ports your machine listens on. Which port does nginx use? submit it.

    Show the command
    ss -tulpn

    Every open port is a door. Close what you do not need.

  6. 6

    Fetch a web page

    Download the home page of your own web server, http://localhost/, with curl.

    Show the command
    curl http://localhost/

    curl is how admins test websites and APIs from a server.