Building a stable local network is one of the first technical steps for any startup working in a shared space or office. Linux, with its flexibility and low overhead, is a powerful choice for managing your network infrastructure — whether you’re running a few laptops or creating a developer-friendly lab.

Why Linux for Networking?

Linux distributions like Ubuntu, Debian, and CentOS come with robust networking tools built in. They offer powerful command-line utilities, fine-grained firewall control, and customizable routing and DHCP options — all for free.

Step 1: Assign Static IP Addresses

Start by giving each device on your network a static IP address to ensure consistency.

  1. Open the network configuration file. For example, on Ubuntu:

    sudo nano /etc/netplan/01-netcfg.yaml
  2. Define your static IP settings:

    network: version: 2 ethernets: eth0: dhcp4: no addresses: - 192.168.1.10/24 gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8, 8.8.4.4]
  3. Apply the configuration:

    sudo netplan apply

Repeat this for each Linux machine you want on the network, using different IP addresses (e.g., .11, .12, etc.).

Step 2: Set Up a DHCP Server (Optional)

If you prefer automatic IP assignments:

  1. Install a DHCP server:

    sudo apt install isc-dhcp-server
  2. Configure /etc/dhcp/dhcpd.conf:

    subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100 192.168.1.200; option routers 192.168.1.1; option domain-name-servers 8.8.8.8, 8.8.4.4; }
  3. Edit /etc/default/isc-dhcp-server to bind to the correct interface:

    INTERFACESv4="eth0"
  4. Start the service:

    sudo systemctl start isc-dhcp-server

Step 3: Share Internet Access (if needed)

To give networked machines access to the internet through one Linux host:

  1. Enable IP forwarding:

    echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf sudo sysctl -p
  2. Set up NAT using iptables:

    sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
  3. Save iptables rules:

    sudo apt install iptables-persistent sudo netfilter-persistent save

Replace wlan0 and eth0 with your actual interface names.

Step 4: Test Connectivity

From any client machine, try pinging the gateway and an external address:

ping 192.168.1.1 ping google.com

Final Thoughts

Linux makes it possible to build scalable, secure networks using hardware you already own. This setup gives your startup full control over its internal infrastructure, reduces costs, and opens the door to more advanced setups — like VPNs, firewalls, and internal DNS — all using open-source tools.