LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 632|回复: 4

请大家帮忙看两个问题:关于blackhole和系统一直给我mail

[复制链接]
发表于 2004-11-19 10:51:05 | 显示全部楼层 |阅读模式
最近我在学习FreeBSD的时候遇到一点问题,我实在找不到答案了,请大家帮忙看看。

问题1:是关于sysctl的net.inet.udp.blackhole=1的。我把这句加到/etc/sysctl.conf
以后,启动到
Doing initial network setup:hostname.
rl0:flags=8843 <UP,BROCAST, RUNNING, SIMPLEX MULTICAST> mtu 1500
inet 192.168.1.5 netmask 0xffffff00
broadcast 192.168.1.5
ether 00:0a:eb:12:4c:8a
media:Ethernet autoselect (none)
status:no carrier
lo0:flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000

然后就停住了(注释掉"net.inet.udp.blackhole=1"后,正常启动时下一句为"filter sync'd")。按ctrl + C可以继续,不过filter sync'd没出现。
然后继续启动直到有一句:
Additional TCP Options:.
的地方停止。按ctrl+C仍然可以继续。登录以后,sysctl net.inet.udp.blackhole发现其值为1(没把这句加入sysctl.conf之前是0)。
ifconfig rl0 发现status为active.
之后我把"net.inet.udp.blackhole=1"注释掉,改为在rc.conf中"sysctl -w net.inet.udp.blackhole=1",问题依旧。


问题2:是关于系统一直给我mail的问题。
这个问题我也不知道是从什么时候开始出现的,系统每隔一段时间(有时几分钟,有时十几分钟)就给我mail,每次登录时都给我mail。内容都是一样的:
"
From: operator@Ocean.0dlimt.com (Cron Daemon)
To: operator@Ocean.0dlimt.com
Subject: Cron <operator@Ocean> /usr/libexec/save-entropy
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <ATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin>
X-Cron-Env: <HOME=/>
X-Cron-Env: <LOGNAME=operator>
X-Cron-Env: <USER=operator>
Status: RO

chroot: not found
"
开始以为是用chroot去ftpd -4的问题,不过后来去掉它问题依旧。过后我发现在启动时,在
Mounting root from ufs:/dev/ad0s3a
的地方,下一句出现
chroot:not found
chroot:not found
(的确是出现了两次)
 楼主| 发表于 2004-11-19 10:52:14 | 显示全部楼层

uname -a的输出

uname -a的输出:

FreeBSD Ocean.0dlimt.com 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Fri Nov 5 17:29:29 CST 2004 root@Ocean.0dlimt.com:/usr/src/sys/i386/compile/20041106 i386
 楼主| 发表于 2004-11-19 10:52:59 | 显示全部楼层

/etc/sysct.conf

/etc/sysct.conf:


# $FreeBSD: src/etc/sysctl.conf,v 1.7 2002/09/25 22:17:18 jmallett Exp $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#

# Uncomment this to allow users to only see information about processes that
# are being run under an equivalent UID.
#security.bsd.see_other_uids=0
#kern.ostype: FreeBSD
#kern.osrelease: 5.0-RELEASE
#kern.osrevision: 199506
#kern.version: FreeBSD 5.0-RELEASE #2: Sun Mar 21 09:05:47 CST 2004
# root@Ocean.0dlimt.com:/usr/src/sys/i386/compile/20040322

net.inet.tcp.msl=7500
net.inet.tcp.blackhole=2
#net.inet.udp.blackhole=1
net.inet.icmp.icmplim=50
kern.ipc.somaxconn=32768
kern.ipc.maxsockbuf=2097152
kern.maxfiles=65536
kern.maxfilesperproc=32768
net.inet.tcp.delayed_ack=0
net.inet.tcp.sendspace=65535
net.inet.tcp.recvspace=65535
net.inet.udp.recvspace=65535
net.inet.udp.maxdgram=57344
net.local.stream.recvspace=65535
net.local.stream.sendspace=65535
net.inet.tcp.syncookies=1
vfs.vmiodirenable=1

#Tweaked IPF parameters
net.inet.ipf.fr_tcpclosewait=120
net.inet.ipf.fr_tcplastack=120
net.inet.ipf.fr_tcptimeout=240
net.inet.ipf.fr_tcpclosed=50
net.inet.ipf.fr_tcphalfclosed=300
net.inet.ipf.fr_udptimeout=90
net.inet.ipf.fr_icmptimeout=35
 楼主| 发表于 2004-11-19 10:54:01 | 显示全部楼层

/etc/rc.conf

/etc/rc.conf


# -- sysinstall generated deltas -- # Sun Mar 21 07:38:07 2004
# Created: Sun Mar 21 07:38:07 2004
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.1.5"
hostname="Ocean.0dlimt.com"
ifconfig_rl0="inet 192.168.1.5 netmask 255.255.255.0"
kern_securelevel_enable="NO"
linux_enable="YES"
sendmail_enable="NO"

#named_enable="YES"
#named_flags="-u bind -g bind -t /var/chroot/dns/ /etc/namedb/named.conf"

#gateway_enable="NO"
fsck_y_enable="YES"

syslogd_enable="YES"
syslogd_flags="-ss"

sshd_enable="YES"
usbd_enable="YES"
chroot /var/chroot/ftpd /usr/libexec/ftpd.sh

#IPF
ipfilter_enable="YES"
ipfilter_program="/sbin/ipf"
ipfilter_rules="/etc/ipf.rules"

#SYN-FIN
tcp_drop_synfin="YES"

#ICMP
icmp_drop_redirect="YES"
icmp_log_redirect="YES"

#IPNAT
#ipnat_enable="YES"
#ipnat_program="/sbin/ipnat"
#ipnat_rules="/etc/ipnat.rules"

update_motd="NO"
#log_in_vain="YES"
#accounting_enable="YES"
#clear_tmp_enable="YES"
 楼主| 发表于 2004-11-19 10:54:46 | 显示全部楼层

核心配置文件

核心配置文件


# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.369.2.2 2002/12/31 05:35:45 scottl Exp $

machine i386
cpu I686_CPU
ident kern20041106
maxusers 0

#To statically compile in device wiring instead of /boot/device.hints
#hints "GENERIC.hints" #Default places to look for devices.


options INET #InterNETworking
options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options UFS_DIRHASH #Improve performance on big directories
options MD_ROOT #MD is a potential root device
options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
options PROCFS #Process filesystem (requires PSEUDOFS)
options PSEUDOFS #Pseudo-filesystem framework
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options CPU_ENABLE_SSE
options AUTO_EOI_1
options NMBCLUSTERS=8192
options _KPOSIX_PRIORITY_SCHEDULING
options DEVICE_POLLING
#IPF
options IPFILTER #ipfilter support
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
options HZ=1000 #for a smooth sceduling
#NETWORK SECURITY
options IPSTEALTH #support for stealth forwarding
options RANDOM_IP_ID
options TCP_DROP_SYNFIN #drop TCP packets with SYN+FIN

#OPTION
makeoptions CONF_CFLAGS=-fno-builtin #Don't allow use of memcmp,etc
options PANIC_REBOOT_WAIT_TIME=0
options MAXCONS=4
options SC_HISTORY_SIZE=20

# To make an SMP kernel, the next two are needed

device isa
device eisa
device pci

# Floppy drives
device fdc

# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
device atapicd # ATAPI CDROM drives
device atapifd # ATAPI floppy drives
options ATA_STATIC_ID #Static device numbering


# SCSI peripherals
device scbus # SCSI bus (required)
device da # Direct Access (disks)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
device atkbd # AT keyboard
device vga
# syscons is the default console driver, resembling an SCO console
device sc

device agp # support several AGP chipsets

# Floating point support - do not disable.
device npx

# Add suspend/resume support for the i8254.
device pmtimer

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device rl # RealTek 8129/8139

# Pseudo devices - the number indicates how many units to allocate.
device random # Entropy device
device loop # Network loopback
device ether # Ethernet support
device pty # Pseudo-ttys (telnet etc)
device md # Memory "disks"
device bpf #Berkeley packet filter

# USB support
device uhci # UHCI PCI->USB interface
device ohci # OHCI PCI->USB interface
device usb # USB Bus (required)
#device udbp # USB Double Bulk Pipe devices
device ugen # Generic
device uhid # "Human Interface Devices"
device umass # Disks/Mass storage - Requires scbus and da
device ums # Mouse
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表