How to Add a Private IP on CentOS 7

Jason Mazzota
by (35posts) under Cloud Hosting
Verified and Tested 08/31/2015


In this how-to we will go over configuring your CentOS 7 server to work with a private IP address. For our Cloud, the private IP address range is available via the Cloud Portal and contains the full list of private IPs assigned to your account.


-A CentOS 7.X Cloud server

-A private IP address chosen for use

Determine your private range

Login to your cloud control panel and click on “Private IP’s” to see what private range has been allocated to you.

Assigned Private range.

Cloud control panel Private IP range.

Getting Started

Assigning a Private IP on CentOS 7.X is as easy as has it has been on previous versions of CentOS. You simply edit the configuration and restart networking. In our Cloud example below, the private interface is known as eth1. So we run:

nano /etc/sysconfig/network-scripts/ifcfg-eth1

Once inside, we add the below configuration to the bottom of the file.


Where IPADDR= your private IP address and the NETMASK= is the range’s netmask for your IP. In our Cloud this would be a /24 private IP range so the netmask is

Once this is complete, simply restart networking with the below command and the IP will be active for use.

service network restart

And that’s it. Configure another server on the private IP range and you will be able to communicate between the two.

Related Posts

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4