Proxmox + Hetzner + 1 Public IP - Privates Lan erstellen (Problematik)

quappi

New Member
Mar 15, 2022
5
0
1
29
Hallo zusammen,

ich habe seit kurzem einen Dedi. Server bei Hetzner gemietet und bin sofort auf eine kleine Herausforderung gestoßen.


Ich habe nur eine öffentliche IP-Adresse und möchte bei dieser einen bleiben. Ich habe ein kleines privates Subnetz erstellt, das wie folgt aussieht:

/etc/network/interfaces
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback


iface lo inet6 loopback


auto enp9s0
iface enp9s0 inet static
        address xxxxx/26
        gateway xxxx
        up route add -net xxxx netmask 255.255.255.192 gw xxxx dev enp9s0
# gw


iface enp9s0 inet6 static
        address XXXX
        gateway fe80::1


auto vmbr99
iface vmbr99 inet static
        address 10.1.1.1
        netmask 255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '10.1.1.0/24' -o enp9s0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.1.1.0/24' -o enp9s0 -j MASQUERADE

Was ich zusätzlich getestet habe, ist das Folgende. Allerdings habe ich kein positives Ergebnis erhalten:
Beispiel:
Code:
iptables -t nat -A PREROUTING -d xxx -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.3:80

Meine VMS/LXC-Container können auf das Internet zugreifen. Allerdings kann ich z.B. auf den WebServer von EXTERN (VM1) über Port 80 nicht zugreifen. Woran könnte das noch liegen?
 
Last edited:
Versuch das in dein Network Configuration


Code:
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.1.1.3:80
 
Versuch das in dein Network Configuration


Code:
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.1.1.3:80
Hallo,

leider hat dies zu keinem positiven Ergebnis geführt
 

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!