Configure a network interface on a server
To connect a server to a private and public network, configure the network interfaces on the server.
The network interface for a private network will be configured automatically only when automatically installing an OS Linux. For Windows OS, the private network interface can be configured manually only.
You can view the parameters for configuration in the control panel: in the top menu, click Products → Dedicated Servers → Servers → server page → tab Network.
Configure the public network interface
Ubuntu
Debian
CentOS
Windows
Ubuntu 20.04 LTS
Ubuntu 22.04 LTS, 24.04 LTS
-
Connect to the server via SSH or using the KVM console.
-
Open the
netplanutility configuration file with thevitext editor:vi /etc/netplan/01-netcfg.yaml -
Add or change the values for the public network interface settings:
network:ethernets:<eth_name>:addresses:- <ip_address>/<mask>gateway4: <gateway>nameservers:addresses: [<dns_servers>]renderer: networkdversion: 2Specify:
<eth_name>— name of the public network interface;<ip_address>— public IP address of the server with a subnet mask, for example203.0.113.2;<mask>— subnet mask, for example24;<dns_servers>— DNS servers. We recommend using Servercore recursive DNS servers, but you can specify any available DNS servers;<gateway>— gateway.
-
Press ESC.
-
Exit the
vitext editor saving your changes::wq -
Apply the configuration:
netplan apply -
Optional: reboot the server.
Configure a private network interface
Ubuntu
Debian
CentOS
Windows
-
Open the
netplanutility configuration file with thevi:vi /etc/netplan/01-netcfg.yaml -
Add or change the values of the private network interface settings:
<eth_name>:addresses: [<ip_address>]Specify:
<eth_name>— the name of the private network interface;<ip_address>— the private IP address of the server with a subnet mask, for example192.168.0.2/24.
-
Press ESC.
-
Exit the
vitext editor with your changes saved::wq -
Apply the configuration:
netplan apply -
Optional: reboot the server.
-
Optional: assign a private IP address to the server in the control panel.