Score:0

How to setup public ip for proxmox

hk flag

I have an interesting question.

We have in company proxmox VE with public 46.xx.xx.xx/29 and private IP subnets. Proxmox hasn't got public ip and is connected on interaface vmbr0 to router with subnet 192.168.55.0/24. This router hasn't got public ip too, but i can setup public ip on any virtual computer.

Can you explain me, how it is possible please?

Is possible,that router is using NAT 1:1?? Thank you

Score:0
fr flag

In reality there is no clear division between "public" and "private". If a device has a public /29 routed to it, it can simply route it further to any other gateway address it wants – there is no need for NAT because it doesn't matter at all whether that gateway has a public address for itself or a private one. For example, the upstream gateway may simply have a "46.xx.xx.xx/29 via 192.168.55.y" route that directs the entire /29 to your Proxmox host.

Similarly, the same interface of a router (or a VM host) may belong to two subnets at once, with any mix of "public" or "private" addresses. Again, the layout you describe isn't very clear, but it could be that vmbr0 has addresses from both 192.168.55.0/24 and 46.xx.xx.xx/29 if it needs to. (Keep in mind that 'ifconfig' will not show secondary IPv4 addresses – nobody has updated it to do so in 20 years.)

Dave avatar
hk flag
proxmox server has got only private IP. Public IP have got only VMs, but VMs can having private ip also. Is your solution correct in this option too?
user1686 avatar
fr flag
Yes, the Proxmox server is no different from a router in this case, and neither a host nor a router actually care about the difference between "public" and "private" in any situation.
Dave avatar
hk flag
OK. Thank you. But I have one another question. How it is possible, when router doesn't have public ip from /29 subnet.? If I'm not mistaken the router can't routing, when is not part of the subnet...
user1686 avatar
fr flag
I'm still not clear on your network layout, but in that case it sounds like Proxmox is just a bridge then, while the *upstream* router is handling the /29 as well as the Proxmox private /24. Would need to look more closely at the Proxmox interface setup. What gateway IP do you specify in the VMs, and what MAC address does it resolve to (in the VMs' ARP caches)?
user1686 avatar
fr flag
It *is,* however, easily possible for a subnet to have a gateway whose IP address isn't part of the subnet – on the router you would have a "direct" route (aka interface route) for the /29, and on the hosts you would similarly have a direct route for the gateway's /32; in some operating systems the latter is actually automatic. "Same subnet" is just a matter of agreeing on direct routes in the first place.
user1686 avatar
fr flag
(in short, "gateway is in the same subnet" is not the fundamental requirement – "gateway must somehow resolve to a local MAC address" is the true requirement, with "same subnet" merely being the usual sensible implementation of it. But as long as the requirement is *somehow* satisfied, the gateway can even be an IPv6 address or a raw MAC address and it'd still work.)
Dave avatar
hk flag
In the VMs I specify gateway of /29 public network...
Dave avatar
hk flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/145405/discussion-between-dave-and-user1686).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.