How to configure Global Private Networking for Cloud Servers

2021-01-14 By Tan 5981 Views linux windows global private networking security
3 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 IPs (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 the same network. Also, the public cannot check the traffic of private networking anywhere and this, in turn, improves the server privacy.


globalprivatenetworkingdiagram


You can assign several required Cloud Servers into one VLAN under the Private Networking section of LayerPanel first, this can allow VMs under the same region to communicate through local private networking.

addingvmtovlan1


For using Global private networking, assign the available VLAN from different regions (E.g. Hong Kong, Singapore) into this global connection as follows.

globalprivatenetworking2


After that, you may see the instructions for configuring the private IP address for Windows OS, AlmaLinux, RockyLinux, 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 the 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 are 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 is configured properly, right-click Start Menu, then click Command Prompt.

  4. Execute the following command for checking network configuration.

    # ipconfig
    




AlmaLinux


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

    # vi /etc/sysconfig/network-scripts/ifcfg-ens7
    

Note: ens7 is the device name of the server. Please replace with the correct device name if necessary.

  1. Add the following entries for the 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=ens7
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=172.16.3.123
    NETMASK=255.255.255.0
    USERCTL=no
    

    almalinuxprivateip1

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 the network card.

    # ifconfig
    

    almalinuxprivateip2




RockyLinux


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

    # vi /etc/sysconfig/network-scripts/ifcfg-ens7
    

Note: ens7 is the device name of the server. Please replace with the correct device name if necessary.

  1. Add the following entries for the 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=ens7
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=172.16.3.123
    NETMASK=255.255.255.0
    USERCTL=no
    

    rockylinuxprivateip1

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 the network card.

    # ifconfig
    

    rockylinuxprivateip2




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 the 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 the 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 the 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 the network card.

    # ifconfig
    




Debian


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

    # /etc/network/interfaces
    
  2. Add the following entries for the 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 the network card.

    # ip addr
    




Ubuntu


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

    # /etc/network/interfaces
    
  2. Add the following entries for the 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 the network card.

    # ifconfig
    


Ubuntu 17.10 and higher versions use 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 the 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 the 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 the 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 the network card.

    # ip a
    


Related Tutorials


Related LayerStack Product

What do you think about this article?

Rate this article

About LayerStack’s Cloud Server

LayerStack is a leading Cloud Server provider in Asia, offering high performance and reliable SSD cloud computing services in our purpose-built, Tier 3+ data centers in Hong Kong, Singapore, Japan and the United States.

Try our blazing fast cloud servers with unlimited traffic and high security NOW!

WATCH DEMO
Instant Deployment in 1 Minute.

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.