Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Apr 2004 10:23:40 +0200
From:      Guy Antony Halse <guy@rucus.ru.ac.za>
To:        freebsd-questions@freebsd.org
Subject:   resolver not working in a jail
Message-ID:  <20040429082340.GA77842@rucus.ru.ac.za>

next in thread | raw e-mail | index | archive | help
I have a jail that can't resolve hostnames.  It's resolv.conf is identical
to the host machine's, but, whereas dns works fine on the host, when I try
and look up addresses within the jail, they always fail.

If I do a host -d, I get the following errors:

;; Querying server (# 1) address = 192.168.0.1
res_send: connect(dg) ([192.168.0.1].53): Invalid argument
;; Querying server (# 2) address = 192.168.0.2
res_send: connect(dg) ([192.168.0.2].53): Invalid argument
res_nsend failed

I can telnet from the jail to port 53 on the dns server, so it's not a
routing issue -- a tcp connect seems to work, but not a udp one?

My jail environment is set up in rc.conf as follows:

jail_enable="YES"
jail_socket_unixiproute_only="YES"
jail_set_hostname_allow="NO"
jail_list="webserver"
jail_webserver_rootdir="/wwwroot"
jail_webserver_hostname="vhost.ru.ac.za"
jail_webserver_ip="192.168.1.7"
jail_webserver_procfs_enable="NO"
jail_webserver_devfs_enable="YES"
jail_webserver_devfs_ruleset="4"

The jail is running a world that was installed with the following options:
DESTDIR=/wwwroot NO_FORTRAN=yes NO_GDB=yes NO_I4B=yes NO_IPFILTER=yes
NO_TOOLCHAIN=yes NO_USB=yes NO_LPR=yes NO_ACPI=yes NO_VINUM=yes NOMAN=yes
NO_SHAREDOCS=yes NO_X=yes NOGAMES=yes NOINFO=yes NOPROFILE=yes NOSHARE=yes
PPP_NOSUID=yes NO_KERBEROS=yes NO_CVS=yes NO_CXX=yes

it originally had NO_BIND=yes too, but I removed that in the vain hope it'd
fix my problem.  The same applies to jail_socket_unixiproute_only, which
I've tried as "NO".

The host system runs FreeBSD 5.2.1-RELEASE-p4

Any ideas would be appreciated,
- Guy
-- 
Systems Manager, IT Division, Rhodes University, Grahamstown, South Africa
Email: G.Halse@ru.ac.za   Web: http://mombe.org/  IRC: rm-rf@irc.zanet.net
*** ANSI Standard Disclaimer ***                                   J.A.P.H



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040429082340.GA77842>