Linux Networking

This note serves as a link to connect Linux Networking related notes.

Get started on the topic by checking one of these out:

  • How to make a Linux Host act as a RouterHow to make a Linux Host act as a Router
    Let's say we have 3 hosts (A, B and C), and two networks ( and

    Host A is connected to network via interface eth0 and has IP
    Host C is connected...

Some of the useful networking commands:

# list and modify interfaces on the host
ip link 

# see the ip addresses assigned to interfaces
ip addr

# used to set ip addresses on the interfaces (changes valid until reboot)
ip addr add dev eth0

# see the routing table - these two are aliases
ip route

# add entries to the routing table
ip route add via

# check if interface packet forwarding is enabled on a host
cat /proc/sys/net/ipv4/ip_forward


netstat -tulpn
netstat -tulpna # show all connections - useful to see number

Status: #🗺️