From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: Vijay Viswanathan <vijay.vishy@gmail.com>
Cc: Netfilter Users Mailing list <netfilter@vger.kernel.org>
Subject: Re: eth - NAT - Bridge - veth
Date: Fri, 27 Jun 2014 12:44:47 +0200 [thread overview]
Message-ID: <53AD4B1F.1000705@plouf.fr.eu.org> (raw)
In-Reply-To: <CALPbv1_LnTW-F+xagDb6MU4pOgarNH6BousUbXkuzKNixXZHbA@mail.gmail.com>
Hello,
Vijay Viswanathan a écrit :
> I have a setup where
> lxc ( container/light weight sandbox ) brings up veth and setsup IP as
> 192.168.10.2. and runs telnet server ( on port 2300 )
>
> I created a bridge with IP 192.168.10.2 attaching the veth.
Why ?
Note : the address on br0 is different in the output of ifconfig.
Is 192.168.10.2 the address of the container or the host ?
> After the route setup, the host ( with eth1: 10.4.38.222 )
Note : the address on eth1 is different in the output of ifconfig.
> is able to ping the veth ( 192.168.10.2 ) and vice versa.
Vice versa ? What do you mean exactly ? What commands do you run ?
> Now how do I connect to the telnet server on 192.168.10.2: 2300 from
> 10.4.3x.xxx network ?
Assuming the routing is properly set up on the network (i.e. hosts on
the network or the default router have a route to 192.168.10.0/24 with
gateway 10.4.38.182) and forwarding is enable on the host
(net.ipv4.ip_forward=1), just run :
$ telnet <container_address> 2300
> I guess I need some kind of NAT rules
Only as a last resort if you cannot setup proper routing on the network.
> also tried adding :
>
> # brctl addif br0 eth1
If you add eth1 to the bridge, then you must :
- move the IP address from eth1 to br0,
- use an IP address in the external network subnet for the container.
next prev parent reply other threads:[~2014-06-27 10:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 4:51 eth - NAT - Bridge - veth Vijay Viswanathan
2014-06-27 10:44 ` Pascal Hambourg [this message]
2014-06-27 15:54 ` Vijay Viswanathan
2014-06-27 17:51 ` Pascal Hambourg
2014-06-27 18:29 ` Vijay Viswanathan
2014-06-27 19:18 ` Pascal Hambourg
2014-06-27 20:08 ` Vijay Viswanathan
2014-06-27 20:23 ` Vijay Viswanathan
2014-06-27 21:38 ` Pascal Hambourg
2014-06-27 23:09 ` Vijay Viswanathan
2014-06-27 20:39 ` Neal Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53AD4B1F.1000705@plouf.fr.eu.org \
--to=pascal@plouf.fr.eu.org \
--cc=netfilter@vger.kernel.org \
--cc=vijay.vishy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.