- Awards Season
- Big Stories
- Pop Culture
- Video Games
- Celebrities

The Benefits of Tracking an IP Address Location
In today’s digital age, tracking an IP address location has become an important tool for businesses and individuals alike. An IP address is a unique numerical identifier assigned to each device connected to the internet. By tracking an IP address location, businesses can gain valuable insights into their customers’ online behavior and preferences. Individuals can also use this information to protect their online privacy and security. Here are some of the key benefits of tracking an IP address location:
Enhanced Security
One of the main benefits of tracking an IP address location is enhanced security. By knowing where a device is located, businesses can better protect their networks from malicious activity. Additionally, individuals can use this information to identify suspicious activity on their own devices or networks. This can help them take steps to protect their data and privacy from potential threats.
Better Targeting of Ads and Content
Another benefit of tracking an IP address location is that it allows businesses to better target ads and content to their customers. By knowing where a customer is located, businesses can tailor their marketing messages to be more relevant to that customer’s needs and interests. This helps them increase engagement with potential customers and boost sales.
Improved Customer Insights
Finally, tracking an IP address location can provide businesses with valuable insights into their customers’ behavior and preferences. By analyzing the data collected from IP addresses, businesses can gain a better understanding of who their customers are and what they are looking for in terms of products or services. This helps them tailor their offerings accordingly and improve customer satisfaction levels.
Overall, tracking an IP address location provides numerous benefits for both businesses and individuals alike. From enhanced security to improved customer insights, this tool can help organizations better understand their customers’ needs and preferences in order to provide more targeted content and services.
This text was generated using a large language model, and select text has been reviewed and moderated for purposes such as readability.
MORE FROM ASK.COM

- TechRepublic
Account Information

How to configure a static IP address in CentOS 7
Share with Your Friends
Your email has been sent
This short tutorial walks you through the process of changing a CentOS ethernet interface from DHCP to static--but be prepared to type.
You may have set up a CentOS server and, in the process, accidentally set it up with DHCP. If your CentOS server uses a GUI, changing that IP address from dynamic to static is very simple. But what if your server is a text-only machine? What do you do then? Fortunately, it’s not all that hard to configure that GUI-less server with a static IP address–you just have to know where it’s configured and know the syntax of the configuration. Of course, by nature of what we’re working on this is all done manually, so be prepared to type.
I’ll be working on CentOS 7 . I’ll assume you already have the operating system installed and working properly, have access to the machine, and have an administrative account. With that out of the way, let’s set up that static IP address.
Find your interface
The first thing we must do is find out the name of our ethernet interface. A static IP address cannot be configured without this name. To do this, log into your server and issue the command ip a . The output of this command ( Figure A ) will include the name of the interface.

As you can see, from my output, the name of my interface is enp0s3. Now that we know the name of our interface, we can configure the static address.
Configuring the address
Within the directory /etc/sysconfig/network-scripts/ you should find the file ifcfg-INTERFACENAME (Where INTERFACENAME is the name of your interface). In my instance, the file is ifcfg-enp0s3. It is important that you configure that file, and not the ifcfg-eth file. Open the correct file for editing with the command sudo nano /etc/sysconfig/network-scripts/ifcfg-enp0s3 . We need to modify that file in order to not only change the protocol from dhcp to static, but to add the specific IP address. So when you open up that file, you’ll want to change:
BOOTPROTO=dhcp
BOOTPROTO=static
Now you’ll need to add the entries to set not only the IP address, but the netmask, gateway, and DNS addresses. At the bottom of that file, add the following:
IPADDR=192.168.1.200 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=1.0.0.1 DNS2=1.1.1.1 DNS3=8.8.4.4
NOTE: All fields in bold, you will edit to reflect your networking needs. If you have fewer or more DNS entries, add or remove them as needed.
Save and close that file. In order to make the changes take effect, issue the command sudo systemctl restart network. Once the networking system has restarted, issue the command ip a to see that your IP address has changed to reflect your configuration.
And that’s all there is to setting a static IP address on CentOS. That wasn’t so hard, now was it? Don’t think this technique is limited only to GUI-less CentOS servers. You can use the same method to set a static IP address on a CentOS server with a GUI as well.
Enjoy having more control over your CentOS network interfaces.

Subscribe to the Daily Tech Insider Newsletter
Stay up to date on the latest in technology with Daily Tech Insider. We bring you news on industry-leading companies, products, and people, as well as highlighted articles, downloads, and top resources. You’ll receive primers on hot tech topics that will help you stay ahead of the game.
- How to install Kloxo-Mr hosting control panel on CentOS (TechRepublic)
- How to install a GUI on top of CentOS 7 (TechRepublic)
- How to install cPanel/WHM on CentOS 7 (TechRepublic)
- How to use the nmcli command to gather network device information on Linux (TechRepublic)
- Learn how to run Linux on Microsoft's Azure cloud (ZDNet)
- See all of Jack's content
- Open source
Editor's Picks

TechRepublic Premium Editorial Calendar: Policies, Checklists, Hiring Kits and Research for Download
TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.

Microsoft’s First Generative AI Certificate Is Available for Free
Microsoft is also running a grant competition for ideas on using AI training in community building.

How Generative AI is a Game Changer for Cloud Security
Generative AI will be a game changer in cloud security, especially in common pain points like preventing threats, reducing toil from repetitive tasks, and bridging the cybersecurity talent gap.

The 8 Best International Payroll Services for 2023
Does your business need a payroll provider that offers international payroll services? Use our buyer's guide to review the best solutions, from ADP to Oyster.

ChatGPT Cheat Sheet: Complete Guide for 2023
Get up and running with ChatGPT with this comprehensive cheat sheet. Learn everything from how to sign up for free to enterprise use cases, and start using ChatGPT quickly and effectively.

6 Best monday.com Competitors and Alternatives for 2023
Looking for an alternative to monday.com? Our comprehensive list covers the best monday alternatives, their key features, pricing, pros, cons and more.
Home Office Deduction Guide and Checklist
There are rules about what qualifies as a home office, what qualifies as a deductible expense and what method should be used to calculate the deduction assuming those rules and qualifications are met. This guide, and the accompanying checklist, from TechRepublic Premium will help you navigate the twists and turns of those regulations to arrive ...
Quick Glossary: Malware
Malware is an insidious infection that will steal productivity from your enterprise and potentially wreak havoc on your network. To prevent and counteract malware, it’s important to know the terminology surrounding it. This list of terms from TechRepublic Premium will help you grasp the vocabulary that describes malware and the technology that spawns it. From ...
Internet of Things Policy
The Internet of Things continues making inroads in the business world, so organizations should have a defined IoT structure in place to ensure that data and operations are properly secured. This policy from TechRepublic Premium provides guidelines for the procurement, usage and administration of IoT devices, whether company provided or employee-owned. From the policy: Since ...
- TechRepublic on Twitter
- TechRepublic on Facebook
- TechRepublic on LinkedIn
- TechRepublic on Flipboard
- Privacy Policy
- Terms of Use
- Property of TechnologyAdvice

How To Configure Static IP Address in CentOS 7 / RHEL 7

Setting up the network and bringing servers into the network is the primary administration task for any system administrator.
In some cases, these tasks are automated using DHCP (Dynamic Network Configuration Protocol) which takes care of assigning IP Address to Desktop/Servers.
READ: How To configure DHCP server on CentOS 7, Ubuntu 18.04 & Debian 9
But, if you go to the bigger organizations, they use static (manual) IP to avoid network issues due non-availability of DHCP servers.

Configure Static IP Address in CentOS 7 / RHEL 7
Let us configure our system for the following information.
IP Address: 192.168.1.10 Netmask: 255.255.255.0 Gateway (Router): 192.168.1.1 DNS Server 1: 192.168.1.1 DNS Server 2: 8.8.8.8 Domain Name: itzgeek.local
Find the available network interfaces on your system
You can use any one of the below commands to list down the available network interfaces on the system.
Choose the desired network interface
The output of ifconfig -a may look like below. Here, I wish to change the IP address of enp0s3.
Configure the Static IP Address
In this method, we will edit the network interface file found under /etc/sysconfig/network-scripts/ directory. For interface enp0s3 , the file name would be ifcfg-enp0s3 .
Update the interface file as per the requirement.
You can also use nmtui , a text-based user interface for configuring network interfaces.
Select Edit a connection and press Enter .

Choose the network interface and then Edit .

Set the IP Address and enter OK .

Restart Network
Finally, restart the network service using the following command to have these changes take effect.
Verify Static IP Address
Use ifconfig -a command to verify the static ip address.
Also, verify the DNS server entries.
That’s All. I hope you have learned how to configure a static IP address on CentOS 7 / RHEL 7 .
How To Install Oracle Java JDK 12 / 11 / 8 on Debian 10 / Debian 9
How to Configure Let’s Encrypt SSL in OpenLiteSpeed Web Server
How to Install Oracle Java JDK 18 on Linux
How to Install Oracle Java JDK 17 on Linux
How to Upgrade CentOS 7 to Rocky Linux 8
How To Install PHP 8.0 on CentOS 7 / RHEL 7
How To Install NTP (Chrony) On CentOS 8 / CentOS 7 & RHEL 8 / RHEL 7
How To Install Gradle on CentOS 8 / 7 & RHEL 8 / 7
- CentOS 8 / RHEL 8
- CentOS 7 / RHEL 7
- CentOS 6 / RHEL 6
- LinuxMint 20
- Linux Mint 19
- Linux Mint 18
- Rocky Linux 8
- Ubuntu 22.04
- Ubuntu 20.04
- Ubuntu 18.04
- MySQL / MariaDB
- Other Tools

A Beginner-Friendly Guide for Linux / Start Learning Linux Quickly...
How to configure network static ip address on rhel/centos 8/7.
The scope of this tutorial is to explain how we can edit and make changes to Network Configurations on RHEL/CentOS 8/7 from the command line only, and, more specifically how we can set up a Static IP address on network interfaces using system network-scripts, which is a must be configured to serve Internet-facing network services, and how to configure or change RHEL/CentOS system hostname .

Also will show you, how we can manage or disable unwanted system services, such as Network Manager , which is no longer needed in-case you use a manual static IP configured on network scripts, Avahi-Daemon which is, also, not needed on a server and represents a seriously security gap, unless you installed the server on your Laptop and you want to instantly browse your network for other services, and on the final will present you Network Manager Text User Interface – nmtui , a system utility that can ease the job of editing your system network settings with advanced Interface configurations like creating Bond , Bridge , Team and VLAN Interfaces.
Requirements
- Installation of “CentOS 8.0″ with Screenshots
- Installation of RHEL 8 with Screenshots
- How to Enable RHEL Subscription in RHEL 8
- CentOS 7.0 Minimal System Installation
- RHEL 7.0 Minimal System Installation
- Active RHEL 7.0 Subscriptions and Functional Repositories
Also, be aware that most of the configurations offered by editing system files should not be performed from a remote location using SSH service until you establish a continued and reliable network connection using a fixed IP address.
On this page
- Disable Unwanted Services in CentOS
- Set Static IP Address on CentOS
- Set Hostname in CentOS
- Set Static IP Address on CentOS Using Nmtui Tool
Step 1: Disable Unwanted System Services in CentOS
1. Before actually starting to do anything we need to make sure that our system has some necessary editing and networking tools like netstat , ifconfig , wget , curl , and lsof installed, some of them will not be used on this step but it’s better to have them installed for future configurations.

2. After the tools have installed run ifconfig to get your Network Interfaces settings and status, and, then run netstat or lsof command to check what services are running by default on our server.

3. The netstat command output is pretty self-explanatory and shows a list of sockets associated with their running program name.
If, for example, our system will not be used as a mail service you can stop Postfix master daemon which runs on localhost and, also stop and disable other unwanted services using the following commands – the only service I advise not to stop or disable for now is SSH if you need remote control over the server.
Stop Postfix Service

Stop Avahi Daemon Service

4. You can, also, use old init commands to stop or disable services but since Red Hat now implements systemd process and service management, you should better get used to systemctl commands and use it often.
If you use Arch Linux then it should be a piece of cake to switch to systemd – although all init commands now are linked and pass-through systemd filter.
5. If you want to get a list of all started services run the service command and for an exhaustive report use systemctl .

6. To manage services run the systemctl command using the most important switches: start , stop , restart , reload , disable , enable , show , list-dependencies , is-enabled, etc. followed by your service name.
Also, another important feature that the systemctl command can also run on a remote server through SSH service on a specified host using -H option and perform the same actions as locally.
For example, see the command and screenshot below.

Step 2: Configuring Static IP Address on CentOS
7. Before start editing Network Interface Card system files make sure that from now on and until you set static IP, you have physical or any other type of access to your server, because this step requires bringing down your network interface and connections.
Although it can be done smoothly without disrupting your connectivity and activate connection after reboot . There is no way you can test it before reboot if you only have a single NIC attached. Still, I will present to you with the entire method and indicate the steps needed to be avoided in case you want to maintain your connectivity and test it afterward.
8. Now move to /etc/sysconfig/network-scripts/ path, open and choose your Network Interface you want to assign static IP for editing – to get all NICs names to use ifconfig or IP command as shown.

9. Next, use the following network template to edit the file and make sure that the ONBOOT statement is set on YES , BOOTPROTO is set to static or none and don’t change HWADDR and UUID values provided by default.
Make the following changes as shown.

10. After finishing editing the file, close it, and move to resolv.conf file if you want DNS servers enabled system-wide.
Here just add your DNS servers using nameserver statement.
11. Now Network Interface is configured with a static IP, the only thing remaining is to restart your network or reboot your system and use ifconfig or IP command to view the IP address and test configuration using ping command.
NOTE : After restart use the newly static IP address configured to perform remote login with SSH.

Step 3: Setting Hostname in CentOS
12. To adjust system hostname system-wide, open hostname and hosts file located on /etc path and edit both the following way.
Hostname File
Here you can add just the name of the system but it’s a good idea to append the .dot domain to.
Here add the same hostname as above on the 127.0.0.1 line before the localhost.localdomain statements.

Alternatively, you can set hostname using the hostnamectl command as shown.
13. To test if your hostname is correctly set use hostname command.
Step 4: Set Static IP Address on CentOS Using Nmtui Tool
14. NetworkManager Text User Interface (TUI) tool, nmtui , is an RHEL intuitive tool which provides a text interface to configure networking by controlling Network Manager, which helps to edit advanced network settings such as assign static IP addresses to Network Interfaces, activate or disable a connection, edit WI-FI connections, set your system hostname or create advanced Network interfaces like InfiniBand, bond, bridge, team or VLAN.
NetworkManager-tui is installed by default in RHEL/CentOS 7.0, but if for some reason its missing issue the following command to install it.
14. To start Network Manager Text User Interface run the nmtui command and use TAB or arrow keys to navigate through and press Enter to select an option. If you want to directly edit or connect a specific interface run the following options.

If you want to set static IP you can, also, use Network Manager Text User Interface as a facile alternative to actually edit network interfaces files, with a limited number of options that method has to offer, but make sure Network Manager service is enabled and started on your system.
Previous article:
Next article:
Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.
Related Posts

How to Open, Extract and Create RAR Files in Linux

How to Create and Run New Service Units in Systemd Using Shell Script

How to Install and Configure VNC Server in CentOS and RHEL

How to Migrate CentOS 7 to AlmaLinux 8 Using ELevate Repo

How to Install LAMP Server on RHEL, CentOS, Rocky & AlmaLinux

How to Build NGINX from Sources in RHEL, CentOS, Rocky and AlmaLinux
11 thoughts on “How to Configure Network Static IP Address on RHEL/CentOS 8/7”
After 2 hours tests, Good all be fine, it works fine, just Added : In smb.conf file configuration in [Anonymous]
1- be sure that your server has a static connection 2- added user with password : smbpasswd -a username
Thank For Author I have make a samba configuration in 2 hours
I feel learning with quick manner in this site Thank you very much
I also routinely disable NetworkManager on my servers, but do note that “nmtui” (and also nmcli) are NetworkManager clients, so you cannot use them if you have disabled NetworkManager.
Excellent!. This is the ONLY post on setting static IP on Centos which is correct. Simple flow.
All: Just follow the steps as is.
Great explanation. Great job guys.
Great article. The static IP configuration works great on my RHEL 7 server vm.
Just have a question. The Red Hat documentation says that BOOTPROTO should be set to “none”. My copy of your configuration only works with BOOTPROTO=static as you used in your example. If I set it to none the ip address does not get updated. I am having some discussions with our Linux sys admins since they are insisting that I should follow only the Red Had docs and this is a problem as I can’t make it work with BOOTPROTO=none. Is there a reason why it only works with BOOTPROTO=static?
If it works with bootptoto=static then stick with this option as long as it does the job right! As far as i know it should work also with none (none actually specifies that no boot-time protocol should be used but the IP value from IPADDR=1.2.3.4 variable should be updated for NIC at boot time).
@Ehwan Kho: Just use ip link show or ifconfig -a command and you should see all your NICs names. You can also use nmtui to edit your new card settings.
How do I add a new network card – NIC? I tried using lspci | grep Ethernet, it display that it 2 cards. My question now how could I know its name? as they are not using the eth1, eth2 et al.. And I can’t see /etc/udev/rules.d/70-persistent-net.rules. Your thoughts are highly appreciated.
In my opinion you can use both approaches, manual editing NICs interfaces or configure static IP using NM or nmtui if you dont have a GUI. But for a better control and flexibility over your NICs you should go with manual configurations, without NM. If you go with manual without NM don’t forget to use NM_CONTROLLED=no and ONBOOT=yes parameters.
please matie cezar can you teach me how to network a small firm. i will be happy if you can teach me form scratch to the level of networking a firm. i want to learn the installation and configuration
I ALWAYS disable network manager on Servers, it’s too dynamic and wastes resources. Why Red Hat is pushing that crap I don’t know, but I haven’t met anyone who wants it on a server. It’s great for desktops, and laptops, but NOT servers. Also, the DNS settings need to stick to being setup in the resolv.conf file, not spread out in the ifcfg scripts. Keeps the config manageable and easy to troubleshoot.
From going over the documentation on RHEL/CentOS 7, it appears that they’re really pushing for NetworkManager to be the default way to manage networking. For servers (not desktop) do you believe it’s best to disable NetworkManager and just assign static IPs normally as you have instructed or do you believing managing all the network through net manager is worth it?
The reason I ask is because I only deal with servers (not desktops) and I’ve seen many times NetworkManger causing major network issues. So I’m still on the fence whether or not to do things through netManager. Specially considering that rhel 7 is using it by default.
Got something to say? Join the discussion. Cancel reply
Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.
Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.
Save my name, email, and website in this browser for the next time I comment.

- T&N Solutions
- Work with Us
- IT Consulting
- Web site Creation
- WEB Application Development
- Computer Service Contracts
- Ours Partners
- IT services
- Computer Assistance
- Windows System Support
- Linux system Support
- Laboratory activities
- PC, Notebook and Server Repair
- Repair Iphone Smartphone
- Samsung Tablet Repair
Computer Support Blog

Static IP on CentOS 7: how to configure it?
Static ip on centos 7 machine network interface.
There are several ways to configure a static IP address on a network interface in CentOS 7 . Whoever, private, professional or company, needed to set a static IP address , will have the following guide.
Consider connecting to a Linux CentOS 7 machine through the command line yum install vim we configure the network card of reference and to find it we execute ip addr
we will have the following example result:
enp0s3 : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:0b:d5:2c brd ff:ff:ff:ff:ff:ff inet 10.10.10.10/24 brd 10.10.10.255 scope global dynamic enp0s3 valid_lft 86146sec preferred_lft 86146sec inet6 fe80::a00:27ff:fe0b:d52c/64 scope link valid_lft forever preferred_lft forever
In this case the assignment mode is DHCP , in case we want to change to static we will modify the following file: vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
adding and modifying the following parameters:
TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=enp0s3 DEVICE=enp0s3 ONBOOT=yes
in particular we will modify: BOOTPROTO=static and we will add the following variables:
IPADDR=10.10.10.150 NETMASK=255.255.255.0 GATEWAY=10.10.10.254 DNS1=8.8.8.8 DNS2=8.8.4.4
once considered the example of 10.10.10.150 available for static assignment it will be possible to restart the reteli card: ifdown enp0s3 && ifup enp0s3


IMAGES
VIDEO
COMMENTS
When it comes to understanding the internet, knowing how to pull an IP address is a fundamental skill. An IP address (Internet Protocol address) is a unique identifier that is assigned to each device connected to the internet.
The location of an IP address is usually found in your computer’s network diagnostics or Internet connection settings. Though this information is stored by your computer, it is assigned by your Internet provider or LAN router.
In today’s digital age, tracking an IP address location has become an important tool for businesses and individuals alike. An IP address is a unique numerical identifier assigned to each device connected to the internet.
Create a file named /etc/sysconfig/network-scripts/ifcfg-eth0 as follows: · DEVICE=eth0 · BOOTPROTO=none · ONBOOT=yes · PREFIX=24 · IPADDR=192.168.
Static IPv4 Configuration on CentOS 7 · Prerequisites · Step 1: Create the file · Step 2: Configuring an eth0 interface · Verify the settings · Conclusion
Статический IP-адрес в CentOS 7. Конфигурация сетевого интерфейса ... # ip a change 10.128.106.173/24 dev eno2 # ip a 1: lo: <LOOPBACK,UP
To do this, log into your server and issue the command ip a. The output of this command (Figure A) will include the name of the interface.
Configure a Static IP Address · Select “Automatically connect” to ensure the interface connects during boot. · Under “IPv4 CONFIGURATION,” select
To change IP you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 on your server in your favorite editor. Command for example: vi /etc/sysconfig/network-
1- Assign static IP using Network Manager ... To configure a static using the network manager, we will be using a tool called 'nmtui'. NMTUI is a
Configure Static IP Address in CentOS 7 / RHEL 7 · Find the available network interfaces on your system · Choose the desired network interface · Configure the
How to Configure Network Static IP Address on RHEL/CentOS 8/7 · Step 1: Disable Unwanted System Services in CentOS · Step 2: Configuring Static IP
How to Configure Network Settings on CentOS 7 Using GUI · 1. First, open the required connection settings. · 2. To set a static IP address for the
Configure a static IP address on a network interface in CentOS 7. To set a static IP address, will have the guide.