作者Clessin (Clemond)
看板FreeBSD
标题[问题] Apache2在开机过程中启动不了??
时间Sun Apr 18 09:53:50 2004
小弟在家是利用Hinet ADSL 2M/128Kbit拨接上网,向Hinet申请了一个固定IP(最近
开放的免费服务),并去www.adsldns.org由请了一个免费的DNS服务,来学习
用FreeBSD架站。
现正在学习ipfilter及ipnat的功能,参考了网路上众多的相关文件,已成功地
让区网内的WinXP透过FreeBSD上网(NAT),并在ipf.rules设定一些rules来做封包过滤。
但我发现下次开机後,Apache2就不能启动了,apache2在开机过程中出现了如下的讯息:
Local package initialization: httpd: Could not determine the server's fully
qualified domain name, using 127.0.0.1 for ServerName
我去找httpd-error.log,发现了底下的错误讯息:
No address associated with hostname: mod_unique_id: unable to find IPv4 address
of "test.adsldns.org" Configuration Failed
错误讯息说的很清楚,就是无法办别test.adsldns.org的IP位置(那个test是举例用的),
可是奇怪的是我确定我的FQDN是可用的,因为开机完後ping的到,而且手动输入
apachectl start可启动,但就是在开机过程中启动不了。不知原因为何? 还请各位
先进指点一二,谢谢! 我附上ppp.conf,rc.conf,ipf.rules,ipnat.rules。
---ppp.conf---
default:
set log Phase Chat LCP IPCP CCP tun command
set ifaddr 10.0.0.1/0 10.0.0.2/0
hinet:
set device PPPoE:rl0
set mru 1492
set mtu 1492
set speed sync
enable lqr
set lqrperiod 5
set authname
[email protected]
set authkey YYYYYYYY
set dial
set login
add default HISADDR
enable dns
---rc.conf-----
kern_securelevel_enable="YES"
kern_securelevel="2"
nfs_reserved_port_only="NONE"
sshd_enable="YES"
usbd_enable="YES"
# Network Setup
network_interfaces="auto"
defaultrouter="10.0.0.1"
hostname="test.adsldns.org"
ifconfig_rl0="inet 10.0.0.1 netmask 255.255.255.0 -arp"
ifconfig_rl1="inet 192.168.0.254 netmask 255.255.255.0"
# Enable PPP
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="hinet"
# Enable ipfilter&ipnat&ipmon
ipfilter_enable="YES"
ipnat_enable="YES"
ipmon_enable="YES"
ipmon_flags="-Ds"
syslogd_flags="-ss"
----ipf.rules---
pass in quick on lo0 all
pass out quick on lo0 all
pass in quick on rl1 all
pass out quick on rl1 all
# Outside interface
pass out quick on tun0 from any to any keep state
# Allow some services here
pass in quick on tun0 proto tcp from any to any port = 21 keep state
pass in quick on tun0 proto udp from any to any port = 21 keep state
pass in quick on tun0 proto tcp from any to any port = 22 keep state
pass in quick on tun0 proto udp from any to any port = 22 keep state
pass in quick on tun0 proto tcp from any to any port = 25 keep state
pass in quick on tun0 proto udp from any to any port = 25 keep state
pass in quick on tun0 proto tcp from any to any port = 80 keep state
pass in quick on tun0 proto udp from any to any port = 80 keep state
pass in quick on tun0 proto tcp from any to any port = 110 keep state
pass in quick on tun0 proto udp from any to any port = 110 keep state
pass in quick on tun0 proto tcp from any to any port = 443 keep state
pass in quick on tun0 proto udp from any to any port = 443 keep state
pass in quick on tun0 proto tcp from any to any port = 4662 keep state
pass in quick on tun0 proto udp from any to any port = 3312 keep state
# allow ping, traceroute
pass in quick on tun0 proto icmp from any to any icmp-type 0
pass in quick on tun0 proto icmp from any to any icmp-type 11
# block all remaining traffic in the good old fashioned way
block return-rst in log quick on tun0 proto tcp from any to any
block return-icmp-as-dest(port-unr) in log quick on tun0 proto udp from any to
any
block in log quick on tun0 all
-----ipnat.rules------
map tun0 192.168.0.0/24 -> 220.135.214.101/32
rdr tun0 220.135.214.101/32 port 4662 -> 192.168.0.1 port 4662
rdr tun0 220.135.214.101/32 port 3312 -> 192.168.0.1 port 3312 udp
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.231.68.187