Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Assigning IP to KVM VPS using WHMCS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Assigning IP to KVM VPS using WHMCS

I'm trying to setup WHCMS to auto create a KVM vps using Proxmox, assign an IP and install a chosen image, without having to manually participate in any part.

The problem is the IP part. Can you guys give me some pointers on how to set this up?

Comments

  • Proxmox dhcp

    Thanked by 1georgedatacenter
  • launchvpslaunchvps Member, Patron Provider

    You can use a WHMCS Proxmox module to perform this function.

    Here is one that will do that -> https://www.modulesgarden.com/products/whmcs/proxmox-vps

    You need to perform some setup prior to having work properly, such as:

    • Adding SSH keys to templates
    • Configuring a DHCP server on all nodes.
    • Install a couple of PHP modules on the nodes.

    Basically, the module will:

    • Provision a KVM machine
    • Create the NIC and add the MAC into the WHMCS module database.
    • Assign an IP to the MAC (IP pulled from the module's database. The module manages your IPs).
    • SSH to the node and adds the specific DHCP configuration that allows that MAC to pull the specific IP.
    • Completes provisioning.
    • Extends the disk to the proper size defined by the plan.
    • Set the root password.
    • Powers the machine on.

    Because Proxmox doesn't include a IP manager or a automated system like cloudinit, steps like these are needed to properly configure the machine.

    Cloudinit is on the Proxmox roadmap. Hopefully, in the future this process will be more simpler.

    https://pve.proxmox.com/wiki/Roadmap#Roadmap

  • charliecharlie Member, Host Rep

    Or you can create a custom script what generate DHCP config based on VPS mac address and associated IP address.

  • RickBakkrRickBakkr Member, Patron Provider, LIR

    Warning: Proxmox is not built for VPS hosting. If you have no idea what you are getting yourself into, please quit while you still can.

    As Proxmox has no support for either IP management nor for automated installs (see e.g. Cloudinit) out of the box, without the right tools, either self-built or made by parties such as ModulesGarden (with whom some of our dear members are not that fond), Proxmox can be a real "pain in the ass" for those willing to run an automated VPS hosting business.

    Therefore you would almost certainly need to use some kind of script that assigns the appropriate IP addresses for specific MAC-addresses in the DHCP server you should use. I would also suggest employing 'ebtables' to prevent IP hijacking/ spoofing.

    Thanked by 1Unixfy
  • arssirekarssirek Member
    edited April 2018

    Hi all, and thanks for the advises/explanations and warnings! This was very useful!

    I still have few concerns, if you may help to clarify them:

    I am using OVH as a hosting provider,
    they give us many failover Ip addresses in different subnets,
    they allow to generate a Mac address for each of the ip addresses,
    so with that in mind, do I still need the DHCP server?

    I followed their guide and was able to get VPS online - all I needed to do was to setup an /etc/network/interface file on Ubuntu VM for example with chosen IP. And setup corresponding MAC on Proxmox VM config.
    I was thinking is there a way to

    • hook an action to VPS creation (probably on WHMCS part, as proxmox seem to not have any)

    • access guest file system to write static ip to network interface

    I am planing to use the mentioned modulesgarden module, but still not sure about DHCP,
    Will network be more straightforward if all vpses will use configuration as OVH suggest? Does it matter enough to be concerned? Or I should forget all of this and just setup the DHCP server?

    I mainly plan to use KVM VM-ens, use latest versions on WHMCS, and yet use the free version of Proxmox (if that matters)

  • @arssirek

    Because you were able to simply assign the IP in the guest, it means you're not done. You need some sort of IP spoofing/jacking protection.

    Like @RickBakkr said, ebtables is one way to protect against this.

  • randvegetarandvegeta Member, Host Rep

    Just use something like virtualizor. It's $1/m per VM or $9 per node. Very economical really.

    Thanked by 1BlaZe
  • arssirekarssirek Member
    edited April 2018

    @FlamesRunner, Thanks for mentioning this again, I will try to research/understand the problem.

    @randvegeta, thanks, I actually tied to just use it, and it's chipper then the modules garden module alone. Actually I tried to install SoluesVM solution too.

    Virtualizor - didn't work for me, I hit few bugs consistently, and though their support do response and give suggestion overall experience wasn't positive, in the end to be sure you configured things optimal - you still have to know a lot...

    More people suggested porxmox as a well build system and it seems to actually be one, so I decided to give it a try. I am a beginner with virtualization and network technologies, so I still spend weeks on many questions and not sure whether things have been setup in the right way or not, but I will use my setup for my own needs first before providing paid hosting service, and I hope, I will find someone experienced to consult and check the configuration.

  • TNDTND Member

    @RickBakkr said:
    Warning: Proxmox is not built for VPS hosting. If you have no idea what you are getting yourself into, please quit while you still can.

    As Proxmox has no support for either IP management nor for automated installs (see e.g. Cloudinit) out of the box, without the right tools, either self-built or made by parties such as ModulesGarden (with whom some of our dear members are not that fond), Proxmox can be a real "pain in the ass" for those willing to run an automated VPS hosting business.

    Therefore you would almost certainly need to use some kind of script that assigns the appropriate IP addresses for specific MAC-addresses in the DHCP server you should use. I would also suggest employing 'ebtables' to prevent IP hijacking/ spoofing.

    can you suggest the best platform for VPS Hosting provider?

    Thank you

This discussion has been closed.