Manual Internet Configuration on Debian Using Only ip
and Low-Level Tools
This guide explains how to manually configure an internet connection on a Debian-based system using only low-level tools — perfect for headless setups, stripped systems, or recovery environments where NetworkManager or higher-level tools aren’t available.
1. Identify Your Network Interface
ip link show
Look for a device that resembles a wired Ethernet interface — often named something like eth0
, enpXsY
, or enx...
.
2. Bring the Interface Up
ip link set dev enp4s0 up
Replace enp4s0
with your actual interface name.
3. Assign a Static IP Address
Let’s assume we want:
- IP:
192.168.1.100
- Gateway:
192.168.1.1
- Subnet:
255.255.255.0
or CIDR/24
ip addr add 192.168.1.100/24 dev enp4s0
4. Set the Default Gateway
ip route add default via 192.168.1.1
5. Add DNS Servers
echo 'nameserver 192.168.1.9' > /etc/resolv.conf
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
6. Test Connectivity
ping -c 3 8.8.8.8
ping -c 3 debian.org
Optional: Reset/Undo
ip addr flush dev enp4s0
ip route flush dev enp4s0
7. Making the Configuration Persistent with /etc/network/interfaces
If your system uses the classic ifupdown
stack (most minimal or older Debian installs do), you can make your settings permanent by editing /etc/network/interfaces
like this:
auto enp4s0
iface enp4s0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.9 8.8.8.8
Then bring it up with:
ifdown enp4s0 || true
ifup enp4s0
This will restore the configuration automatically on every reboot without needing to manually use ip
commands again.
Done!
You’ve now gone from a bare interface to a working network connection using only the most essential tools — and optionally made it permanent the Debian way.
Triple "5" Farms – Networking the hard way, because that’s the fun way.