How to configure Global Private Networking for Cloud Servers

2021-01-14 By Tan 4533 Views linux windows global private networking security
0 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.


globalprivatenetworkingdiagram


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 required to 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 required to 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 required to 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 required to 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 required to 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
    


Ubuntu 17.10 and higher versions uses NetPlan as the default network management tool and its configuration files are written in YAML syntax with a .yaml file extension.


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

    # vi /etc/netplan/50-cloud-init.yaml
    
  2. Add the following entries for network card and configure the preferred private IP address.

    The following IP ranges are required to 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:

    network:
    version: 2
    renderer: networkd
    ethernets:
    ens7:
    dhcp4: no
    addresses: [172.16.3.123/16]
    

Note: The netmask of LayerStack private IP range is /24 subnet (255.255.255.0) & change the name of the ethernet interface as on your server.

  1. Update networking with the below command and then the changes will take effect.

    # netplan apply
    
  2. 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 required to 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
LayerStack Plans

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.