Openvz container does not reach internet

  • Thread starter Thread starter proxem
  • Start date Start date
P

proxem

Guest
Hi,

I'm new to the forum, to linux and Proxmox.

I've installed Proxmox 1.9, in a test phase bridged configuration works well with openvz and kvm containers but I've some problems reaching internet with routed configuration.

I have a dlink router (192.168.0.1, dhcp disabled) connected to the ethernet port of my proxmox server.
This is my network configuration:

-server

Code:
   auto lo
   iface lo inet loopback
  
   auto eth0
   iface eth0 inet static
       address 192.168.0.196
       netmask 255.255.255.0
       gateway 192.168.0.1
       post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy-arp
 
  auto vmbr0
  iface vmbr0 inet static
      address 10.0.0.1
      netmask 255.255.255.0
      bridge_ports none
      bridge_stp off
      bridge_fd 0

ifconfig
eth0      Link encap:Ethernet  HWaddr 20:cf:30:39:c0:44
          inet addr:192.168.0.196  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::22cf:30ff:fe39:c044/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:403 errors:0 dropped:0 overruns:0 frame:0
          TX packets:392 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:36456 (35.6 KiB)  TX bytes:40672 (39.7 KiB)
          Interrupt:25 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet6 addr: fe80::1/128 Scope:Link
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:96 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:3 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5880 (5.7 KiB)  TX bytes:264 (264.0 B)

vmbr0     Link encap:Ethernet  HWaddr 3a:f5:75:ac:a8:09
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::38f5:75ff:feac:a809/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:588 (588.0 B)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.103      *               255.255.255.255 UH    0      0        0 venet0
10.0.0.0        *               255.255.255.0   U     0      0        0 vmbr0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0




-openvz container

etc/network/interfaces
Code:
# Auto generated lo interface
auto lo
iface lo inet loopback

# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
        up ifconfig venet0 up
        up ifconfig venet0 127.0.0.2
        up route add default dev venet0
        down route del default dev venet0
        down ifconfig venet0 down


iface venet0 inet6 manual

auto venet0:0
iface venet0:0 inet static
        address 10.0.0.103
        netmask 255.255.255.0




 ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.2  P-t-P:127.0.0.2  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:264 (264.0 B)  TX bytes:5880 (5.7 KiB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.0.0.103  P-t-P:10.0.0.103  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     0      0        0 venet0
default         *               0.0.0.0         U     0      0        0 venet0

From openvz container 10.0.0.103 I reach 192.168.0.196 but not 192.168.0.1 and internet
From proxmox server I reach 10.0.0.103 via ping and obviously ssh.

...while I'm writing, I see this message in router's log: "Dropped packet from 10.0.0.103 to 8.8.8.8 (IP protocol 1) as unable to create new session"

So, if my configuration is correct, and seems correct to me, how can I avoid packet drops?
Is there a workaround?

Thanks