Adding new IP block to SoYouStart Proxmox server

soyoustart-logoToday I purchased a new IP block from SoYouStart/OVH and would like to use the whole IP block for VMs. As I did use Proxmox for virtualization, utilizing the whole new IP block is quite easy as soon as every steps are followed. So I would like to note here some necessary steps when adding new IP block to SoYouStart server for later reference.

For SoYouStart server

  1. First, we need to add a new MAC address for each IP address that we want to use: Go you SYS manager >> IP >> Select the failover IP and “add a Virtual MAC” for it.
  2. Then, when creating a new VM in proxmox, when configuration NIC (Network Interface Card), remember to modify it with the vMac of your Failover IP. This is a very important step that I forgot in the very first use.
  3. Install your guest machine.
  4. After finishing installation, you can configure your VM follow the guide to setup Network Bridging @ OVH. In general, in your VM:
    • IP address is your new failover IP address
    • Netmask is 255.255.255.255
    • Network gateway is your server IP with the last octet replaced by 254 (e.g. your server IP is 123.456.789.012, then the VM gateway will be 123.456.789.254)
      • The gateway you need to use in your virtual machine should not be: (i) the IP of your dedicated server or (ii) IP failover but you must use the gateway provides for your dedicated server.
      • Otherwise, you will receive warning from OVH “Bad configuration regarding your server XXXX” and this might cause blocking your IP.
    • DNS is the OVH DNS: 213.186.33.99

Done. Enjoy your new IP block with very good price 🙂

For other server providers

Many visitors contacted me to ask on how to apply this for generic servers and other popular providers such as Hetzner. I will give the example on how to make it work on Hetzner as follows:

  1. For a new subnet, first we need to create a new network interface for it:

    [bash]auto vmbr1
    iface vmbr1 inet static
    address ONE_USABLE_IP_FROM_SUBNET
    netmask SUBNET_NETMASK_INFORMATION
    bridge_ports none
    bridge_stp off
    bridge_fd 0[/bash]

  2. Then, bring the new network interface to Proxmox by

    [bash]/etc/init.d/networking restart[/bash]

  3. Then, assign the new network interface (vmbr1) to the new VM and configure IP with proper IP, subnet mask, gateway (the host’s main IP address since we will forward traffic via the HOST’s IP), and DNS fields (the host’s DNS)
  4. If you are using csf, do not forget to add

    [bash]#!/bin/sh
    /sbin/iptables -F FORWARD
    /sbin/iptables -P FORWARD ACCEPT[/bash]

    to /etc/csf/csfpost.sh and restart csf

    [bash]csf -r[/bash]

  5. DNS for Hetzner:

    [bash]nameserver 213.133.99.99
    nameserver 213.133.98.98
    nameserver 213.133.100.100[/bash]

References:

Leave a Reply