Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to run services like mysqld, apache and vsftpd in separated environment: w/o access to other processes, w/o access to devices, w/o access to binaries and don't execute uploaded files. As i understand linux containers are able to provide me with first 2, so I'm trying it. The problem is i want linux containers to share same ip so containers will actually just provide different services. Is that possible?

Thank you.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

The Debian Wiki page on LXC mentions two variants of accomplishing that using NAT on the host machine. I'm using the approach with libvirt and have had no problems with that so far.

The Wiki page may seem like a good information source, but the maintainer himself says that you should rather refer to the file /usr/share/doc/lxc/README.Debian for up-to-date information.

See this question, too

share|improve this answer
add comment

In order to share an IP address you'll have to have the primary server "be" the address and then port forward the services you want running on the other instances. You can accomplish portforwarding in linux using iptables (and a google or other search for "iptables port forwarding" returns many useful hits which I won't attempt to pick the best ones from).

share|improve this answer
    
i know about port forwarding, but i thought there are other ways to accomplish impmement this idea :( pity that chroot won't do, i can't limit it to don't allow device usage. –  Daniel Mar 20 '11 at 15:48
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.