imok
April 1, 2019, 2:06am
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
Any ideas?
imok
April 1, 2019, 2:07am
2
@Falzo I tried a config similar to yours but networking service failed to start.
sshd
April 1, 2019, 6:21am
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
Falzo
April 1, 2019, 9:31am
4
sorry for the delay, different timezones sometimes make things really difficult
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
2 Likes
WSS
April 1, 2019, 2:55pm
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
imok
April 1, 2019, 3:37pm
7
This was needed too. Thanks.
1 Like
imok
April 1, 2019, 6:03pm
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
Ryan
April 2, 2019, 5:05am
9
Your guess is as good as mine on this one. Are you doing containers or KVM?
5even
April 2, 2019, 6:20am
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.
imok
April 2, 2019, 2:38pm
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.
5even
April 2, 2019, 2:41pm
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
5even
April 2, 2019, 2:56pm
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
ashsg
April 2, 2019, 3:07pm
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.
imok
September 11, 2020, 3:16am
15
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!
Falzo
September 11, 2020, 5:16am
16
ping from where? maybe run a traceroute? did you reboot?
imok
September 11, 2020, 5:23am
17
Ping from my pc.
I have not rebooted this server in almost two years and I don’t know what will happen
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.
Ryan
September 11, 2020, 6:09am
18
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
imok
September 11, 2020, 6:14am
19
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
Ryan
September 11, 2020, 6:29am
20
imok:
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
We are generally pretty quick, the bargain bin generally has some pretty good deals if you don’t want the latest and greatest.
2 Likes