Subnetze anbinden

eliaskrbg

New Member
Nov 12, 2022
9
0
1
Hallo,
folgende Situation:
Ich habe einen Server bei Hetzner, Netzconfig s. u.
Zusätzlich habe ich ein /28er IPv4 Netz dort gebucht, wie kann ich dies anbinden? Bei einer Konfiguration bestehend aus Kopie der vmbr0 mit entsprechender Abänderung für die vmbr1 ist der Server nicht mehr erreichbar. Das Netz hat eine andere Netmask und das Gateway ist die Dedi-IP.
"ANDEREIP" kenne ich nicht. kam so von Hetzner.

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp8s0
iface enp8s0 inet static
address DEDI-IP/26
gateway DEDI-GW
up route add -net ANDEREIP netmask NETMASK gw DEDI-GW dev enp8s0
# route ANDEREIP/26 via DEDI-IP

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
address DEDI-IP/26
gateway DEDI-GW
address 10.0.0.1/24
bridge-ports enp8s0
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 vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE

iface vmbr0 inet6 static
address IPV6NETZ/64
gateway fe80::1
bridge-ports enp8s0
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
 

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!