---
title: "Connecting a VM to the Internet Using Proxmox VE"
description: "Learn how to connect a Proxmox VM to the Internet. Proxmox VE (Virtual Environment) is a Debian-based open-source server that allows system administrators to de"
url: https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/connecting-vm-internet-using-proxmox-ve
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Connecting a VM to the Internet Using Proxmox VE

**Learn how to connect a Proxmox VM to the Internet.** Proxmox VE (Virtual Environment) is a Debian-based open-source server that allows system administrators to deploy and manage VMs (virtual machines) and containers.

**Warning:**

**NOTE:** High Grade, Scale, and ADVANCE Gen 3 servers can only support 32 vMACs per server.

 

## Requirements

- a [Dedicated Server](https://us.ovhcloud.com/bare-metal/) running Proxmox VE
- an [Additional IP](https://docs.us.ovhcloud.com/en/network/additional-ip/purchasing-managing-additional-ips.md) through OVHcloud

 

## Instructions

### Creating a Virtual MAC for an Additional IP via the OVHcloud Control Panel

In this section, we will be generating a vMAC (virtual MAC) address to be used by the NIC (Network Interface Card) that Proxmox creates for a VM.

From the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/), select `Bare Metal Cloud` in the top navigation bar. In the left-hand menu, under **Network**, click `IP`.

Choose the Additional IP you wish to configure to your VM and click the _more options_ `...` button to the right of it. Then, select the `Add a virtual MAC` option from the drop-down menu.

In the pop-up menu, set the **Type** to `ovh` and enter the name of your virtual machine.

Lastly, click `Confirm` to initiate the creation of the vMAC address.

**Note:**

Please allow up to three minutes for the vMAC to populate in the OVHcloud Control Panel.

 

### Adding a Virtual MAC to the NIC of a VM in Proxmox VE

In this step, we will be pairing the vMAC address, which we generated in the [previous section](#creating-a-virtual-mac-for-an-additional-ip-via-the-ovhcloud-control-panel), to the interface that Proxmox has assigned to a VM.

**Important:**

**WARNING:** The following instructions apply to a previously created VM with an OS already installed. If you have not created a VM, please review the options on the [Qemu/KVM Virtual Machine](https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines) page by Proxmox, create a VM, and install an OS.

To complete this step, the VM must be powered off.

In Proxmox, navigate to the `Hardware` section of the VM that you would like to connect to the Internet.

From here, click the `Network Device` option and click the `Edit` button.

In the **MAC address:** field, enter the vMAC address that was created in the previous section and click `OK`.

Start your VM as you are now ready to configure the network interface.

In the next step, we will be configuring network settings within the OS of our VM. These steps can be different depending on the OS you are using.

**Tip:**

Select the tab for the OS of your choice to view the instructions.

#### Debian 10/11

#### Configuring Network Settings in a Debian 10/11 VM

In this step, we will be configuring our interface settings. To do this, you must first open your interface configuration file. Do so in a text editor of your choice using the following command:
```
sudo vi /etc/network/interfaces
```
Edit the interfaces file to make it appear as follows:
```

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface

auto lo
iface lo inet loopback

# The primary network interface

auto ens192
iface ens192 inet static
address 192.0.2.1
netmask 255.255.255.255
gateway 203.0.113.254
dns-nameservers 208.67.222.222 208.67.220.220
```
In this file, replace the following pieces of information as instructed:
1. If you don't know the name of your interface, you can find it using the following command:
   ```
   ip a
   ```
2. Next to **address**, replace "192.0.2.1" with the additional IP to which you have added the vMAC in the OVHcloud Control Panel.
3. Next to **gateway**, replace the "203.0.113.254" with the IPv4 Gateway of your server, found in the OVHcloud Control Panel. (See more [here](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/network-bridging.md#via-the-ovhcloud-control-panel).)
4. The DNS name servers listed are from OpenDNS. Feel free to use other name servers if you choose.

Now you will need to bring your NIC online. To do so, enter the following command:
```
sudo ip link set ens192 up
```
Finally, restart your networking service using the following command:
```
sudo systemctl restart networking
```
To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

##### Ubuntu 24.04

#### Configuring Network Settings in an Ubuntu 24.04 VM

In this step, we will be configuring our interface settings. To do this, you must first open your interface configuration file. Do so in a text editor of your choice using the following command:
```
/etc/netplan/00-netcfg.yaml
```
Edit the interfaces file to make it appear as follows:
```
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.0.2.1/32
      nameservers:
        addresses:
          - 208.67.222.222
          - 208.67.220.220
      routes:
          - to: 0.0.0.0/0
            via: 203.0.113.254
            on-link: true
      match:
        macaddress: 00:00:00:0a:bc:00
```
In this file, replace the following pieces of information as instructed:
1. If you don't know the name of your interface, you can find it using the following command:
   ```
   ip a
   ```
2. Next to **addresses**, replace "192.0.2.1/32" with the additional IP to which you have added the vMAC in the OVHcloud Control Panel.
3. The DNS name servers listed are from OpenDNS. Feel free to use other name servers if you choose.
4. Next to **via**, replace the "203.0.113.254" with the IPv4 Gateway of your server, found in the OVHcloud Control Panel. (See more [here](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/network-bridging.md#via-the-ovhcloud-control-panel).)
5. Next to **macaddress**, replace "00:00:00:0a:bc:00" with the virtual MAC address for your Additional IP. This information can be found in the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) in the **IP** section.

Now you will need to bring your NIC online. To do so, enter the following command:
```
sudo ip link set ens160 up
```
Apply the netplan:
```
sudo netplan apply
```
Finally, restart your networking service using the following command:
```
sudo systemctl restart systemd-networkd
```
To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

##### Ubuntu 22.04

#### Configuring Network Settings in an Ubuntu 22.04 VM

In this step, we will be configuring our interface settings. To do this, you must first open your interface configuration file. Do so in a text editor of your choice using the following command:
```
/etc/netplan/1-netcfg.yaml
```
Edit the interfaces file to make it appear as follows:
```
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.0.2.1/32
      nameservers:
        addresses:
          - 208.67.222.222
          - 208.67.220.220
        routes:
          - to: 0.0.0.0/0
            via: 203.0.113.254
            on-link: true
        match:
          macaddress: 00:00:00:0a:bc:00
```
In this file, replace the following pieces of information as instructed:
1. If you don't know the name of your interface, you can find it using the following command:
   ```
   ip a
   ```
2. Next to **addresses**, replace "192.0.2.1/32" with the additional IP to which you have added the vMAC in the OVHcloud Control Panel.
3. The DNS name servers listed are from OpenDNS. Feel free to use other name servers if you choose.
4. Next to **via**, replace the "203.0.113.254" with the IPv4 Gateway of your server, found in the OVHcloud Control Panel. (See more [here](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/network-bridging.md#via-the-ovhcloud-control-panel).)
5. Next to **macaddress**, replace "00:00:00:0a:bc:00" with the virtual MAC address for your Additional IP. This information can be found in the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) in the **IP** section.

Now you will need to bring your NIC online. To do so, enter the following command:
```
sudo ip link set ens160 up
```
Apply the netplan:
```
sudo netplan apply
```
Finally, restart your networking service using the following command:
```
sudo systemctl restart systemd-networkd
```
To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

##### Ubuntu 18.04

#### Configuring Network Settings in an Ubuntu 18.04 VM

Canonical, the developer of Ubuntu, implemented the use of [Netplan](https://netplan.io) for easy-to-use network configuration as of version 17.x.
To configure the network interface, open the `01-netcfg.yaml` file in a text editor of your choice using the following command:
```
sudo vi /etc/netplan/01-netcfg.yaml
```
Edit the file to make it appear as follows:
```

# This file describes the network interfaces available on your system

# For more information, see netplan(5).

network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.0.2.1/32
      nameservers:
        addresses:
          - 208.67.222.222
          - 208.67.220.220
      routes:
        - to: 0.0.0.0/0
          via: 203.0.113.254
          on-link: true
```
In this file, replace the following pieces of information as instructed:
1. If you replace the VMXNET3 NIC with another one, your NIC may use a different naming convention. If it does, replace "ens160" in the file with the name of your interface. If you don't know the name of your interface, you can find it using the following command:
   ```
   ip a
   ```
2. Next to **addresses**, replace "192.0.2.1" with the additional IP to which you have added the vMAC in the OVHcloud Control Panel plus the subnet you wish to use in CIDR notation.
3. The DNS name server addresses listed are from OpenDNS. Feel free to use other name servers if you choose.
4. Next to **via**, replace the "203.0.113.254" with the IPv4 Gateway of your server, found in the OVHcloud Control Panel. (See more [here](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/network-bridging.md#via-the-ovhcloud-control-panel).)

Now apply the Netplan settings with the following command:
```
sudo netplan apply
```
To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

##### CentOS 7

#### Configuring Network Settings in a CentOS 7 VM

In this step, we will be configuring our interface settings. To do this, first navigate to the `network-scripts` directory using the following command:
```
cd /etc/sysconfig/network-scripts
```
Use the `ls` command to view the content of the directory.
```
ls -al
```
Locate your interface file (e.g. ifcfg-ensXXX) and then open it in a text editor of your choice using the following command:

**Warning:** **NOTE:** In our example the interface file is `ifcfg-ens192`.

```
sudo vi ifcfg-ens192
```
Edit the interfaces file to make it appear as follows, changing only what is in red:
```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens192
UUID=*DO NOT edit this field!*
DEVICE=ens192
ONBOOT=yes
IPADDR=192.0.2.1
NETMASK=255.255.255.0
GATEWAY=203.0.113.254
DNS1=208.67.222.222
DNS2=208.67.220.220
```
In this file, check/replace/add the following pieces of information as instructed:
1. For **IPADDR**, replace "192.0.2.1" with the additional IP that you added a vMAC to in the OVHcloud Control Panel.
2. For **GATEWAY**, replace the "203.0.113.254" with the IPv4 Gateway of your server, found in the OVHcloud Control Panel. (See more [here](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/network-bridging.md#via-the-ovhcloud-control-panel).)

**Warning:** **NOTE:&#x20;**&#x54;he DNS name servers listed are from OpenDNS. Feel free to use whichever name servers you prefer.

Next, enable the NIC by restarting the network service:
```
sudo systemctl restart network
```
To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

##### Windows Server 2019

#### Configuring Network Settings in a Windows Server 2019 VM

In this step, we will be configuring our interface settings. To do this, navigate to the `Server Manager`. From the left-hand column, click the `Local Server` option.

We want to change the default **Ethernet0** option. To do so, click `IPv4 address assigned by DHCP, IPv6 enabled`.

Next, right-click on **Ethernet0** and select the **Properties** option from the drop-down menu. From the ensuing menu, double-click the `Internet Protocol Version 4 (TCP/IPv4)` option.

This will allow you to configure your interface to use the IP address, gateway, and DNS name servers of your choice. Configure it as follows:
1. Next to **IP address**, replace "203.0.113.32" with the additional IP to which you have added the vMAC in the OVHcloud Control Panel.
2. Next to **Subnet mask**, replace "255.255.255.248" with the correct netmask depending on the size of the block of IPs you have purchased. For instance, if you are using a /28 block, put "240" in the last octet.
3. Next to **Default gateway**, replace the "203.0.113.254" with the IPv4 Gateway of your server, found in the OVHcloud Control Panel. (See more [here](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/network-bridging.md#via-the-ovhcloud-control-panel).)
4. The DNS nameservers listed are from OpenDNS. Feel free to use other name servers here, if you choose.

Click `OK` after making these changes.

To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

 

## Go further

Browse all the [Dedicated Servers guides](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/landing-page-dedicated-servers.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Dedicated Servers](https://us.ovhcloud.com/bare-metal/) on the OVHcloud US website.
