Web Interface Port entfernen

maximid

Active Member
Oct 13, 2018
29
3
43
24
Hallo,

ist es denn mittlerweile supported bzw. bestehen noch Probleme beim entfernen des Web Interface Ports?
 
hi,

das geht nicht, weil sonst unser API nicht funktionieren wúrde.
was wäre dein use-case?
 
Hallo oguz,

danke für deine schnelle Antwort.

Grundsätzlich nur um es dem Kunden einfacher zu machen.

Bin bisher so weit, vielleicht muss man den Port ja gar nicht ändern.


https://192.168.0.1:8006 wurde geändert auf https://host01.domain.com:8006
Der nächste Schritt war dann ein SSL-Zertifikat aufzusetzen welches nun auch läuft.
Jetzt wäre es schön den Link nochmal zu ändern und zwar auf folgendes:
https://host01.domain.com:8006 wurde geändert auf https://host01.domain.com
Bedeutet den Port zu entfernen wenn ich keinen Denkfehler habe.

Falls jemand eine Möglichkeit kennt per Rewrite etc, würde ich mich sehr über eine Antwort freuen.
 
Ich habe sowas mithilfe von Apache Proxy mal gemacht.
Das wird in der config des jeweiligen virtual Host eingetragen und sieht dann so aus:
Code:
<VirtualHost *:80>
    ServerName server.domain.de
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

<Location />
        RequestHeader set X-Dein-Server-URL "http://server.domain.de/"
        ProxyPass http://127.0.0.1:<PORT NUMMER>/
        ProxyPassReverse http://127.0.0.1:<PORT NUMMER>/
    </Location>
 
Hallo @Ingo S,

super danke für den Code, allerdings wo muss ich das denn einfügen?
Hast du denn vlt einen direkten Pfad zur Datei?
Weil Apache ist ja auf Proxmox nicht installiert oder sehe ich was falsch?
 
Ja, stimmt, Apache ist nicht direkt als Paket installiert. Ich hab das auf Proxmox selbst noch nicht gemacht, sondern auf einem anderen Server (Graylog, lauscht auf Port 9000). Allerdings dürfte es kein Problem sein, den Apache zu installieren und einen vhost anzulegen der auf Port 443 lauscht.
Der Apache kommt sich mit Proxmox ja dann nicht in die Quere. Wenn dann auf Port 443 der Proxy lauscht und auf den 8006er von Proxmox umleitet, hast du, was du brauchst.

Wie es sich dabei allerdings mit dem HTTPS dann verhält, weiß ich grad nicht. Es kann sein, das du da noch ein Zertifikat für den Apache brauchst, das kann dann aber für internen Gebraucht natürlich auch ein selbst signiertes sein.
 
Oder so:
/etc/systemd/system/custom-firewall.service
Code:
[Unit]
After=pve-manager.service

[Service]
ExecStart=/usr/local/bin/custom-firewall.sh

[Install]
WantedBy=default.target

/usr/local/bin/custom-firewall.sh
Code:
#!/bin/bash
iptables -t nat -I PREROUTING -d _IP_ -p tcp --dport 443 -j DNAT --to-destination _IP_:8006

Und dann

Code:
chmod 744 /usr/local/bin/custom-firewall.sh
systemctl daemon-reload
systemctl enable custom-firewall.service
systemctl start custom-firewall.service
 

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!