Network (Buster)

From Hexwiki
Jump to: navigation, search

Fairly universal for Debian-derived systems. Little has changed.


# Friendly local loopback.
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eno1 
# IPv4
iface eno1 inet4 static
       dns-nameservers ::1
       dns-search invalid
       # Firewall script.
       pre-up /root/
       up /bin/ip addr add dev eno1 label eno1:0
       down /bin/ip addr del dev eno1 label eno1:0 
       # ...
# IPv6!
iface eno1 inet6 static
       address 2001:db8:0:4ee4::2/64
       gateway 2001:db8:0:4ee4::1
       dns-nameservers ::1
       dns-search invalid
       pre-up /root/
       # If you want, pick something that isn't going to get random-scanned for your ssh ip.
       up /bin/ip -6 addr add dev eth0 2001:db8:0:4ee4:62e1:2091:be42:f322/64
       down /bin/ip -6 addr del dev eth0 2001:db8:0:4ee4:62e1:2091:ve42:f322/64
       # ...