Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got dedicated Debian server with Proxmox as KVM manager and such IP example network:

IP address  175.19.59.209
Netmask     255.255.255.224
Gateway     175.19.59.193

Now I'm trying to configure subnets with such topology:

\\\\\\\\\\\\\\\\\\\\\\\\\
\\Gateway 175.19.59.193\\
\\\\\\\\\\\\\\\\\\\\\\\\\
 \
  +----------+
  | KVM-host |
  | eth0     |
  | vmbr0    |
  | vmbr1    |
  +----------+
    |
    |  +------+    +------+       +------+
    +--| vm01 |----| vm02 |--/ /--| vm09 |
       +------+    +------+       +------+

That's how my host machine interface is configurated now:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
    address  175.19.59.209
    netmask  255.255.255.224
    gateway  175.19.59.193
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

auto vmbr1
iface vmbr1 inet static
    address  10.10.11.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0

And this is guest machine vm01 configuration:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 10.10.11.12
    netmask 255.255.255.0
    gateway 10.10.11.1

The problem is that I can't ping vmXX out of host vice versa. Also I have no idea how to route vm01:80 to the Internet and back to make vm01 reverse proxy for 10.10.11.0/24 network.

What have I missed? Any advice for the networking "newby"?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

1) Ensure vmbr1 contains the tap devices for each VM:

brctl add vmbr1 tapX

2) Ensure iptables on the host allows bridge traffic:

iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT

3) Ensure you allow NAT via vmbr0:

echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE
share|improve this answer
    
1) With your help I've found wrong tap device name (I've set it vmbr1 and now it's netX device) –  Daniel Aug 26 '12 at 16:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.