Configure lxc container with 2 ip different subnets

webparadoxer

Member
Aug 31, 2016
3
0
6
48
Hi!
Please help me to configure network.
I just installet proxmox4.2 on debian 8.5
I have 2 ip in different subnet .

Primary network config
Code:
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

in container
Code:
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 not visible from the Internet.
Help correct config please do not get any.
What's wrong? How to fix ?!
 

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!