Configuring Proxmox Network

#1

Hi. I recently got a server but I’m having trouble configuring the network.

Example of what I have

Network: 1.1.1.36/30
Gateway: 1.1.1.37
Primary IP: 1.1.1.38

Network: 2.2.2.40/29 static route

My /etc/network/interfaces

auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
    address 1.1.1.38
    netmask 255.255.255.255
    pointopoint 1.1.1.37
    gateway 1.1.1.37

auto vmbr0
iface vmbr0 inet static
    address 2.2.2.40
    netmask 255.255.255.248
    bridge_ports none
    bridge_stp off
    bridge_fd 0

iface enp3s0 inet manual

My VM

IPADDR="2.2.2.41"
PREFIX="32"
GATEWAY="1.1.1.38"

But it does not work :frowning_face:

Any ideas?

0 Likes

#2

@Falzo I tried a config similar to yours but networking service failed to start.

0 Likes

#3

Can you try with those lines added in the vmbr0 interface ?

    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up iptables -t nat -A POSTROUTING -o enp2s0 -j MASQUERADE
2 Likes

#4

sorry for the delay, different timezones sometimes make things really difficult :wink:

checking if ip forwarding is enabled is a good point!
for the guest I’d rather use the IP given to the bridge as gateway…

you shouldn’t need nat/masquerading though.

I send some more suggestions per skype as well… if you still can’t get it fixed, let’s try to schedule a time for a more direct conversation :wink:

2 Likes

#5

Be aware, @imok, that this may or may not involve nakedness, a blender, and several DDR2 RAM sticks. @Falzo has his own methods of doing things.

5 Likes

#6

This worked.

Awesome! Thank you.

2 Likes

#7

This was needed too. Thanks.

1 Like

#8

This configuration is using 2 public IPs for the host. One IP from each network and it looks like a waste for me.

Tagging @Ryan, maybe he has some ideas :roll_eyes:

0 Likes

#9

Your guess is as good as mine on this one. Are you doing containers or KVM?

0 Likes

#10

Hah, nice. Just yesterday I took a bit of time to change my Proxmox VE network config around, as well. What seems to work quite well for me is nginx as a reverse proxy to get the SSL setup a bit more nicely.
If you want, I can post my config - I’m only using one IP as of now but hope I will get around to set up the second one.

0 Likes

#11

KVM only.

I’m trying to find a way to use only one public IP address. This didn’t work.

May I know why? It’s done automatically from the GUI in seconds.

0 Likes

#12

It was mostly so I don’t have to use port 8006
There’s probably an option to do that by now…

1 Like

#13

If you find out how to properly do that network config, let me know - it appears not to be working as well as I initially thought

0 Likes

#14

I’m guessing the machine is @ hetzner.

If so and your using a subnet that is the only setup you can do that works on their network.

Due to the setup you have to have one of the extra IP’s on the host to handle the routing from that subnet as you currently have working.

0 Likes