저는 현재 FreeBSD에 서버를 설정하려고 합니다. ezjails를 기반으로 감옥을 만들고 싶습니다수동. 예제를 따라 Jail 내부에 BIND를 설치했는데 설치 단계( make -C /usr/ports/dns/bind99 install clean
)에서 막혔습니다.
처음에는 DNS 문제가 있는 줄 알았는데(나쁨 /etc/resolv.conf
) 교도소 내부에는 인터넷이 전혀 안되는 것 같습니다.
호스트: (8.8.178.110은 www.freebsd.org입니다)
root@varda:~ # nc -z -w 2 8.8.178.110 80
Connection to 8.8.178.110 80 port [tcp/http] succeeded!
감옥 내부:
root@dns:~ # nc -z -w 2 8.8.178.110 80; echo $?
1
무슨 일이 일어났는지 아세요?
root@varda:~ # ezjail-admin list
STA JID IP Hostname Root Directory
--- ---- --------------- ------------------------------ ------------------------
DR 2 192.168.4.1 www /home/jails/www
2 lo1|127.0.1.1
DR 3 192.168.3.1 dns /home/jails/dns
3 lo2|127.0.2.1
( www
다른 감옥인데 저도 같은 문제가 있습니다)
root@varda:~ # ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 00:22:4d:ad:be:2a
inet ???.???.???.??? netmask 0xffffff00 broadcast ???.???.???.???
inet6 fe80::222:4dff:fead:be2a%em0 prefixlen 64 scopeid 0x1
inet6 2001:41d0:a:f231::1 prefixlen 128
inet 192.168.4.1 netmask 0xffffffff broadcast 192.168.4.1
inet 192.168.3.1 netmask 0xffffffff broadcast 192.168.3.1
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
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 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.1.1 netmask 0xffffffff
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo2: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.2.1 netmask 0xffffffff
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
root@dns:~ # ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 00:22:4d:ad:be:2a
inet 192.168.3.1 netmask 0xffffffff broadcast 192.168.3.1
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
lo2: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.2.1 netmask 0xffffffff
답변1
당신은 resolv.conf
안에 있어야 합니다/path/to/jails/etc/resolv.conf
이것시작하기 전에 제가 실제로 감옥에 가두었던 것의 전체 목록은 다음과 같습니다.