I run Proxmox off a Hetzner dedi. Getting it installed was a pain but did it in the end. Have I configured networking properly?
/etc/network/interfaces:
/etc/network/interfaces.d/sdn:
/etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 123.123.123.123/26
gateway 123.123.123.124
bridge-ports eno1
bridge-stp off
bridge-fd 0
source /etc/network/interfaces.d/*
/etc/network/interfaces.d/sdn:
Code:
#version:6
auto vnet0
iface vnet0
address 10.0.0.1/24
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j SNAT --to-source 123.123.123.123
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j SNAT --to-source 123.123.123.123
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123 --dport 80 -i vmbr0 -j DNAT --to-destination 10.0.0.100:80
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123 --dport 443 -i vmbr0 -j DNAT --to-destination 10.0.0.100:443
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123--dport 587 -i vmbr0 -j DNAT --to-destination 10.0.0.100:587
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123--dport 993 -i vmbr0 -j DNAT --to-destination 10.0.0.100:993
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123--dport 143 -i vmbr0 -j DNAT --to-destination 10.0.0.100:143
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123--dport 25 -i vmbr0 -j DNAT --to-destination 10.0.0.100:25
post-up iptables -t nat -A PREROUTING -p tcp -d 123.123.123.123--dport 465 -i vmbr0 -j DNAT --to-destination 10.0.0.100:465
post-up iptables -t nat -A PREROUTING -p udp -d 123.123.123.123--dport 33275 -i vmbr0 -j DNAT --to-destination 10.0.0.100:33275
post-up iptables -t nat -A PREROUTING -p udp -d 123.123.123.123--dport 51820 -i vmbr0 -j DNAT --to-destination 10.0.0.100:51820
bridge_ports none
bridge_stp off
bridge_fd 0
ip-forward on