Back to course

Network Configuration in Linux

Cyber Security Mastery: From Zero to Hero

Checking and Setting Network Parameters

Managing network interfaces is vital for a hacker. You need to verify your IP address, ensure connectivity, and sometimes change your MAC address or configure tunnels.

Essential Network Commands

CommandDescriptionModern Alternative
ifconfigDisplays/configures network interfaces. (Older)ip a (IP Address)
routeViews/modifies the routing table. (Older)ip r (IP Route)
pingTests connectivity to another host.
tracerouteShows the path (hops) packets take to reach a destination.
netstatDisplays active network connections, routing tables, and interface statistics. (Often replaced by ss or ip utilities)

Example: Checking IP Address on Kali

bash

Use 'ip a' (ip address)

ip a

This output will show interfaces (like eth0 or wlan0) and their assigned IP addresses, confirming if your VM has correctly obtained an IP from the virtual network.