Port vom Host zum LXC Container weitergeben.

SoichiroYagami

New Member
Jun 1, 2016
12
0
1
27
Hey Leute,

Ich möchte den Port 80 von meinem Proxmox Host zu einem LXC Container weitergeben.
Ich habe es schon mit iptables versucht aber leider erfolglos.
Code:
iptables -A PREROUTING -t nat -p tcp --dport 80 -j DNAT --to-destination 172.16.0.51:80

Ich hoffe jemand aus der Community kann mir hier helfen.

Mit Freundlichen Grüßen,

SoichiroYagami
 
Ich möchte den Port 80 von meinem Proxmox Host zu einem LXC Container weitergeben.
Ich habe es schon mit iptables versucht aber leider erfolglos.
Code:
iptables -A PREROUTING -t nat -p tcp --dport 80 -j DNAT --to-destination 172.16.0.51:80

Das reicht vermutlich nicht, da in der umgekehrten Richtung dann als Quelladresse 172.16.0.51 steht, was dann irgendwo blockiert sein könnte.

Oder aber der Container hat die Quelladresse des eingehenden Pakets nicht richtig geroutet.

Genaueres kann man nur sagen, wenn die gesamte IP (Host, Container und externer Router) Konfiguration bekannt ist.
 
Hierfür sind IPtables bereits im Proxmox Host im Webinterface verbaut: https://pve.proxmox.com/wiki/Proxmox_VE_Firewall
Hiermit wird die Kommunikation zwischen Host und VMs geregelt. Wenn man keine VLANs hat ist das super. Hatte ich auch selbst einige Zeit im Einsatz.
 
Hierfür sind IPtables bereits im Proxmox Host im Webinterface verbaut: https://pve.proxmox.com/wiki/Proxmox_VE_Firewall
Hiermit wird die Kommunikation zwischen Host und VMs geregelt. Wenn man keine VLANs hat ist das super. Hatte ich auch selbst einige Zeit im Einsatz.


Ist aber für Filter, für Port-Forwarding (wie im vorliegenden Thread gewünscht) sind die iptables Aufrufe explizit anzugeben.
 
@Richard
ja du hast Recht, hab nochmal nachgesehen, kann man kein Portforawarding machen, lediglich die Kommunikation zwischen VMs und Host. Ja, zumindest das Feature hatte ich mal.
 

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!