Linux - Debian 12 Network Settings
How-To: Linux Networking
Monday 20th October 2025
Disable Network Manager and enable ifupdown
If Debian was installed with a graphical interface, Network Manager is usually enabled. That is not ideal if you are using it as a server.
If you have Network manager active, this is how to disable it and rely on ifupdown instead:
Disable Network Manager
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManagerEnable ifupdown
ifupdown (systemctl status networking) should be activated by default. If not, here is how to activate it:
sudo systemctl start networking
sudo systemctl enable networkingThen you just have to edit the /etc/network/interface file with your desired settings. Example:
auto ens19
iface ens19 inet6 static
address 2001:db8:1234:10::1101/64
gateway 2001:db8:1234:10::1
iface ens19 inet6 static
address fe80::1101:1/64
iface ens19 inet static
address 10.1.254.11/24
gateway 10.1.254.1Then restart the networking service and verify:
$ sudo systemctl restart networking
$ ip address show ens19
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9198 qdisc fq_codel state UP group default qlen 1000
link/ether bc:24:11:9b:db:c7 brd ff:ff:ff:ff:ff:ff
altname enp0s19
inet 10.1.254.11/24 brd 10.1.254.255 scope global ens19
valid_lft forever preferred_lft forever
inet6 2001:db8:1234:10::1101/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::1101:1/64 scope link
valid_lft forever preferred_lft foreverNote: To create VRF and OOBM interfaces, read this post:
https://opensourceisfun.substack.com/p/debian-12-creating-a-management-interface
Enable DNS
Interface-specific DNS
In Debian you can configure DNS either by specifying dns-nameservers under a specific interface…
$ sudo nano /etc/network/interface
auto ens19
iface ens19 inet6 static
address 2001:db8:1234:10::1101/64
gateway 2001:db8:1234:10::1
dns-nameservers 2620:0:ccc::2 2620:0:ccd::2Global DNS
… Or globally by modifying /etc/resolv.conf:
$ sudo nano /etc/resolv.conf
search int.libertassolutions.io
nameserver 2620:0:ccc::2
nameserver 2620:0:ccd::2Verify:
$ nslookup example.com
Server: 2620:0:ccc::2
Address: 2620:0:ccc::2#53
Non-authoritative answer:
...Appendix
Install the ifconfig utility
There is nothing wrong with using the built in “ip address” commands that’s part of the iproute2 package. In fact that is the more maintaned version and is recommended for configuration.
For verifying configuraiton on links though, I think the output of “ifconfig” is better formatted. However, that tool is not included in Debian 12 but can be installed:
$ sudo apt install net-toolsEven after you install it, “ifconfig” won’t be recognized, unless you do “sudo ifconfig”. The reason for that is because /sbin is not included in the PATH variable for regular users and therefore needs to be added:
echo 'export PATH="$PATH:/sbin"' >> ~/.profileThen logout and log back in again:
$ ifconfig ens19
ens19: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9198
inet 10.1.254.11 netmask 255.255.255.0 broadcast 10.1.254.255
inet6 fe80::1101:1 prefixlen 64 scopeid 0x20<link>
inet6 fe80::be24:11ff:fe9b:dbc7 prefixlen 64 scopeid 0x20<link>
inet6 2001:db8:1234:10::1101 prefixlen 64 scopeid 0x0<global>
ether bc:24:11:9b:db:c7 txqueuelen 1000 (Ethernet)
RX packets 377 bytes 17526 (17.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 82 bytes 8725 (8.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

