<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
It's all one single broadcast network 10/8.<br>
The hosts could be even 10.0.0.{1,2,3,4}.<br>
<br>
In other words the container cannot be access through PREROUTING if
the source and target _physical_ machines are the same.<br>
<br>
tamas<br>
<br>
<br>
<div class="moz-cite-prefix">On 01/26/2014 11:41 PM, Alvaro Miranda
Aguilera wrote:<br>
</div>
<blockquote
cite="mid:CAHqq0eyOsj-hXaF-pKKLhuNf2yEJtcC11vrx9HcCrqO9Jd2+PQ@mail.gmail.com"
type="cite">
<div dir="ltr">for what I see, if you are using iptables
prerouting, then you need to use the IP that is on the same
network for both machines.
<div><br>
</div>
<div>if you want to go from one network to other separate, you
need to set routes, otherwise, the packages will go out to
0.0.0.0</div>
<div><br>
</div>
<div>From what I undestand in you network:</div>
<div><br>
</div>
<div>host 10.0.0.0</div>
<div>lxc1 10.1.0.0</div>
<div>lxc2 10.2.0.0</div>
<div><br>
</div>
<div>with /8 are separate networks, so you need to define a
router ip, and that ip should be visible</div>
<div><br>
</div>
<div>so, say from lxc1, you want to reach IPs in 10.2.0.0, then
lxc1 should have a leg on each network, and have a route rule.</div>
<div>Alvaro</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On Mon, Jan 27, 2014 at 10:09 AM, Tamas Papp <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:tompos@martos.bme.hu"
target="_blank">tompos@martos.bme.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
hi All,<br>
<br>
The problem may not be LXC only but I don't what the keyword
is to<br>
search for.<br>
<br>
<br>
Topology:<br>
<br>
---- inet ---- 1.2.3.4 firewall (DNAT) <a
moz-do-not-send="true" href="http://10.0.0.1/8"
target="_blank">10.0.0.1/8</a> ---- <a
moz-do-not-send="true" href="http://10.1.0.0/8"
target="_blank">10.1.0.0/8</a> lxc1 +<br>
<a moz-do-not-send="true" href="http://10.2.0.0/8"
target="_blank">10.2.0.0/8</a> lxc2<br>
<br>
<br>
On firewall:<br>
<br>
$ iptables -t nat -A PREROUTING -d 1.2.3.4 --dport smtp -j
DNAT --to<br>
<a moz-do-not-send="true" href="http://10.1.0.2:25"
target="_blank">10.1.0.2:25</a><br>
<br>
<br>
10.1.0.1 and 10.1.0.2 are containers on lxc01.<br>
10.2.0.2 is a container on lxc02.<br>
<br>
<br>
Test command:<br>
$ telnet 10.1.0.2 25<br>
<br>
<br>
It's failing from the <a moz-do-not-send="true"
href="http://10.1.0.0/8" target="_blank">10.1.0.0/8</a>
containers and lxc01.<br>
It's OK on containers on lxc02 (eg. 10.2.0.2).<br>
<br>
<br>
According to tcpdump packets reaching the iface 10.0.0.1 and
they're gone.<br>
Changing proxy_arp and rp_filter on 10.0.0.1 iface doesn't
help.<br>
<br>
<br>
Any idea?<br>
<br>
10x<br>
tamas<br>
<br>
_______________________________________________<br>
lxc-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a moz-do-not-send="true"
href="http://lists.linuxcontainers.org/listinfo/lxc-users"
target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
</blockquote>
<br>
</body>
</html>