S
S
S Pankov2016-08-31 18:12:46
LXC
S Pankov, 2016-08-31 18:12:46

How to properly setup proxmox with lxc container with 2ip on different subnets?

Hello.
Help to configure the network correctly.
We have proxmox4.2 installed on debian 8.5
AND 2 add. ip except the main one in different subnets.
This is the main machine config

cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
       	address  XXX.YY.64.168
# Hetzner primary WAN IP

        broadcast XXX.YY.64.191
        netmask   255.255.255.255
        pointopoint XXX.YY.64.161
        gateway   XXX.YY.64.161
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
       	up route add -net XXX.YY.64.168 netmask 255.255.255.224 gw XXX.YY.64.161 vmbr0

It's in a container
cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address XXX.YY.64.182
        netmask 255.255.255.255
# --- BEGIN PVE ---
        post-up ip route add XXX.YY.64.161 dev eth0
        post-up ip route add default via XXX.YY.64.161 dev eth0
        pre-down ip route del default via XXX.YY.64.161 dev eth0
        pre-down ip route del XXX.YY.64.161 dev eth0
# --- END PVE ---

auto eth1
iface eth1 inet static
        address XXX1.YYY1.198.35
        netmask 255.255.255.255
# --- BEGIN PVE ---
        post-up ip route add XXX1.YYY1.198.33 dev eth1
        post-up ip route add default via XXX1.YYY1.198.33 dev eth1
        pre-down ip route del default via XXX1.YYY1.198.33 dev eth1
        pre-down ip route del XXX1.YYY1.198.33 dev eth1
# --- END PVE ---

The second ip - XXX1.YYY1.198.35 is not visible from the Internet.
Help with the correct config pliz, it does not work in any way.
What's wrong? How to fix it?!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2016-08-31
@opium

probably you can hang both ips on the same poppy address in the hetzner admin panel and hang both ips on the same network interface, I did this recently on ovx
how to hang ips can be found in my recent question on the toaster, probably this was my last question on the toaster.

S
S Pankov, 2016-08-31
@seocoder

Puma Thailand can you look?! I will be very grateful.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question