nslookup在freebsd监狱里失败了

我发布在freebsd论坛上。 我一直在努力 ,我已经取得了一些进展,但仍然无法从我的freebsd监狱连接到互联网

请给我一个提示。

如果我是nslookup www.google.com我会在监狱里面看到以下内容:

 ;; connection timed out; no servers could be reached 

所以,我似乎无法在监狱里安装东西。 或者 ,有什么办法可以在我的主机系统上安装perl和starman ,并将其复制到监狱? 最后,我只需要安装这个东西,然后我想我的监狱closures互联网。

我尝试了各种各样的东西,从平原(1)监狱指挥,(2)ezjail,最后(3)qjail。 还干净地检查了freebsd源代码,并build立了一个buildworld。

这是我的networkingconfigurationifconfig -a

 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> xn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=503<RXCSUM,TXCSUM,TSO4,LRO> ether 12:31:39:1c:f0:bf inet 192.168.1.101 netmask 0xffffffff broadcast 192.168.1.101 inet 192.168.1.102 netmask 0xffffffff broadcast 192.168.1.102 inet 10.110.238.77 netmask 0xfffffe00 broadcast 10.110.239.255 inet 10.0.0.1 netmask 0xffffffff broadcast 10.0.0.1 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet manual status: active 

这是我的系统的其余部分:

cat /etc/rc.conf给我:

 # EC2 uses DHCP; the network interface appears as xn0. ifconfig_xn0="DHCP" ### Standard FreeBSD configuration from here onwards. sshd_enable="YES" ezjail_enable="YES" #for custom configs I hand made ifconfig_xn0_alias0="inet 192.168.1.101/32" ifconfig_xn0_alias1="inet 192.168.1.102/32" pf_enable="YES" 

cat /etc/pf.conf给我:

 ext_if="xn0" ##my network interface MY_JAIL="10.0.0.1" #redirect http traffic to daltons jail rdr pass on $ext_if inet proto tcp to port http -&gt; $MY_JAIL port http #enable outgoing traffic from jail to the internet via NAT nat on $ext_if from $MY_JAIL to any -&gt; $ext_if 

任何想法,线索或提示?

抱歉,挂断了连接问题,并没有意识到你只是想安装端口。

在主机系统上安装PortUpgrade,比手动获取软件包缺陷要容易得多:

 pkg_add -r portupgrade 

然后用它来获取包:

 portupgrade -NRFPP $PKG_NAME ie. portupgrade -NRFPP lang/perl5.14 

包文件将被转储到主机/usr/ports/packages/All 。 将他们复制到监狱。 从监狱安装:

 pkg_add /path/to/file/downloaded/perl5.14.tgz 

而鲍勃是你的叔叔。

我有时使用unionfs以便监狱有主机的Package目录; 删除复制步骤。 但是,在ZFS上UnionFS不起作用(ZFS没有Whiteout)。 ZFS的快照/克隆function使得监狱更容易。