SOCKS4 vs SOCKS5: Differences from a Cybersecurity Perspective
An in-depth comparison of SOCKS4 and SOCKS5 proxies, highlighting their features, differences, and implications for cybersecurity.
Dec 7, 2025Networking
ifconfig Tool: A Classic Network Utility for LinuxDespite the rise of modern tools like ip from the iproute2 package, the ifconfig command remains a staple in many system administrators' toolkits. For decades, it has served as a reliable way to view and configure network interfaces on Unix-based systems.
While ifconfig is considered deprecated on some Linux distributions, it still proves invaluable—especially in minimal environments, embedded systems, or when working on older machines. Whether you're locking down a system (blue team) or trying to blend in on a network (red team), understanding ifconfig is essential.
ifconfig?ifconfig stands for interface configuration. It allows users to view, assign, and manage IP addresses, enable or disable interfaces, and troubleshoot connectivity. It is part of the net-tools package, which must often be installed manually on modern systems.
ifconfigifconfig on Modern Linux# Debian/Ubuntu
sudo apt install net-tools
# CentOS/RHEL
sudo yum install net-toolsifconfig [interface] [options]If run without arguments, ifconfig will show details for all active interfaces.
ifconfigThis shows a list of currently active interfaces and their configuration: IP address, MAC address, broadcast address, MTU, and traffic statistics.
Useful for:
ifconfig eth0This command shows details for a single interface—useful for zeroing in on one adapter when troubleshooting.
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0 upThis command manually sets an IP address and netmask, and brings the interface up.
sudo ifconfig eth0 down
sudo ifconfig eth0 upThese commands disable and enable a network interface, respectively.
sudo ifconfig eth0 hw ether 00:11:22:33:44:55This sets a new hardware (MAC) address. Some systems may require bringing the interface down before applying the change.
sudo ifconfig eth0 0.0.0.0This clears the current IP address on the interface. Useful in DHCP-based environments before requesting a new IP.
ifconfig eth0At the bottom of the output, you'll see RX and TX packet counts, errors, dropped packets, etc. This can help determine faulty cables, switches, or network attacks.
A system admin notices intermittent connectivity on eth0. Running:
ifconfig eth0They see increasing RX errors, suggesting a duplex mismatch or cable issue. Replacing the cable and resetting the switch port solves the problem.
An attacker in a restricted VLAN plugs into a port but gets no DHCP lease. By assigning a static IP and spoofing the MAC address:
sudo ifconfig eth0 192.168.1.44 netmask 255.255.255.0 up
sudo ifconfig eth0 hw ether 00:1A:2B:3C:4D:5EThey mimic a known device and gain access.
While powerful, ifconfig is no longer maintained and lacks features like advanced routing, bridge and VLAN management, and IPv6 support.
Many modern distros prefer:
ip addr show
ip link set dev eth0 upStill, in constrained or legacy environments, ifconfig might be the only available tool.
ifconfig usage is logged via bash history or audit logs.sudo access to prevent unauthorized interface changes.ifconfig CheatsheetCommand-line network interface tool From the
net-toolspackage — useful in Linux and Unix environments.
| Command | Description |
|---|---|
ifconfig | Show all active interfaces |
ifconfig -a | Show all interfaces (active/inactive) |
ifconfig eth0 | Show details for interface eth0 |
| Command | Description |
|---|---|
sudo ifconfig eth0 192.168.1.100 | Set IP address |
sudo ifconfig eth0 netmask 255.255.255.0 | Set subnet mask |
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0 | Set both at once |
| Command | Description |
|---|---|
sudo ifconfig eth0 up | Enable interface |
sudo ifconfig eth0 down | Disable interface |
Use responsibly (often requires
downstate before changing)
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 00:11:22:33:44:55
sudo ifconfig eth0 upsudo ifconfig eth0 0.0.0.0Use this before requesting a new DHCP lease or resetting config.
ifconfig eth0Look for:
sudo ifconfig eth0 promiscListen to all network traffic — useful for packet analysis.
sudo ifconfig eth0 -promiscsudo ifconfig eth0:0 192.168.1.101 upCreate a virtual interface (eth0:0) with a different IP.
ifconfig + MAC spoofing to bypass NAC systems or blend in.ifconfig might be the only network tool available.While modern networking has moved on to tools like ip, ifconfig remains a relevant and useful tool for managing interfaces and understanding network conditions at a glance. Whether you're defending a network or testing one, knowing how to use ifconfig effectively is a must-have skill in your Linux toolkit.
Love it? Share this article: