Skip to main content
alaxkar
Staff
Staff
April 2, 2025

Technical Tip: How to add static IP address in Rocky Linux

  • April 2, 2025
  • 0 replies
  • 2232 views
Description This article describes how to proceed with the static IP setup. Before the installation of a FortiSIEM system on a virtual machine (VM) or physical server, it is essential to configure a static IP address on Rocky Linux or CentOS system. This configuration ensures reliable network connectivity and allows the FortiSIEM to function properly within the infrastructure.
Scope FortiSIEM.
Solution

To set up the static IP address in VM or physical server, follow the below guide.

Rocky Linux: The network-scripts file is deprecated in RHEL 8+. It is necessary to use the nmcli or nmtui command.

 

Step 1: Before starting with IP configuration, identify the network device name from the below command.

 

nmcli d

 

nmcli.png


The device name will be in the first column, which is currently eth0.

 

Step 2: For the configuration to set up a static IP address for a network device, use the below commands:

 

nmcli con mod [connection_name] ipv4.method manual ipv4.address [IP]/[prefix] ipv4.gateway [gateway] ipv4.dns [DNS1,DNS2] connection.autoconnect yes

 

Example: nmcli con mod eth0 ipv4.method manual ipv4.address 10.132.252.61/24 ipv4.gateway 10.132.252.1 ipv4.dns 8.8.8.8,8.8.4.4 connection.autoconnect yes.

 

ip-setup.jpg

 


Replace the connection details in the command with the desired values. The command does not produce an output.

 

Step 3: To restart the network manager service, use the below command:

 

sudo systemctl restart NetworkManager


Restart applies the configuration changes.

 

Step 4: To check the static IP setup, use the below command:

 

ifconfig

 

This is a process to set up a static IP address. 

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!