Linux networking tools
Introduction
Linux provides a wide range of networking tools that can be used to manage and troubleshoot network connections. These tools are essential for system administrators and network engineers to monitor and configure network interfaces, troubleshoot connectivity issues, and analyze network traffic. In this chapter, we will explore some of the most commonly used networking tools in Linux and how they can be used to manage network connections effectively.
Common Networking Tools
1. ifconfig - Interface Configuration
2. ip - IP Configuration
# Display information about all network interfaces
ip addr show
# Display information about a specific network interface
ip addr show eth0
# Bring up a network interface
ip link set eth0 up
# Bring down a network interface
ip link set eth0 down
3. netstat - Network Statistics
4. ss - Socket Statistics
5. ping - Packet Internet Groper
# Send ICMP echo requests to a specific host
ping google.com
6. traceroute - Trace Route
# Display the route packets take to a specific host
traceroute google.com
7. tcpdump - TCP Packet Analyzer
9. nmap - Network Mapper
10. iptables - IP Tables Firewall
# Display the current firewall rules
iptables -L
# Allow incoming traffic on a specific port
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
11. nc - Netcat
# Listen for incoming connections on a specific port
nc -l 1234