So here is the setup I have.
A single, public, proxmox server running version 4.1-22.
It has a single NIC with a single public IP. And that is all I can get.
So naturally I am using NAT behind that public IP for my containers.
So on the physical host, Eth0 --> Vmbr0 /w public IP.
In addition I have setup new bridges on the host. One for each container network. For example.
vmbr150 - ip 10.150.150.254, network 10.150.150.0/24
vmbr50 - ip 10.50.50.254, network 10.50.50.0/24
etc. etc.
Then I have containers with their Eth0 tied to vmbr150 and an IP address of 10.150.150.XX and gateway of 10.150.150.254. The host has NAT rules allowing the containers to send traffic out of the network.
And then container in the 50 network setup in similar fashion.
From my host IPtables:
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.50.50.0/24 anywhere
MASQUERADE all -- 10.150.150.0/24 anywhere
MASQUERADE all -- 10.200.200.0/24 anywhere
This works pretty much perfectly all around. Except...
I was surprised when I was working in one of my containers in the 150 network that I could ping, SSH to, etc. a container in the .50 network.
So apparently the host is routing traffic from one network segment to another. I have tried fiddling with firewalls but that seemed to make no difference (when making changes at the NODE firewall level) or broke things (if I enabled the firewall on the Container's interface, even without any rules applied, it seemed to just break all networking). I started to fuss with VLANs but that just broke things. I am open to trying either though again if someone has a solution.
The goal is to more fully insulate the containers from on another so there isn't any cross-talk across internal network segments on the node.
Any ideas on how I could achieve this?
UPDATE:
BTW - I did a good deal of searching google first without much luck - I am usually pretty good about researching and figuring things out on my own but this had me pretty stumped....
Also, here is an example of the NAT rule I have tied to the vmbr50 interface on the physical host:
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.50.50.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.50.50.0/24' -o vmbr0 -j MASQUERADE
A single, public, proxmox server running version 4.1-22.
It has a single NIC with a single public IP. And that is all I can get.
So naturally I am using NAT behind that public IP for my containers.
So on the physical host, Eth0 --> Vmbr0 /w public IP.
In addition I have setup new bridges on the host. One for each container network. For example.
vmbr150 - ip 10.150.150.254, network 10.150.150.0/24
vmbr50 - ip 10.50.50.254, network 10.50.50.0/24
etc. etc.
Then I have containers with their Eth0 tied to vmbr150 and an IP address of 10.150.150.XX and gateway of 10.150.150.254. The host has NAT rules allowing the containers to send traffic out of the network.
And then container in the 50 network setup in similar fashion.
From my host IPtables:
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.50.50.0/24 anywhere
MASQUERADE all -- 10.150.150.0/24 anywhere
MASQUERADE all -- 10.200.200.0/24 anywhere
This works pretty much perfectly all around. Except...
I was surprised when I was working in one of my containers in the 150 network that I could ping, SSH to, etc. a container in the .50 network.
So apparently the host is routing traffic from one network segment to another. I have tried fiddling with firewalls but that seemed to make no difference (when making changes at the NODE firewall level) or broke things (if I enabled the firewall on the Container's interface, even without any rules applied, it seemed to just break all networking). I started to fuss with VLANs but that just broke things. I am open to trying either though again if someone has a solution.
The goal is to more fully insulate the containers from on another so there isn't any cross-talk across internal network segments on the node.
Any ideas on how I could achieve this?
UPDATE:
BTW - I did a good deal of searching google first without much luck - I am usually pretty good about researching and figuring things out on my own but this had me pretty stumped....
Also, here is an example of the NAT rule I have tied to the vmbr50 interface on the physical host:
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.50.50.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.50.50.0/24' -o vmbr0 -j MASQUERADE