Proxmox Newbie is looking for Help with Networking

maverekt

New Member
Jul 23, 2019
2
0
1
31
Hey Guys,

to me:
Still at trainee and therefore all my connection with hypervisors was backend with vSphere.

My Specs:
1x single ipv4 for the proxmox itself
1x /64 Subnet
Server is standing at Hetzner.
I want to use Proxmox to deploy a few services for myself including Seafile, Email and so on.

My Current Hostconfig looks like this:
I struggle with that and the clientconfig.
It would be amazing if you guys could help me out because google and trial and error did not help so far.

Code:
# Loopback device:
auto lo
iface lo inet loopback
iface lo inet6 loopback

# device: enp0s31f6
auto enp0s31f6
iface enp0s31f6 inet static
  # Single Host IPv4 address
  address   116.202.xxx.xxx
  netmask   255.255.255.192
  # The Hetzner Gateway IP
  gateway   116.202.xxx.xxx
  # route 116.202.xxx.xxx/26 via 116.202.xxx.xxx
  up route add -net 116.202.xxx.xxx netmask 255.255.255.192 gw 116.202.xxx.xxx dev enp0s31f6

iface enp0s31f6 inet6 static
  address 2a01:xxxx:xxxx:xxxx::2
  netmask 128
  gateway fe80::1

# VM-Bridge used by Proxmox Guests
auto vmbr0
iface vmbr0 inet static
  address 116.202.xxx.xxx
  netmask 255.255.255.192
  bridge_stp off
  bridge_ports none
  bridge_fd 0
  bridge_maxwait 0



iface vmbr0 inet6 static
  address 2a01:xxxx:xxxx:xxxx::2
  netmask 64
 
Last edited:
hi,

try something like this for your host config:

Code:
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
   address your.public.ip.address
   netmask 255.255.255.192
   gateway your.gateway.ip.address

iface eno1 inet6 static
   address your:ipv6:address:here::2
   netmask 64
   gateway gateway::1
   up sysctl -p

# for single-ip nat
auto vmbr0
iface vmbr0 inet static
   address 10.10.10.1
   netmask 255.255.255.255
   bridge_ports none
   bridge_stp off
   bridge_fd 0
    # NAT
   post-up echo 1 > /proc/sys/net/ipv4/ip_forward
   post-up   iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
   post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
   # add route for each new host here
   up ip route add 10.10.10.2/32 dev vmbr0
   up ip route add 10.10.10.3/32 dev vmbr0
   up ip route add 10.10.10.3/32 dev vmbr0

for the guest config something like this:

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
   address 10.10.10.4
   netmask 255.255.255.255
# --- BEGIN PVE ---
   post-up ip route add 10.10.10.1 dev eth0
   post-up ip route add default via 10.10.10.1 dev eth0
   pre-down ip route del default via 10.10.10.1 dev eth0
   pre-down ip route del 10.10.10.1 dev eth0
# --- END PVE ---

if you get stuck check here[0] and here[1]

[0]: https://pve.proxmox.com/wiki/Networ...ith_tt_span_class_monospaced_iptables_span_tt
[1]: https://community.hetzner.com/tutor...ure-proxmox_ve#step-2---network-configuration
 

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!