What do I need?

Andy259

New Member
Dec 9, 2024
10
0
1
I'll ignore all the folk that say you shouldn't be doing that. WE ALL NEED TO LEARN

So here's the thing I'm trying to set Proxmox up with a Modules garden WHMCS module but I can't get my head around how outside access is achieved AUTOMATICALLY, I've searched Youtube and read a couple of tutorials but still can't find the answer, they all relate to nginx proxy manager (which is not appropriate as id have to log in each time find the VM IP and reverse proxy in nginx which clients wouldn't wait for SO how do I get the VM exposed? I have ONE public IP which is pointed to my Proxmox install.
 
Andy, using a DHCP server for IP assignment can simplify things, as fba mentioned, and avoid manual edits for each VM. Check the Proxmox wiki for detailed guidance. You're doing great—keep at it
 
  • Like
Reactions: Andy259
Just substitute step 4 in tutorial with ip address assignment by a dhcp server. No manual editing required then.
Can't get to step 4 get this error
warning: vmbr1: post-up cmd 'echo > /proc/sys/net/ipv4/ip_forward' failed: returned 1 (/bin/sh: 1: echo: echo: I/O error
)

EDIT: What is this called that I'm trying to do so I can search for vids, this is out of date apparently the config has changed since this version (6.2) I'm using 8.3
 
Last edited:
There is a missing 1 in the line with echo. should be
Code:
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
 
Just substitute step 4 in tutorial with ip address assignment by a dhcp server. No manual editing required then.
Ah, I think I may be with you here(I think, hear me out) so I've got through the tutorial to step 4 (Thank you for pointing that mistake out))in the module, I've supplied a screenshot there's an IP address section, this is basically the dhcp server? when I test and use WHMCS to set up a VM it sets up correctly and gives an IP to the VM from that pool.(those ip's are incorrect need to reconfigure for the vmbr I'm using IP's from 172.16.1.100)
 

Attachments

  • Screenshot (231).png
    Screenshot (231).png
    157.1 KB · Views: 2
Last edited:
There is a missing 1 in the line with echo. should be
Code:
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
Thank you that appears to have worked(no errors), But VM's cant connect I pinged google.com: Temporary failure in name resolution, I did not follow any further steps in the tutorial as it appears this applies to individual VM's.
 
Andy, using a DHCP server for IP assignment can simplify things, as fba mentioned, and avoid manual edits for each VM. Check the Proxmox wiki for detailed guidance. You're doing great—keep at it
Thank you, I thought I was and thought the module I am using had dhcp but it looks like its just an Ip pool not sure, If I create a VM within whmcs it will not access the internet, however the vm is created, so at a loss at my last test when installing but did notice there was no IP being issued upon install of Ubuntu then I googled proxmox dhcp server and found some info about opnsense and dhcp, is this the path I need to follow, its like a rabbit warren if you don't know what you are doing, I don't understand why this just doesn't work out of the box, most of the tuts you read get you so far, but then after hours of messing about you need switches and all sorts, searching and searching I can't find one straight forward complete vid or tutorial.
 
Thank you that appears to have worked(no errors), But VM's cant connect I pinged google.com: Temporary failure in name resolution, I did not follow any further steps in the tutorial as it appears this applies to individual VM's.
How do your VMs get there network configuration? Aside of an ip, a dns server must be given. For testing connectivity better ping an ip first, like 1.1.1.1 or 8.8.8.8
If this works, the connection to the internet is possible at all. And the make sure to have correct dns settings in the VMs.
The linked wiki entry contains all the required settings and explanations, especially the part with Masquerading (NAT) with iptables
For the dhcp, as you seem to need only that one, have a look at dnsmasq. It can do DHCP and DNS for the VMs.
 
Ok, so I've figured out the nuts & bolts, (sort of) can someone correct me and help me put them together please,

So after it was mentioned above about a dhcp server, I went off to look at my firewall (opnsense) which to my understanding DOES have a dhcp server when I create a VM directly in Proxmox all is fine, I can open no VNC and get through the setup for Ubuntu and all is well, But when I create a VM via whmcs it provisions all the info is correct an ip address is assigned but no connection, I have tried both creating another bridge but then i get no ip address assigned, If I use the existing bridge, the module in whmcs will assign an ip from a pool that I create within there, then the IP shows up on my router but no connection.

So somewhere do i have a firewall issue? I can't see how it could be this as its the same IP range - here's how I tested in the whmcs module I told it to use IP's from 192.168.1.120 onward my Proxmox install is on 192.168.1.118 which is getting internet accesss, so i can't figure out why containers created on whmcs will not connect.
Just substitute step 4 in tutorial with ip address assignment by a dhcp server. No manual editing required then.
Ok, thank you so the ip address that is in
How do your VMs get there network configuration? Aside of an ip, a dns server must be given. For testing connectivity better ping an ip first, like 1.1.1.1 or 8.8.8.8
If this works, the connection to the internet is possible at all. And the make sure to have correct dns settings in the VMs.
The linked wiki entry contains all the required settings and explanations, especially the part with Masquerading (NAT) with iptables
For the dhcp, as you seem to need only that one, have a look at dnsmasq. It can do DHCP and DNS for the VMs.
Thank you, It's actually working now well kind of, so the vm's are created and have internet connectivity, the problem is the whmcs module assigns say 192.168.1.134 BUT something(opnsense?) gives a completely different addresss(initially) say 192.168.1.120 (which shows up in opnsense) but then when say ubuntu is installed yet another IP is assigned, when checking opnsense the .120 one will be inactive but another IP shows up which when ssh into connects to the now running VM, I tried connecting with the given IP in the Client area in whmcs but no dice.

But lets take whmcs out of the equation for a second, that still happens create a vm directly in proxmox a new IP shows up in opnsense, but once you install ubuntu the IP changes.

So is this an isssue with routing or is it more the whmcs module? it seems like something isn't getting the correct instructions.
 
In your network only one DHCP should assign ip addresses to clients. It doesn't matter, if it is your opnsense or something else, just make sure for consistency only one does it. Because you can not determine, which dhcp server your client will use, which can lead to unexpected situations like you just described.
The dhcp server should by default hand out the same ip address to the same client as long as it still knows about a former ip address lease. This is based on the mac address, which usually isn't changed just by installation of an OS.
The question is therefore, who is providing your Ubuntu with an ip address, if it isn't opnsense? You can tell by evaluating the logs of Ubuntu, which dhcp server was responding, if it was done by dhcp and not staticly assigned.
 
Last edited:
Thank you Guys,

Sorted this now it turns out nothing tallied because even though I said create VM's strarting from IP 192.168.1.100 in the module, I'd had previously created VM's which had already taken several IP's after that e.g 101, 107, 103 etc, so they weren't able to tally, I ripped everything down and cleared all the IP's and made them tally, the other issue was cloud init needed to be used in order to tell the module to use a dhcp ip I guess.