Configuring Proxmox Network

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?

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

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

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

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

This worked.

Awesome! Thank you.

2 Likes

This was needed too. Thanks.

1 Like

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:

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

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.

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.

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

1 Like

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

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.

After one year, I have to add another subnet to replace the other one and it’s not working.

I don’t want to create another Proxmox network thread so updating this old one.

My config is:

auto lo
iface lo inet loopback
 
auto enp2s0
iface enp2s0 inet static
    address 1.1.1.38
    netmask  255.255.255.255
    gateway 1.1.1.37
    pointopoint 1.1.1.37
 
auto vmbr0
iface vmbr0 inet manual
        bridge-ports none
        bridge-stp off
        bridge-fd 0
 
auto vmbr1
iface vmbr1 inet static
    address 2.2.2.40
    netmask 255.255.255.248
    bridge-ports none
    bridge-stp off
    bridge-fd 0
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward

# this is the new one
auto vmbr2
iface vmbr2 inet static
    address 3.3.3.160
    netmask 255.255.255.248
    bridge-ports none
    bridge-stp off
    bridge-fd 0
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
 
iface enp3s0 inet manual

Ping to 2.2.2.40 works fine, but I can’t get a reply from 3.3.3.160. Could this be related to my config or maybe the provider?

Hey guys don’t go to sleep! :frowning_face:

ping from where? maybe run a traceroute? did you reboot? :wink:

Ping from my pc.

I have not rebooted this server in almost two years and I don’t know what will happen :sweat_smile:

Traceroute reached 2.2.2.40, but it never ended with 3.3.3.160.

@Ryan finally helped me and it’s working fine now. I would like to know what and where was the issue though, so Ryan if you can share something when you have some time, it would be awesome.

Now I’m dealing with cPanel ip migration, but I can manage this one by myself… I think.

Nothing in your server was changed by me, I changed you back to a static route on the switching side after looking at your config and seeing everything was setup on the próxmox side for the static route, vs a routed subnet.

1 Like

Weird. The config was the same I wrote some posts before.

Anyway, I wish I have more servers with you. I’m surprised how fast you guys have replied to my tickets :smiley:

We are generally pretty quick, the bargain bin generally has some pretty good deals if you don’t want the latest and greatest. :wink:

2 Likes