Why does netstat not work in jails?

From: Chris H <bsd-lists_at_bsdforge.com>
Date: Thu, 27 Aug 2015 18:54:52 -0700
I've been attempting to run jails on an 11-CURRENT
for the purpose of building world/kernel && ports
for all of our 9-STABLE production servers. I'm using
standard/classic jail setup(s) -- not using any
of the "convenience" ports/applications that abstract
the process in any way.
While everything seemed to go as intended/anticipated,
I'm seeing things I *didn't* expect.
The host network get's it's "public" IP from the router
in front of it. From the router, I insure that it is
allocated the same non-public IP everytime. So DHCP
assigns it 192.168.0.100. I assigned the jail 192.168.0.103.
SSHD is started within the jail, root IS allowed login.
But any attempt to ssh to 192.168.0.103 from the host,
returns:
ssh_exchange_identification: Connection closed by remote host.

SSHD id NOT running on the host.

inetd_flags="-wW -a 192.168.0.100" and syslogd_flags="-ss"
is set on the host via rc.conf

second issue; loging into the jail, via jexex. If I perform:
netstat -nr
The following is returned:
netstat: kvm not available: /dev/mem: No such file or directory
Routing tables
rt_tables: symbol not in namelist

Any thought's jump out at anyone?

Thanks!

--Chris

--
Received on Thu Aug 27 2015 - 23:56:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:59 UTC