Configuring a Bridged Network with Mac Address Restrictions
Providers like Hetzner and OVH are known to enforce MAC address restrictions, and other providers may do the same. By default, a virtual machine’s network interface is assigned a random MAC address, which can lead to connectivity issues with these providers, as they require all traffic to originate from a predefined MAC address.
This guide exclusively covers IPv4 configuration on a Debian based hypervisor. We do not supply documentation for any other distribution.
Install bridge-utils
Before creating a bridge, make sure you install bridge-utils
. If you don't, you will lose network connectivity.
By default, the VirtFusion installer will install it. This step is just in case you are setting up the bridge before installing VirtFusion.
apt install bridge-utils -y
Bridge Setup
To set up the persistent network (including the bridge) the /etc/network/interfaces
file should be as follows (it should not contain source-directory /etc/network/interfaces.d
):
auto lo
iface lo inet loopback
auto <INTERFACE>
iface <INTERFACE> inet manual
auto br0
iface br0 inet static
bridge_ports <INTERFACE>
address <IPADDRESS>
gateway <GATEWAY>
netmask <NETMASK>
dns-nameservers <DNS1> <DNS2>
bridge_hw <INTERFACE>
bridge_stp off
bridge_waitport 0
bridge_fd 0
<INTERFACE>
should be replaced with the public interface name of the server. It may be eno1
, it may be eth0
or even named something different, but to be sure run ip a
to list the interfaces on the server.
<IPADDRESS>
should be the main ipv4 address of the server. which can also be double-checked using ip a
.
<GATEWAY>
should be set to the correct gateway.
<NETMASK>
should be set to the correct netmask for the main IPv4 subnet.
<DNS1> <DNS2>
can be set to your favorite public nameserver. 8.8.8.8
& 8.8.4.4
for Google.
Once you have it configured. It should look something along the lines of this:
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet manual
auto br0
iface br0 inet static
bridge_ports eno1
address 100.100.100.25
gateway 100.100.100.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
bridge_hw eno1
bridge_stp off
bridge_waitport 0
bridge_fd 0
Double check your network configuration before restarting the network. If you have made a mistake, you may lose connectivity.
You can now restart the networking. It's also wise to reboot the server at this point.
systemctl restart networking
VirtFusion Configuration
IP Addresses
Your provider will give you a list of IPv4 addresses along with their corresponding MAC addresses. If you haven't received this information, please contact your provider.
IPv4 addresses need to be configured correctly in VirtFusion for them to work. You can either do this from Admin -> Connectivity -> IPv4 Addresses
or Admin -> Connectivity -> IP Block -> (select the IPlock) -> Addresses (tab)
.
On the list of IPv4, you will see a column in the table called MAC
.
Click +MAC
in the correct row for your IP. A popup will open for you to enter the correct MAC.
Enter the MAC that has been provided by you provider in to the field and click Update
.
The MAC will now be assigned to the IP.
Hypervisor Network
Navigate to Compute Resources -> Hypervisors -> (select your hypervisor) -> Network (tab)
and set the primary network as shown below.
If you're experiencing connectivity issues after following these instructions, please double-check all your settings. Our support team is unable to assist with network debugging in environments with such restrictive configurations.