Last active
July 28, 2023 14:09
-
-
Save Iryos/75e1887b68bf6a89a57d96d1a997ac35 to your computer and use it in GitHub Desktop.
Proxmox Hetzner 1 IPv4 and IPv6 /64 Subnet Interfaces Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Install net-tools for 'route' Command on Proxmox Host ### | |
| apt install -y net-tools | |
| ### /etc/network/interfaces config ### | |
| auto lo | |
| iface lo inet loopback | |
| iface enp34s0 inet manual | |
| auto vmbr0 | |
| iface vmbr0 inet static | |
| address xxx.xxx.xxx.xxx/xx # Hetzner IPv4 Address | |
| gateway xxx.xxx.xxx.xxx # Hetzner IPv4 Gateway Address | |
| bridge-ports enp34s0 | |
| bridge-stp off | |
| bridge-fd 0 | |
| post-up echo 1 > /proc/sys/net/ipv4/ip_forward | |
| post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 172.17.17.2 | |
| post-up iptables -t nat -A PREROUTING -i vmbr0 -p udp -j DNAT --to 172.17.17.2 | |
| iface vmbr0 inet6 dhcp | |
| post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding | |
| post-up route -A inet6 add default gw fe80::1 dev vmbr0 | |
| #Hetzner-WAN | |
| auto vmbr1 | |
| iface vmbr1 inet static | |
| address 172.17.17.1/30 | |
| bridge-ports none | |
| bridge-stp off | |
| bridge-fd 0 | |
| post-up iptables -t nat -A POSTROUTING -s '172.17.17.0/30' -o vmbr0 -j MASQUERADE | |
| post-down iptables -t nat -D POSTROUTING -s '172.17.17.0/30' -o vmbr0 -j MASQUERADE | |
| iface vmbr1 inet6 static | |
| address fdf4:26e0:eac5::1/48 # ULA IPv6 Address | |
| post-up route -A inet6 add 2a01:4f8:222:100c::/64 gw fdf4:26e0:eac5::2 | |
| #FW-WAN | |
| auto vmbr1000 | |
| iface vmbr1000 inet manual | |
| bridge-ports none | |
| bridge-stp off | |
| bridge-fd 0 | |
| #VM-LAN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment