Member-only story

Setting a Permanent Static IP Address in CentOS-Based Systems

GABRIEL OKOM
3 min readOct 20, 2023

--

How to Set a Static IP Address for your VM or Server

I have been able to set-up lots of personal home labs/VMs for myself when trying out things on ansible, kubernetes etc. One thing I keep battling with is constantly having to edit my /etc/hostsfile because my IP address constantly changes whenever I reboot or change my network. If you are like me or you simply just want to have a permanent IP Address for your server, nodes or VM, here are the steps to set up a static IP address in CentOS-based systems.

Objectives:

  • Configure a static IP address in a CentOS-based system.
  • Make the IP address configuration permanent.
  • Understand the network configuration files and their role.

Prerequisites:

  • A CentOS-based system (e.g., CentOS 8 or later).
  • Administrative (sudo) privileges.
  • Basic knowledge of your network configuration, including the desired IP address, subnet mask, and gateway IP.

Step-by-Step Guide:

  1. Identify Your Network Interface Name:

To configure a static IP address, you need to identify the name of your network interface. You can do this by using the ip command…

--

--

GABRIEL OKOM
GABRIEL OKOM

Written by GABRIEL OKOM

MSc Cyber Security and Computer Forensics | Certified DevOps Engineer

No responses yet