Skip to main content
Configure the network interface on the server
Last update:

Configure the network interface on the server

To connect the server to private и public network configure the network interfaces on the server.

The network interface for the public network is configured automatically only when the automatic OS installation. The interface for the private network must always be configured manually.

You can view the parameters for customization in control panels on the server page → tab Network.

Configure the network interface of the public network

  1. Connect to the server via SSH or through KVM console.

  2. Open the utility configuration file netplan with the vi text editor:

    vi /etc/netplan/01-netcfg.yaml
  3. Add or change the values of the public network interface settings:

        <eth_name>:
    addresses: [<ip_address>/<mask>]
    gateway4: <gateway>
    nameservers:
    addresses: [<dns_servers>]

    Specify:

    • <eth_name> — name of the network interface of the public network;
    • <ip_address>/<mask> — public IP address of the server with a subnet mask (for example: 188.93.23.36/29);
    • <gateway> — gateway;
    • <dns_servers> — DNS servers. We recommend using Selectel recursive DNS servers But you can specify any available DNS servers.
  4. Press the key ESC.

  5. Exit the text editor vi with the changes intact:

    :wq
  6. Apply the configuration:

    netplan apply
  7. Optional: reboot the server.

Configure the network interface of the private network

  1. Connect to the server via SSH or through KVM console.

  2. Open the utility configuration file netplan with the vi text editor:

    vi /etc/netplan/01-netcfg.yaml
  3. Add or change values for the network interface settings of the private network:

        <eth_name>:
    addresses: [<ip_address>]

    Specify:

    • <eth_name> — name of the network interface of the private network;
    • <ip_address> — private IP address of the server (for example: 192.168.0.2/24).
  4. Press the key ESC.

  5. Exit the vi text editor with your changes saved:

    :wq
  6. Apply the configuration:

    netplan apply
  7. Optional: reboot the server.