• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Short Guides for IT Professionals

MENUMENU
  • HOME
  • ALL TOPICS
    • Active Directory
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Virtualization
    • Web
    • Tools
  • ABOUT
  • SUBSCRIBE
Home » How to Configure Static IP on Debian 10

How to Configure Static IP on Debian 10

April 15, 2022 - by Zsolt Agoston - last edited on April 15, 2022

1. Open the /etc/network/interfaces file in an editor, like vim or nano.

How to Configure Static IP on Debian 10

2. Change the IP configuration on the interface you connected to your network. In this example below the interface is called eth0. You might have a different name in your system.

Change the type from dhcp to static and the desired IP address with the subnet mask, and the default gateway like shown below.

How to Configure Static IP on Debian 10
#/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
    address 10.0.255.1
    netmask 255.255.255.0
    gateway 10.0.255.254

3. Lastly either reboot the server or run these commands to activate the new configuration:

systemctl restart networking
ifup eth0
How to Configure Static IP on Debian 10

Reader Interactions

Community Questions Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tools

Secondary Sidebar

  • Terms of Use
  • Disclaimer
  • Privacy Policy