diff --git a/docs/tech_docs/linux/network.md b/docs/tech_docs/linux/linux_networking.md similarity index 73% rename from docs/tech_docs/linux/network.md rename to docs/tech_docs/linux/linux_networking.md index b08c6c2..8ae15bb 100644 --- a/docs/tech_docs/linux/network.md +++ b/docs/tech_docs/linux/linux_networking.md @@ -122,4 +122,83 @@ Both `Snort` and `Suricata` are open-source Network Intrusion Detection Systems ### `iperf`/`iperf3`: Network Performance Measurement Already mentioned, but worth reiterating for its value in measuring network bandwidth and performance. -These tools, when combined, offer a comprehensive suite for network monitoring, security analysis, performance testing, and troubleshooting. Each tool has its unique strengths and use cases, making them invaluable resources for network administrators, security professionals, and IT specialists aiming to maintain robust, secure, and efficient network infrastructures. \ No newline at end of file +These tools, when combined, offer a comprehensive suite for network monitoring, security analysis, performance testing, and troubleshooting. Each tool has its unique strengths and use cases, making them invaluable resources for network administrators, security professionals, and IT specialists aiming to maintain robust, secure, and efficient network infrastructures. + +--- + +Creating a refined guide on managing and understanding Linux networking involves focusing on key concepts and practical tools. Let's organize this into a coherent structure that builds from basic to advanced topics, ensuring a solid foundation in Linux networking. + +### Introduction to Linux Networking + +**1. Understanding Network Interfaces** +- **Overview**: Linux treats network interfaces as special files. These can represent physical interfaces (e.g., Ethernet, Wi-Fi) or virtual interfaces (e.g., loopback, virtual bridges). +- **Tools**: `ip link show`, `ifconfig` (deprecated in favor of `ip`). + +**2. Configuring IP Addresses** +- **Overview**: Assigning IP addresses to interfaces is crucial for network communication. +- **Tools**: `ip addr add`, `ip addr show`; Edit `/etc/network/interfaces` or use Network Manager for persistent configuration. + +**3. Examining Routing Tables** +- **Overview**: Routing tables determine where your computer sends packets based on the destination IP address. +- **Tools**: `ip route show`, `route` (deprecated). + +### Advanced Networking Concepts + +**1. Network Traffic Control with `iptables`** +- **Overview**: `iptables` allows you to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. +- **Application**: Filtering traffic, NAT, port forwarding. + +**2. DNS and DHCP Configuration** +- **DNS Overview**: Translates domain names to IP addresses. Configurable in `/etc/resolv.conf` or through Network Manager. +- **DHCP Overview**: Automatically assigns IP addresses to devices on a network. Managed through the DHCP client configuration or Network Manager. + +**3. Understanding and Using Network Namespaces** +- **Overview**: Network namespaces isolate network environments, allowing you to simulate complex networks on a single host or manage container networking. +- **Tools**: `ip netns add`, `ip netns exec`. + +### Network Performance and Diagnostics + +**1. Monitoring Network Traffic** +- **Tools**: + - `nmap` for network exploration and security auditing. + - `tcpdump` for traffic dump. + - `wireshark` for GUI-based packet analysis. + +**2. Diagnosing Network Issues** +- **Tools**: + - `ping` for reachability. + - `traceroute` or `mtr` for path analysis. + - `ss` or `netstat` for socket statistics. + +**3. Configuring Jumbo Frames for Performance** +- **Overview**: Jumbo frames can improve network performance by allowing more data to be sent in each packet, reducing overhead. +- **Configuration**: `ip link set dev mtu `; Ensure all network devices along the path support the configured MTU size. + +### Security and Firewall Management + +**1. Configuring Firewalls with `ufw` or `firewalld`** +- **Overview**: Simplifies the process of managing `iptables` through user-friendly commands or GUIs. +- **Usage**: Enabling/disabling firewall, setting up rules for allowed/blocked traffic. + +**2. SSH for Secure Remote Access** +- **Overview**: SSH provides a secure channel over an unsecured network in a client-server architecture. +- **Tools**: `ssh` for remote access, `scp` for secure file transfer. + +### Networking in Virtualization and Containers + +**1. Virtual Network Interfaces** +- **Overview**: Interfaces like `virbr0` (used by KVM/QEMU) or `docker0` facilitate networking for virtual machines and containers. +- **Configuration**: Managed through virtualization/container management tools and can be inspected or modified with `ip`. + +**2. Advanced Routing and Network Namespaces for Containers** +- **Overview**: Containers and VMs can have isolated network stacks, allowing for complex networking setups on a single host. +- **Tools**: `docker network` commands, custom bridge interfaces, and `ip netns`. + +### Practical Exercises and Exploration + +- **Exercise 1**: Configure a static IP and set up a simple home server. +- **Exercise 2**: Use `iptables` to create a basic firewall setup that blocks an IP range but allows certain ports. +- **Exercise 3**: Set up a VPN client at the system level and understand the routing changes it makes. +- **Exercise 4**: Create a network namespace, add a virtual interface, and configure routing between the namespace and your main network. + +By working through these topics systematically, you'll gain a strong foundation in Linux networking, from basic configurations to advanced network management and diagnostics. This structured approach ensures you have the knowledge and skills to effectively manage and troubleshoot network-related aspects of Linux systems. \ No newline at end of file