Cloudflare Unifi Proxmox LXC

Forssux

Member
Mar 27, 2022
62
4
13
Hi There,

I have problems with portforwarding to a LXC in Proxmox 7.3-4

I have a UDM-Pro

I have a USW-Pro-24-PoE

Network 7.2.95 is the version of the networkapp

I have a older Server running Proxmox 7.3-4 running in the basement where I want to host some webpages on.

I have bought a domainname at cloudflare ThisIsNotTheRealUrl.net for example

I have in the dns settings of this url on Cloudflare:

Type Name Content Proxy status TTL Actions
A thisisnottherealurl.net 92.108.135.32 Proxied Auto
A nextcloud 92.108.135.32 Proxied Auto
A pve 92.108.135.32 DNS only Auto
A test 92.108.135.32 Proxied Auto
A www 92.108.135.32 Proxied Auto


I have port80 and 443 forwarded to the internal IPadress of this LUX which is in the same range as the pc where I'm sending this rapport from and my PI Hole.



I have port forwarded the Proxmox webpage on port 8006 and this works...

So does anybody have a guide/clue which can help me



Kind regards,

Guy
 
Hi,

You can add the iptables to the host network configuration as the following:

Code:
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport <PORT> -j DNAT --to <VM or CT Ip address>:<PORT>
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport <PORT> -j DNAT --to <VM or CT Ip address>:<PORT>
 
  • Like
Reactions: Forssux