Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Proxmox @Hetzner Setup
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Proxmox @Hetzner Setup

HalfHalf Member
edited April 2023 in Help

Hello!

I got a dedicated server at Hetzner and I'm trying to setup proxmox.
The OS itself is setup but the problem is the network configuration, I'm not sure how to do this.

I've been trying to follow their guide:
https://community.hetzner.com/tutorials/install-and-configure-proxmox_ve

But I'm failing..

This is my network/interfaces on the dedicated running proxmox.

# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

iface enp35s0 inet static
        address 168.119.10.148/26
        gateway 168.119.10.129
        up route add -net 168.119.10.128 netmask 255.255.255.192 gw 168.119.10.>
# route 168.119.10.128/26 via 168.119.10.129



iface enp35s0 inet6 static
        address 2a01:4f8:242:4117::2/128
        gateway fe80::1

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 168.119.10.148/32
        bridge-ports none
        bridge-stp off
        bridge-fd 0

iface vmbr0 inet6 static
        address 2a01:4f8:242:4117::2/128

Created a Linux Bridge inside Promox, named in vmbr0
Added IPv4/CIDR: 168.119.10.148/32
Autostart ticked.

What else is needed to make my LXC Container get internet accesss?
What am I missing, I've tried to look through the tutorial a few times, but networking is not simple.

I want to create a few LXC Containers and assign them their own IP.
I've bought a spare IPv4 address.

I had to re-install the server once because I messed up the networking so it was not able to connect after reboot.

Thanks,
Half

Comments

  • Welcome. Unfortunately, I am not really familiar with network setups, but I am sure some guys can help out here. @Falzo comes to mind. Maybe also @Abd may be able to help out as I remember their Germany location used to run on Hetzner (not 100% sure though)?

  • jeghjegh Member
    edited April 2023

    The Hetzner specific guide assumes you have ordered a subnet (or multiple invividual IPs) from Hetzner, and will be assigning each of your VMs public IP addresses from this subnet.

    If you only have one public IP address for your dedi, you will need to assign your VMs with private IP addresses and use NAT. In this case, on your vmbr0 interface you should enter a private range (such as 10.10.10.1/24) instead of the public IP (168.119.10.148/32). There should be plenty tutorials on Google on how to setup NAT on Proxmox.

    EDIT: Please disregard my post, I re-read the OP and realize you have ordered additional IPv4.

  • FalzoFalzo Member

    this has been covered a lot, even on here. for single addon IPs you need to use a bridged setup and request a virtual mac address for that IP within their control panel. this vmac you'll have to set as mac of your containers network interface. I suggest to read and research a bit more, I am sure you'll figure it out.

    Thanked by 1Ympker
  • If what you want is to have the LXC have internet access you need to add the following lines:

        post-up iptables -t nat -A POSTROUTING -s '172.17.0.0/12' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '172.17.0.0/12' -o vmbr0 -j MASQUERADE
    

    Change the IP address/subnet to the one you are assigning the LXC. YOu can find some more in detail guides on specific port routing, you can refer to this https://sumguy.com/proxmox-ip-bridge-for-single-public-ip/ I think it should work quickly looking at the commands.

Sign In or Register to comment.