[SOLVED] IPv4 NAT, IPv4 Subnet

eliaskrbg

New Member
Nov 12, 2022
15
0
1
Guten Tag,

aufgrund der horrenden IP Preise bei Hetzner habe ich eine vmbr0 mit internem NAT konfiguriert (klappt) und ein Subnet (28er) konfiguriert. Das klappt nicht.
Was mache ich falsch?

Liebe Grüße
-----
Good day,



Due to the horrendous IP prices at Hetzner, I have configured a vmbr0 with internal NAT (works) and configured a subnet (28). This does not work.

What am I doing wrong?



Kind regards


auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp8s0
iface enp8s0 inet static
address MAIN-IP/32
gateway GW-MAIN
echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp

auto vmbr0
iface vmbr0 inet static
address 10.0.0.1/24
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.0.0.0/24' -o enp8s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o enp8s0 -j MASQUERADE

auto vmbr1
iface vmbr1 inet static
address SUBNET-FIRST-USEABLE-IP/28
gateway MAIN-IP
bridge-ports none
bridge-stp off
bridge-fd 0
 
Das Problem ist vermutlich, die falsche Konfiguration der Gateways. Ich nehme an VMs sollen auf vmbr1 die IPs aus dem /28 subnet bekommen? Da müsstest du den gateway eintrag auf vmbr1 entfernen und stattdessen SUBNET-FIRST-USEABLE-IP/28 innerhalb der VMs als Gateway eintragen, dann sollte das funktionieren.

EDIT: post-up echo 1 > /proc/sys/net/ipv4/conf/eno0/proxy_arp
Diese Zeile müsste auch noch angepasst werden, statt eno0 hier den namen deines Network Interfaces eintragen (enp8s0)
 
Last edited:

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!