Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed ubuntu server 12.04.

  1. I have installed LXC container.

  2. I started LXC container using lxc-start -n conrainername

  3. logged in using lxc-console -n contaniername -t 1.

  4. I prompted to login, I entered ubuntu/ubuntu as username and password.

  5. I try to configure network for LXC.

This is what I have tried

ubuntu@containername:$ nano /etc/network/interface

auto lxcbr0
iface eth0 inet static
    bridge_ports eth0
    address xxx.xxx.xxx.xxx #static IP
    netmask 255.255.255.xxx
    gateway xxx.xxx.xxx.xxx #our gateway Ip
    broadcast xxx.xxx.xxx.xxx
    dns-nameservers xx.xx.xx.xx xx.xx.xx.xx.xx

then I restarted lxcbr0 as

sudo ifdown lxcbr0
sudo ifup lxcbr0

after this I can able to ping LXC container's IP but not system IP or any other IP.

ping xxx.xxx.xxx.xxx (LXC container IP)
reachable 0% packet loss
ping 8.8.8.8 
Destination Host Unreachable 100% packet loss

what would be the problem?

Note: I have two static IPs to assign for both system and LXC container. Systems static IP is working fine but not LXC container.

share|improve this question
    
How did you configure the host ? iptables ? –  bodhi.zazen Nov 7 '13 at 17:26
    
@bodhi.zazen I never configure iptables, am new to ubuntu server so I don't know whether I should configure iptables or not. –  niren Nov 7 '13 at 17:30
    
@bodhi.zazen I tried to configure iptables. When I try to run this command iptables -t nat -L in LXC container, I got this error iptables can't initialize iptables table nat'. –  niren Nov 7 '13 at 19:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.