Re: eth - NAT - Bridge - veth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux