<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/20 Ola Lundqvist <span dir="ltr">&lt;<a href="mailto:ola@inguza.com" target="_blank">ola@inguza.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi<br>
<br>
It all depends on how you have done things. There are a few things<br>
that is not fully clear that you should probably add in a forum<br>
question.<br>
<br>
You mention that you use both venet and veth devices. It<br>
is not clear what you use in this situation.<br>
(To my knowledge only veth makes sense to use with vzbr).<br></blockquote><div><br></div><div>Yes, I&#39;m using both devices.<br><br></div><div>I&#39;ve added veth device to the vzbr201 device with private IP address, e.g. 192.168.201.2.<br>
<br></div><div>venet0 is used for public internet address, e.g. 1.2.3.4 <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
It is also not clear how you add veth to the bridge.<br></blockquote><div><br></div><div>I&#39;m adding it via /etc/vz/vznet.conf:<br><br>#!/bin/bash<br>EXTERNAL_SCRIPT=&quot;/usr/sbin/vznetaddbr&quot;<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
I guess you have read this article:<br>
<a href="http://openvz.org/Virtual_Ethernet_device" target="_blank">http://openvz.org/Virtual_Ethernet_device</a><br></blockquote><div><br></div><div>Did already.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Also it may be so that even though you have added them to<br>
different bridges, then the bridges may be connected to something<br>
common. It is not clear from the text below.<br></blockquote><div><br></div><div>How bridges can be connected to the same thing if they are different? <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Hope this helps for your forum question.<br>
<br>
Cheers,<br>
<br>
// Ola<br>
<div class="im"><br>
<br>
On Tue, Aug 20, 2013 at 12:53:23AM +0400, spameden wrote:<br>
&gt;    Yes, I have forwarding turned on.<br>
&gt;    # sysctl -a 2&gt;/dev/null|grep ip_forward<br>
&gt;    net.ipv4.ip_forward = 1<br>
&gt;    Surely, I can try to ban this via iptables, but it&#39;s so much hassle to<br>
&gt;    ban each time.<br>
&gt;    I thought it should &quot;work out out of the box&quot;..<br>
&gt;    Anyways, thanks for your point, I will try to post this on forums.<br>
&gt;<br>
</div>&gt;    2013/8/20 Ola Lundqvist &lt;[1]<a href="mailto:opal@debian.org">opal@debian.org</a>&gt;<br>
<div class="im">&gt;<br>
&gt;      Hi<br>
&gt;      This kind of question belong more on the openvz forum<br>
</div>&gt;      [2]<a href="http://forum.openvz.org/" target="_blank">http://forum.openvz.org/</a>.<br>
<div><div class="h5">&gt;      Please ask there.<br>
&gt;      However I think it is not worwarded through &quot;lo&quot;, instead I guess<br>
&gt;      you<br>
&gt;      have IP forwarding turned on in the kernel and as the kernel gets<br>
&gt;      aware<br>
&gt;      of those datagrams it will forward it to the correct place. To<br>
&gt;      prevent<br>
&gt;      that I guess you have to add some firewalling rules (see iptables).<br>
&gt;      But again, this better belong on the forum, and I may be totally<br>
&gt;      wrong.<br>
&gt;      Cheers,<br>
&gt;      // Ola<br>
&gt;<br>
&gt;    On Tue, Aug 20, 2013 at 12:04:42AM +0400, spameden wrote:<br>
&gt;    &gt;    Hi, list.<br>
&gt;    &gt;    I&#39;m sorry for copying 2 lists, but I really want to know what I&#39;m<br>
&gt;    doing<br>
&gt;    &gt;    wrong.<br>
&gt;    &gt;    I&#39;m using Debian 6 Squeeze and OpenVZ CentOS kernel (converted<br>
&gt;    from rpm<br>
&gt;    &gt;    to deb).<br>
&gt;    &gt;    I&#39;m using veth as well as venet devices for networking.<br>
&gt;    &gt;    To isolate multiple containers from each other I&#39;m using vzbrXXX<br>
&gt;    &gt;    devices on debian like this:<br>
&gt;    &gt;    auto vzbr203<br>
&gt;    &gt;    iface vzbr203 inet static<br>
&gt;    &gt;            address 192.168.203.1<br>
&gt;    &gt;            netmask       255.255.255.0<br>
&gt;    &gt;            broadcast       192.168.203.255<br>
&gt;    &gt;            bridge_ports none<br>
&gt;    &gt;            bridge_fd 0<br>
&gt;    &gt;            bridge_maxwait 0<br>
&gt;    &gt;    auto vzbr202<br>
&gt;    &gt;    iface vzbr202 inet static<br>
&gt;    &gt;            address 192.168.202.1<br>
&gt;    &gt;            netmask       255.255.255.0<br>
&gt;    &gt;            broadcast       192.168.202.255<br>
&gt;    &gt;            bridge_ports none<br>
&gt;    &gt;            bridge_fd 0<br>
&gt;    &gt;            bridge_maxwait 0<br>
&gt;    &gt;    The problem I&#39;m facing that in VE (for example with CTID 202) I<br>
&gt;    can<br>
&gt;    &gt;    ping or query 192.168.203.1 which is on HN of course, but I<br>
&gt;    thought it<br>
&gt;    &gt;    shouldn&#39;t be reachable.<br>
&gt;    &gt;    Here is route table and ifconfig on CTID 202:<br>
&gt;    &gt;    # ip r<br>
&gt;    &gt;    default dev lo  scope link<br>
&gt;    &gt;    # ifconfig -a<br>
&gt;    &gt;    lo        Link encap:Local Loopback<br>
&gt;    &gt;              inet addr:127.0.0.1  Mask:255.0.0.0<br>
&gt;    &gt;              inet6 addr: ::1/128 Scope:Host<br>
&gt;    &gt;              UP LOOPBACK RUNNING  MTU:16436  Metric:1<br>
&gt;    &gt;              RX packets:84021 errors:0 dropped:0 overruns:0 frame:0<br>
&gt;    &gt;              TX packets:84021 errors:0 dropped:0 overruns:0 carrier:0<br>
&gt;    &gt;              collisions:0 txqueuelen:0<br>
&gt;    &gt;              RX bytes:5045068 (4.8 MiB)  TX bytes:5045068 (4.8 MiB)<br>
&gt;    &gt;    venet0    Link encap:UNSPEC  HWaddr<br>
&gt;    &gt;    00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br>
&gt;    &gt;              BROADCAST POINTOPOINT NOARP  MTU:1500  Metric:1<br>
&gt;    &gt;              RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
&gt;    &gt;              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
&gt;    &gt;              collisions:0 txqueuelen:0<br>
&gt;    &gt;              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)<br>
&gt;    &gt;    So I guess it&#39;s going through lo device? Why and how can I block<br>
&gt;    this?<br>
&gt;    &gt;    Many thanks.<br>
&gt;<br>
&gt;      &gt; _______________________________________________<br>
&gt;      &gt; Debian mailing list<br>
</div></div>&gt;      &gt; [3]<a href="mailto:Debian@openvz.org">Debian@openvz.org</a><br>
&gt;      &gt; [4]<a href="https://lists.openvz.org/mailman/listinfo/debian" target="_blank">https://lists.openvz.org/mailman/listinfo/debian</a><br>
<div class="im">&gt;      --<br>
&gt;       --------------------- Ola Lundqvist ---------------------------<br>
</div>&gt;      /  [5]<a href="mailto:opal@debian.org">opal@debian.org</a>                     Annebergsslingan 37      \<br>
&gt;      |  [6]<a href="mailto:ola@inguza.com">ola@inguza.com</a>                      654 65 KARLSTAD          |<br>
&gt;      |  [7]<a href="http://inguza.com/" target="_blank">http://inguza.com/</a>                  +46 (0)70-332 1551       |<br>
<div class="im">&gt;      \  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /<br>
&gt;       ---------------------------------------------------------------<br>
&gt;<br>
</div>&gt; Referenser<br>
&gt;<br>
&gt;    1. mailto:<a href="mailto:opal@debian.org">opal@debian.org</a><br>
&gt;    2. <a href="http://forum.openvz.org/" target="_blank">http://forum.openvz.org/</a><br>
&gt;    3. mailto:<a href="mailto:Debian@openvz.org">Debian@openvz.org</a><br>
&gt;    4. <a href="https://lists.openvz.org/mailman/listinfo/debian" target="_blank">https://lists.openvz.org/mailman/listinfo/debian</a><br>
&gt;    5. mailto:<a href="mailto:opal@debian.org">opal@debian.org</a><br>
&gt;    6. mailto:<a href="mailto:ola@inguza.com">ola@inguza.com</a><br>
&gt;    7. <a href="http://inguza.com/" target="_blank">http://inguza.com/</a><br>
<span class=""><font color="#888888"><br>
--<br>
 --- Inguza Technology AB --- MSc in Information Technology ----<br>
/  <a href="mailto:ola@inguza.com">ola@inguza.com</a>                    Annebergsslingan 37        \<br>
|  <a href="mailto:opal@debian.org">opal@debian.org</a>                   654 65 KARLSTAD            |<br>
|  <a href="http://inguza.com/" target="_blank">http://inguza.com/</a>                Mobile: +46 (0)70-332 1551 |<br>
</font></span><div class=""><div class="h5">\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /<br>
 ---------------------------------------------------------------<br>
</div></div></blockquote></div><br></div></div>