How to configure Private Networking for Cloud Servers

2019-09-12 By Tan 2291 Views linux windows private networking security
1 reviews

The private IP address with dedicated vlan is provided for internal use behind a router and apart from the public internet. This allows you to add a second interface (E.g. ETH1) to your Cloud Servers with a range of private IP (E.g. 172.16.0.0/16) that is not publicly accessible.

Mostly, it is used for communicating with a group of other servers in same network. Also, public cannot check the traffic of private networking anywhere and this in turn improves the server privacy. Please note it is only available for Cloud Servers that are in the same LayerStack data center.


newprivatenetworking


See the instructions for configuring private networking of Windows OS, CentOS, Debian, Ubuntu & Fedora below.

Windows OS


  1. Click Start Menu, then click Control Panel option.

  2. Click Network & Sharing Center option.

  3. Click Change adapter settings in the left panel.

  4. Right click adapter with name Ethernet 2 and select Properties.

  5. In the properties window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties button.

  6. Select Use the following IP address: option and configure the private IP address.

    The following IP ranges are suggested for use as private IP addresses:

    10.0.0.0/8
    172.16.0.0/16
    192.168.0.0/24

    Example for 172.16.3.123:

    Windowsprivateip1

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0).

  1. Once IP and Subnet entered check the box Validate Settings upon exit, click OK and then close the Ethernet 2 property window.

  2. Windows Network Diagnostic tool will run to check to see any issues, close this window.

  3. To check if the private IP address configured properly, right click Start Menu, then click Command Prompt.

  4. Execute the following command for checking network configuration.

    # ipconfig
    

CentOS – 8


  1. Edit the network configuration file using the below command.

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

Note: eth1/ens1 is the device name of the server. Please replace with the correct device name if necessary.

  1. Add the following entries for network card and configure the preferred private IP address.

    The following IP ranges are suggested for use as private IP addresses:

    10.0.0.0/8
    172.16.0.0/16
    192.168.0.0/24

    Example for 172.16.3.123:

    DEVICE=eth1
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=172.16.3.123
    NETMASK=255.255.255.0
    USERCTL=no
    

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0).

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart NetworkManager.service
    
  3. Check the private IP address configured properly inside network card.

    # ifconfig
    

CentOS – 6 / 7


  1. Edit the network configuration file using the below command.

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

Note: eth1/ens1 is the device name of the server. Please replace with the correct device name if necessary.

  1. Add the following entries for network card and configure the preferred private IP address.

    The following IP ranges are suggested for use as private IP addresses:

    10.0.0.0/8
    172.16.0.0/16
    192.168.0.0/24

    Example for 172.16.3.123:

    DEVICE=eth1
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=172.16.3.123
    NETMASK=255.255.255.0
    USERCTL=no
    

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0).

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart network.service
    
  3. Check the private IP address configured properly inside network card.

    # ifconfig
    

Debian


  1. Edit the network configuration file using the below command.

    # /etc/network/interfaces
    
  2. Add the following entries for network card and configure the preferred private IP address.

    The following IP ranges are suggested for use as private IP addresses:

    10.0.0.0/8
    172.16.0.0/16
    192.168.0.0/24

    Example for 172.16.3.123:

    auto ens4
    iface ens4 inet static
    address 172.16.3.123
    netmask 255.255.255.0
    

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0).

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart network.service
    
  3. Check the private IP address configured properly inside network card.

    # ip addr
    

Ubuntu


  1. Edit the network configuration file using the below command.

    # /etc/network/interfaces
    
  2. Add the following entries for network card and configure the preferred private IP address.

    The following IP ranges are suggested for use as private IP addresses:

    10.0.0.0/8
    172.16.0.0/16
    192.168.0.0/24

    Example for 172.16.3.123:

    auto eth1
    iface eth1 inet static
    address 172.16.3.123
    netmask 255.255.255.0
    

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0).

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart network.service
    
  3. Check the private IP address configured properly inside network card.

    # ifconfig
    

Fedora


  1. Edit the network configuration file using the below command.

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

Note: eth1/ens1 is the device name of the server. Please replace with the correct device name if necessary.

  1. Add the following entries for network card and configure the preferred private IP address.

    The following IP ranges are suggested for use as private IP addresses:

    10.0.0.0/8
    172.16.0.0/16
    192.168.0.0/24

    Example for 172.16.3.123:

    DEVICE=eth1
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=172.16.3.123
    NETMASK=255.255.255.0
    USERCTL=no
    

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0).

  1. Save the file.

  2. Restart the network service and make the changes effect.

    # systemctl restart NetworkManager.service
    
  3. Check the private IP address configured properly inside network card.

    # ip a
    


Related Tutorials


Related LayerStack Product

What do you think about this article?

Rate this article