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.
Missions in this track
IP address, ping, DNS, apne open ports aur curl.
-
1
Your IP
Show your network interfaces and
submityour IP address oneth0.Show the command
ip a10.x, 172.16-31.x and 192.168.x are private (local network) addresses.
-
2
Known hosts
Read
/etc/hoststo see the lab machines.Show the command
cat /etc/hostsThis file is checked before DNS. Malware sometimes edits it to redirect sites.
-
3
Is it up?
Send 3 pings to
target.lab.Show the command
ping -c 3 target.labNo reply does not always mean down — firewalls often block ping.
-
4
DNS lookup
Look up the DNS records of
files.labwithdigornslookup.Show the command
dig files.labDNS turns names into IP addresses; dig shows exactly what the DNS server answered.
-
5
Your open ports
List the ports your machine listens on. Which port does nginx use?
submitit.Show the command
ss -tulpnEvery open port is a door. Close what you do not need.
-
6
Fetch a web page
Download the home page of your own web server,
http://localhost/, withcurl.Show the command
curl http://localhost/curl is how admins test websites and APIs from a server.