Skip to content

ifconfig

Ifconfig

Examine and interact with active network interfaces.

[!example] IfconfigExample_visual.png

This displays the most important information: 1. [MAC Address] 2. IP 3. Broadcast 4. Loopback

If you want to see the IP, you have to run ip addr.

[!tip] IpAddr_visual.png

  • Enables you to connect and manipulate LAN
  • You can easily switch your IP with:
    • sudo ifconfig eth0 new_ip
    • You can also change the subnet mask and broadcast
    • Example of IP spoofing: > [!example] > kali > ifconfig eth0 192.168.181.115 netmask 255.255.0.0 broadcast 192.168.1.255

Useful Flags

  • Down
    • Marks an interface as not working (down), which prevents the system from trying to transmit messages through that interface.
      • If possible, the ifconfig command also resets the interface to disable reception of messages.
      • Routes that use the interface, however, are not automatically disabled.

iwconfig Spoofing