Hello Zeyang<br><br>I suggest doing a reverse DNS lookup from the host to check that the DNS name of the container is what you think it is<br><br> dig +short -x 10.0.3.195<br><br>I have seen a situation (running LXC inside EC2 instances) where an unexpected DNS name was being assigned to the guest by the wider system DNS.<br>
<br>I also see that you seem to be running the LXC network inside the guest as well as on the host (it too has an lxcbr0 bridge network). Is this intentional?<br><br>-Ben<br><br><div class="gmail_quote">On 6 July 2012 08:09, Li, Zeyang <span dir="ltr"><<a href="mailto:a.banknote@gmail.com" target="_blank">a.banknote@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I ran into a problem where I cannot ssh to containers but I could do<br>
the reverse and ssh to the host from inside containers.<br>
I'm doing this on ubuntu 12.04 and followed official tutorial. It<br>
looks like it should be rather painless and I should be able to access<br>
container through hostname or ip after booting it.<br>
<br>
Here is my container network setup, hostname "budda1"<br>
<br>
ubuntu@budda1:~$ ifconfig<br>
eth0 Link encap:Ethernet HWaddr 00:16:3e:8b:af:ba<br>
inet addr:10.0.3.195 Bcast:10.0.3.255 Mask:255.255.255.0<br>
inet6 addr: fe80::216:3eff:fe8b:afba/64 Scope:Link<br>
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br>
RX packets:44 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:1000<br>
RX bytes:6963 (6.9 KB) TX bytes:3248 (3.2 KB)<br>
<br>
lo Link encap:Local Loopback<br>
inet addr:127.0.0.1 Mask:255.0.0.0<br>
inet6 addr: ::1/128 Scope:Host<br>
UP LOOPBACK RUNNING MTU:16436 Metric:1<br>
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:0<br>
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)<br>
<br>
lxcbr0 Link encap:Ethernet HWaddr 1a:cf:ac:d0:2e:b0<br>
inet addr:10.0.3.1 Bcast:10.0.3.255 Mask:255.255.255.0<br>
inet6 addr: fe80::18cf:acff:fed0:2eb0/64 Scope:Link<br>
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br>
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:0<br>
RX bytes:0 (0.0 B) TX bytes:554 (554.0 B)<br>
<br>
<br>
Here is my host network setup.<br>
<br>
eth1 Link encap:Ethernet HWaddr 00:0b:e0:f0:00:ed<br>
inet addr:192.168.0.187 Bcast:192.168.0.255 Mask:255.255.255.0<br>
inet6 addr: fe80::20b:e0ff:fef0:ed/64 Scope:Link<br>
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br>
RX packets:3774669 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:19871338 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:1000<br>
RX bytes:325045419 (325.0 MB) TX bytes:28140974879 (28.1 GB)<br>
Interrupt:42 Base address:0xc000<br>
<br>
lo Link encap:Local Loopback<br>
inet addr:127.0.0.1 Mask:255.0.0.0<br>
inet6 addr: ::1/128 Scope:Host<br>
UP LOOPBACK RUNNING MTU:16436 Metric:1<br>
RX packets:9002 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:9002 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:0<br>
RX bytes:895944 (895.9 KB) TX bytes:895944 (895.9 KB)<br>
<br>
lxcbr0 Link encap:Ethernet HWaddr 42:41:2f:06:48:54<br>
inet addr:10.0.3.1 Bcast:10.0.3.255 Mask:255.255.255.0<br>
inet6 addr: fe80::4041:2fff:fe06:4854/64 Scope:Link<br>
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br>
RX packets:967 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:4742 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:0<br>
RX bytes:265702 (265.7 KB) TX bytes:362339 (362.3 KB)<br>
<br>
vethDRRJNv Link encap:Ethernet HWaddr ea:a8:65:4e:bc:af<br>
inet6 addr: fe80::e8a8:65ff:fe4e:bcaf/64 Scope:Link<br>
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1<br>
RX packets:25 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:1000<br>
RX bytes:3506 (3.5 KB) TX bytes:8848 (8.8 KB)<br>
<br>
vethNoOhWO Link encap:Ethernet HWaddr 42:41:2f:06:48:54<br>
inet6 addr: fe80::4041:2fff:fe06:4854/64 Scope:Link<br>
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1<br>
RX packets:169 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:817 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:1000<br>
RX bytes:29672 (29.6 KB) TX bytes:91511 (91.5 KB)<br>
<br>
vethmo7HuT Link encap:Ethernet HWaddr ca:34:1b:41:93:74<br>
inet6 addr: fe80::c834:1bff:fe41:9374/64 Scope:Link<br>
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1<br>
RX packets:228 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:1114 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:1000<br>
RX bytes:45992 (45.9 KB) TX bytes:110286 (110.2 KB)<br>
<br>
virbr0 Link encap:Ethernet HWaddr 8e:24:41:13:de:9a<br>
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0<br>
UP BROADCAST MULTICAST MTU:1500 Metric:1<br>
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:0<br>
<br>
Thanks,<br>
Zeyang<br>
<br>
------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
</blockquote></div><br>