Get Virtualizor

Hetzner Network

Overview

This article will explain you if you have server from Hetzner then how you can config the network related setting or IP Pools on the Virtualizor panel.

Hetzner Additional IPs

If you have additional IPs from the Hetzner. So please follow this steps to config or create ip pool on the virtualizor panel. Please go to Virtualizor Admin Panel -> IP Pool -> Create IP Pool and the following fields in the Create IP Pool form have to be filled as below:

  • Gateway : Use Gateway same as provided by Hetzner.
  • Netmask : Use netmask of the IP same as provided by Hetzner.
  • Routed : Please check on 'Use routed network' option.
  • Adding ip : Add ips along with Mac generated from Hetzner panel.

Note

OpenVZ containers do not require mac for the ips.
Using Multiple IPs in a vps will not be possible since Hetzner does not provides option to generate same MAC for multiple IPs.
Having same MAC generated would be required since Virtualizor will add the IPs as alias on eth0 within vps.
Additional_IPs

Hetzner Subnet/IP Range

If you have Subnetted IPs from the Hetzner. So please follow this steps to config or create ip pool on the virtualizor panel.
Please go to Virtualizor Admin Panel -> IP Pool -> Create IP Pool and the following fields in the Create IP Pool form have to be filled as below:

  • Gateway : This will be first Ip of the usable range assigned to you.
    Note : You cannot use that gateway ip in vps.
  • Netmask : Use the same as provided by Hetzner.
  • NAT: Please check on Enable NAT option .
  • Adding ip : Please add ip range to the pool .
Hetzner-Subnet

Troubleshooting

Vps/Bridge start issue

A Nat bridge is created after NAT ip pool is added from panel.
Its config file will reside under /etc/libvirt/qemu/networks/ directory
If NAT bridge is not started and its giving these errors on panel while starting vps :

The VPS failed to start
error: Failed to create domain from /etc/libvirt/qemu/v1001.xml
error: Requested operation is not valid: network 'natbr1' is not active

Then you can try starting the bridge :

virsh net-start natbr1

Once its started you can set it to auto start :

virsh net-autostart natbr1

If net-start command fails with this error :

virsh net-start natbr1
setlocale: No such file or directory
error: Failed to start network natbr1
error: The name org.fedoraproject.FirewallD1 was not provided by any .service files

Then you will need to start firewalld service as well :

service firewalld start

And also add our ports to avoid issues :

firewall-cmd --zone=public --permanent --add-port=4081-4085/tcp
firewall-cmd --zone=public --permanent --add-port=5900-6000/tcp (vnc ports can go higher than 6000 ranges as well)
firewall-cmd --reload

After starting firewalld, you can try to start NAT bridge again.

Outgoing ip for vps

If the outgoing ip for vps is not shown as expected and it shows as server's ip then you will need to add a firewall in iptables :

root@host ~ # iptables -S -t nat

-P PREROUTING ACCEPT

-P INPUT ACCEPT

-P OUTPUT ACCEPT

-P POSTROUTING ACCEPT

-A POSTROUTING -s My-IP/27 -o Bridge-name -j MASQUERADE //This one needs to be removed

root@host~ # iptables -t nat -D  POSTROUTING -s My-IP/27 -o Bridge-name -j MASQUERADE

Where, PUBLIC_IF is the NAT bridge name listed in virsh net-list command.

Also comment any un-wanted NAT rule added for viifbr0 in /etc/sysconfig/iptables file and then service iptables restart

Note

Single IPs cannot be added to Nat IP pool. Only a range of IPs can be added while creating the Pool.
The list of usable IPs are provided by Hetzner.
NAT Pool is not supported for Proxmox.

Hetzner IPv6

Add IPv6 Address

Before adding IP Pool for IPv6 please make sure you have already configure the ipv6 address on your Host Server with bridge viifbr0.

Now please go to Virtualizor Admin Panel -> IP Pool -> Create IP Pool and the following fields in the Create IP Pool form have to be filled as below:

  • Gateway : Use the IP which was configured for the server.
  • Netmask : Use netmask of the IP same as provided by Hetzner.
  • Routed : Please check on 'Use routed network' option.
  • Generate IPv6 : Please enter each octect of your ipv6 to generate the ipv6 address.
Ipv6

Add IPv6 Subnets

To generate or in order to create IPv6 Subnets you need to have an IPv6 IP Pool.

Now that you have an IPv6 IP Pool, Which we have created in previous steps now we can generate the subnets.
To do so go to Virtualizor Admin Panel -> IP Pool -> Add IPv6 Subnets. Fill in the details accordingly and the following is a screenshot of the wizard :

IPv6_subnet
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list