Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2001 18:59:17 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   /usr/bin/host doesn't work in jail ...?
Message-ID:  <200106041659.SAA23372@lurza.secnetix.de>

next in thread | raw e-mail | index | archive | help
Hi,

# host ftp.freebsd.org
ftp.freebsd.org is a nickname for ftp.beastie.tdk.net
ftp.beastie.tdk.net has address 62.243.72.50
# jail / `hostname` <MY_IP_HERE> /bin/sh
# host ftp.freebsd.org
Host not found, try again.
# 

I'm at a loss right now.  nslookup doesn't work either when
used within a jail, but works fine outside.  The IP number
is OK.  Everything seems to be OK.  It's a FreeBSD 4.3.

I ktraced /usr/bin/host both outside and inside the jail.
The difference occurs when it tries to connect to a socket
(after reading /etc/resolv.conf).  This is the UDP socket
to the nameserver, I guess.

   [...]
   84730 host     CALL  socket(0x2,0x2,0)
   84730 host     RET   socket 3
   84730 host     CALL  connect(0x3,0x12087231c,0x10)
   84730 host     RET   connect -1 errno 22 Invalid argument

When outside of the jail, the connect() succeeds (RET 0).
I even considered rebooting the box, just to see if that
helps.  Yes, I'm desperate.  :-)

Does anyone have a clue what's going on here?

Oh by the way:  When I enter the jail, the configuration of
the lo0 interface gets deleted (and I can't bring it back
within the jail):

# ifconfig lo0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
# jail / `hostname` <MY_IP_HERE> /bin/sh
# ifconfig lo0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
# ifconfig lo0 inet 127.0.0.1 netmask 0xff000000
ifconfig: ioctl (SIOCDIFADDR): permission denied
# 

Is this expected behaviour, or is something wrong there?
I don't think it has something to do with the /usr/bin/host
problem, though, because host does still work fine outside
of the jail if I delete the lo0 interface manually.

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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