[SOLVED] Two NICs & two IPs - how to setup Proxmox to use LAN?

Razva

Renowned Member
Dec 3, 2013
252
10
83
Romania
cncted.com
Hello,

All my servers have two NICs: one for NET access and one for LAN access. Each server has a "subdomain.domain.tld" assigned.

When generating the cluster via UI I always get the NET IP, which is wrong, so I'm manually creating the cluster as per documentation.

When manually creating the cluster and using the LAN IP on the slaves ("pvecm add 192.168.1.1"), I always get stuck at "waiting for quorum". The only solution I found was to edit "/etc/hosts", map only "subdomain.domain.tld" to the NET IP, map only "subdomain" to the LAN IP and reboot. This solves the "waiting for quorum" issue, but breaks SSL.

I have a feeling that I'm doing something wrong here. How is a Proxmox intended to be setup in such a (common) scenario? Are there any custom settings that need to be applied to the OS?

Thank you,
Razvan
 
  • Like
Reactions: Talion
Any hints? I'm pretty sure I'm not the only one with this issue.

I've made a fresh install and didn't generated any SSL certs uprfont. After creating the cluster (by "fooling" /etc/hosts) the UI SSL deployment tool just fails:

Code:
Loading ACME account details
Placing ACME order
TASK ERROR: Error: GET to https://acme-v02.api.letsencrypt.org/directory received interrupt
 
FQDN for NET and LAN are different, you need select one over other with dependency on the service types. Want use UI which is using server fqdn? Set lan fqdn to /etc/hostname + /etc/hosts as primary.
 
Want use UI which is using server fqdn? Set lan fqdn to /etc/hostname + /etc/hosts as primary.
Ok so you're saying that I should use two different hostnames, one for NET and one for LAN?

As in:
Code:
/etc/hosts
11.12.13.14 server1.mydomain.com server1
and
Code:
/etc/hostname
192.168.1.1 proxmox1

In this case should I add the LAN IP to /etc/hosts? If the above example is not correct, can you please give me an example of a correct one?

Thank you very much!
 
For "posterity", this was solved by doing this:

1. When making the initial setup, use a real FQDN as the hostname (example "proxmox1.mydomain.tld"). This should result in "/etc/hosts" having "EXTERNAL.IP FQDN" as content. Example:
Code:
132.365.786.931 proxmox1.mydomain.tld

2. Set whatever you need from the Proxmox UI, including the LAN bridge, DNS, time, SSH keys etc. Don't setup SSL yet.

3. Reboot.

4. Edit "/etc/hostname". You should have something like this:
Code:
proxmox1

5. Rename the above line (step #4) with a LAN hostname (server ID, rack, datacenter ID, country etc). Example:
Code:
proxmox1-france

6. Edit "/etc/hosts" and add "LAN.IP LAN.HOSTNAME". Example:
Code:
192.168.1.1 proxmox1-france

7. Reboot.

8. You should be able to ping - on the server itself - the LAN hostname (proxmox-france1) and have the LAN IP returned (192.168.1.1).

9. Do this for all servers in the cluster.

10. Create the cluster via UI. At this point, when generating the cluster, you should see the LAN IP being offered at "Cluster Join Information", not the external IP or real FQDN.

11. Join the other servers into the cluster.

12. Generate a Let's Encrypt SSL certificate for one server and reboot the entire cluster.

13. Generate Let's Encrypt SSL certificates for the remaining server.

I hope this helps.
 
  • Like
Reactions: Joeman79

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!