Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Apr 03, 2011 12:31 pm 
Offline
Senior Newbie

Joined: Sun Mar 27, 2011 2:12 pm
Posts: 8
How would you configure Linux containers on a Linode account? I would like to set up bridge interface and vlan for my containers. How should /etc/network/interfaces file look like? I have one public and one private address, and want to create multiple containers.

I was able to create a container and start it up (without vlan) however, it did not have access to the network, was closing my SSH session or crashed my host after 30-60 seconds. I think I have problem with basic network configuration. Could anyone guide me, please.


Top
   
 Post subject:
PostPosted: Sun Apr 03, 2011 1:05 pm 
Offline
Senior Newbie

Joined: Sun Mar 27, 2011 2:12 pm
Posts: 8
I forgot to mention some details - os: Ubuntu 10.04 LTS x64, kernel: 2.6.32-30, and I'm talking about 802.1q VLAN.


Top
   
 Post subject:
PostPosted: Sun Apr 03, 2011 1:42 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Without knowing what sort of 'container' is being used, it's difficult to know for sure. However, were you able to get network traffic from the container to the 'host' (your Linode, outside the container)? If that works, you'll need to set up NAT before you can get to the Internet (or even the internal inter-Linode network).

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Apr 03, 2011 1:58 pm 
Offline
Senior Newbie

Joined: Sun Mar 27, 2011 2:12 pm
Posts: 8
I use LXC linux containers. I followed steps described here: http://blog.bodhizazen.net/linux/lxc-configure-ubuntu-lucid-containers/. I also use this project to create containers: https://github.com/phbaer/lxc-tools/.

I could connect from host to container using lxc-console. I wasn't able to make any outgoing connection.


Top
   
 Post subject:
PostPosted: Sun Apr 03, 2011 5:18 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Yup, sounds like it needs NAT. The iptables steps from the OpenVPN guide should do the trick. Obviously, skip the openvpn and dnsmasq stuff in that section.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group