How to connect a jail to the web ?

Jack Raats jack at
Wed Aug 11 17:42:21 UTC 2010

It seems that you have DNS problems.
Login in your jail
go to /etc

Make a file called resolv.conf
which contains:

domain    your_jail_domain
nameserver    your_namerserver

and it will work...


PS sorry for the top posting.
I'm using outlook express :-(

----- Original Message ----- 
From: "Brice ERRANDONEA" <berrandonea at>
To: "Roland Smith" <rsmith at>; <freebsd-questions at>
Sent: Wednesday, August 11, 2010 5:35 PM
Subject: Re : How to connect a jail to the web ?

I tried all of this without any result. But I won't give up.

What I want is a jail with an Apache http server running inside. So, the 
must have a public IPv4 and access to the web.

What I'd understood of the jails' role (but I must have misunderstood) is 
it will have a different public ip than the host, so that if a pirate manage 
crack the server, he will only have access to the jail (the real public ip 
the host remaining secret). Then I'm surprised to learn that such traffic 
be routed through the host.

The jail is created. The next step now is to install the ports collection 
with portsnap fetch. But each time I try to run this command inside the jail
(with jexec), I get the same answer :

Looking up mirrors... none found.
Fetching public key from failed.
No mirrors remaining, giving up.

This makes me think my jail is not connected to the web. To check this, I 
to ping various know websites. When I tried domain names, like "ping", this error message appears :

ping: cannot resolve : Host name lookup failure

So, I can't contact DNS servers able to translate to its ip.
Since I know this ip, I tried : "ping". This time, the error
message is :

More information about the freebsd-questions mailing list