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've just installed ubuntu 11.10 under /var/chroot/oneiric following this tutorial. All seems to work properly, but unfortunatly I can't get the network working... I'd like to have a separate system to allow ssh login without access the real system...

I've the following /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.1.4
        netmask 255.255.255.0
        gateway 192.168.1.1

but when I reboot the physical server, and even when I run

sudo chroot /var/chroot/oneiric

It doesn't connect the network, I also ran sudo /etc/init.d/networking restart but all I got was being disconnected from the physical server (i'm using SSH). Then I needed to reboot the real server.

What am I missing?

share|improve this question
add comment

2 Answers

For my PXE servers I use a different /etc/network/interfaces configuration to use the existing IP from the PXE boot.

 iface eth0 inet manual
 pre-down false

If your problem is hostname resolution related, when using debootstrap it's necessary to manually configure your hosts file. I used an entry as follows:

 johnf@argon:~$ cat /etc/hosts
 127.0.0.1       localhost
 127.0.1.1       argon
share|improve this answer
add comment

To access the internet through your chrooted environment, please, check the DNS configuration inside /etc/resolv.conf file of your chrooted environment. Copy it from your physical server if its empty.

Now, to accomplish what you want, which is prevent your ssh users to access the real system using a chrooted environment, you shouldnt follow this tutotial you posted. This is to create a isolated environment to build debian/ubuntu packages.

You may want to follow this article.

Regards

share|improve this answer
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.