[SOLVED] help with the routed configuration?

JoseCabedo

New Member
Apr 25, 2016
2
0
1
47
Hi, i have a small cluster with 3 machines, all machine have only 1 nic each/one, i try to conect a small lan of containers cent os 7 with 10.10.10.0/24 lan to the real lan 192.168.10.0/24.
I use :
Routed Configuration
Most hosting providers do not support the above setup. For security reasons they disable networking as soon as they detect multiple MAC addresses on a single interface. See discussion on multiple subnets on proxmox using different gateways.

A common setup is a public IP (assume 192.168.10.2 for this example), and additional IP blocks for your VMs (10.10.10.1/255.255.255.0). For such situations we recommend the following setup:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1
post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp


auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0

-----------------------------------------------------------------------------------------------------------------------------------------------
from here : https://pve.proxmox.com/wiki/Network_Model

And , the internal lan (cent os conttainers) 10.10.10.0 connect ok among them , but only connect to 192.168.10.2 (default gateway conttainers) , and no connected to 192.168.10.1.(dns server)
From 192.168.10.0 lan dont have ping to cent os conttainers, only from the first cluster machine, from the others 2 machines dont have ping.

Please helpme to configure this, and sorry for my bad english :)
 
Hi, is already resolved.
I change the routed configuration for nat configuration.
Only add at the last line, to redirect the internal lan to eth0 exit, and now can ping to the dns server and internet

post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE

I can only do nat on the router to access the net 10.10.10.0 from the real network 192.168.10.0
 

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!