Sun Microsystems公司于前不久發(fā)布了它的新一代的旗幟性軟件產(chǎn)品線:適用于SPARC
和Intel兩種計(jì)算機(jī)的新的Solaris 7 軟件環(huán)境。Solaris 7產(chǎn)品系列包括基本的
Solaris 7操作環(huán)境和3個(gè)模塊化軟件擴(kuò)展版本(Solaris Easy access Server,Solaris
EnterPRise Server,Solaris ISP Server)--每個(gè)擴(kuò)展版本都在基本的Solaris 7操作
環(huán)境上運(yùn)行。新的產(chǎn)品線主要具有以下特點(diǎn):
1. 處理數(shù)據(jù)的能力大為增加,不僅數(shù)據(jù)量沒(méi)有什么限制,計(jì)算的復(fù)雜性也有突破,
為新一級(jí)的應(yīng)用軟件敞開(kāi)了大門(mén)。
2. 大型機(jī)的能力,而價(jià)格只有大型機(jī)的幾分之一。
3. 具有對(duì)PC機(jī)的完全互操作性,可使客戶連接和管理他們的Windows NT環(huán)境與
Solaris環(huán)境一樣。
4. 具有PC機(jī)簡(jiǎn)易管理的新風(fēng)格,大大簡(jiǎn)化了安裝與管理。
不僅如此,該版本的Solaris還具有強(qiáng)大的軟件支持,其中包括了Sun Visual WorkShop
C++ 5.0軟件和Sun Performance WorkShop Fortran 5.0軟件,并為C/C++和
Fortran的開(kāi)發(fā)商開(kāi)發(fā)企業(yè)級(jí)應(yīng)用軟件提供了具有競(jìng)爭(zhēng)性的優(yōu)勢(shì)。Solaris 7具有全新中
文版本,中文版本不僅具有多種中文輸入方式、靈活地支持中文的輸出,同時(shí)方便地接
收中文郵件和進(jìn)行字體轉(zhuǎn)換彌補(bǔ)了過(guò)去Solaris在這方面的不足。Solaris 7與 Windows
無(wú)縫連接,從而使用戶可以進(jìn)行簡(jiǎn)單明了的操作和管理。在Solaris 7中,Sun公司著重考
慮了健壯和安全的問(wèn)題,提供了一系列的現(xiàn)代化的安全機(jī)制,同時(shí)修補(bǔ)了安全漏洞和系統(tǒng)
BUG,使得Solaris 7具有相當(dāng)可靠的安全性和健壯性,將用戶的風(fēng)險(xiǎn)降到了最低的限度。
綜上所述,Solaris 7是適用于企業(yè)網(wǎng)的操作系統(tǒng)。
一、相關(guān)站點(diǎn)
1.Solaris軟件免費(fèi)下載站點(diǎn):
http://www.sunfreeware.com/
2.solaris 咨詢站
http://www.ibiblio.org/pub/packages/solaris/sparc/
3.solaris中文手冊(cè):
http://docs.sun.com/ab2?Ab2Lang=zh&Ab2Enc=gb2312
4.UNIX depot
http://www.cise.ufl.edu/depot/
5.solaris中心
http://www.solariscentral.org/
二、重新配置系統(tǒng)核心
舉例: Oracle 8 for solaris 2.6 安裝的安裝需要增加Shared Memory Segments;
修改/etc/system文件,在文件后加上
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=15
set semsys:seminfo_semmns=200
set semsys:seminfo_semmni=70
set ulimit=3000000
比如innd用的文件數(shù)目比較多,需要設(shè)置:
set rlim_fd_max=4096
set rlim_fd_cur=1024
如何看系統(tǒng)默認(rèn)值;
先看系統(tǒng)默認(rèn)值,超級(jí)用戶可以用-k參數(shù)來(lái)看核心的各個(gè)參數(shù),如果指定-w參數(shù),則可
以
adb - general-purpose debugger
可以看現(xiàn)在的值是什么?
/usr/bin/adb –kw
physmem 1f8d9
maxusers/D
maxusers:
maxusers: 504
maxusers/W 200
maxusers: 0x1f8 = 0x200
(1)IO相關(guān)的設(shè)置
最經(jīng)常需要改變的是文件描述符數(shù)因?yàn)镾OCKET API處理INTERNET連接使用文件描述符,
set rlim_fd_max = 8192
set rlim_fd_cur = 4096
Please, before you start, make a backup copy of your initial /etc/system.
The backup should be located on your root filesystem. Thus, if some
parameters fail, you can always supply the alternative, original system
file on the boot prompt. The following shows two typically entered
parameters:
* these are the defaults of Solaris < 8
set rlim_fd_max=1024
set rlim_fd_cur=64
rlim_fd_cur
這個(gè)參數(shù)定義了一個(gè)進(jìn)程可以打開(kāi)文件描述符的“軟”限制,該數(shù)目由當(dāng)前運(yùn)行的SHELL
決定;ulimit –Sn,還可以通過(guò)setrlimit()函數(shù)來(lái)修改這個(gè)參數(shù);不需要超級(jí)用戶權(quán)
限;
The predicate rlim_fd_cur <= rlim_fd_max must be fulfilled.
rlim_fd_max
default 1024, recommended >=4096
這個(gè)參數(shù)決定了一個(gè)進(jìn)程可以打開(kāi)文件描述符的“硬”限制;如果想改變?cè)撓拗?,必?nbsp;
有超級(jí)用戶的權(quán)限;
對(duì)于大多數(shù)SERVER,不管使用TCP還是UDP進(jìn)行通訊,最大描述符數(shù)是每個(gè)用戶進(jìn)程的最
重要的參數(shù);文件描述符決定了同時(shí)可以連接的數(shù)目;
ulimit -Hn
You should consider a value of at least 2 * tcp_conn_req_max and you
should provide at least 2 * rlim_fd_cur. The predicate rlim_fd_cur <=
rlim_fd_max must be fulfilled.
(2)進(jìn)程相關(guān)的設(shè)置
maxusers
default 249 ~= Megs RAM (Ultra-2/2 CPUs/256 MB), min 8, max 2048, no
recommendations
最大用戶定義系統(tǒng)可以支持的最大用戶數(shù),當(dāng)核心生成的過(guò)程中,有一些表的大小就是
由這個(gè)參數(shù)決定的。這個(gè)值的大小在當(dāng)前SOALRIS版本中決定于內(nèi)存的兆數(shù)目;有一些參
數(shù)是由MAXUSER來(lái)決定的,
_ The maximum number of processes on the system
_ The number of quota structures held in the system
_ The size of the directory name lookup cache(DNLC)
默認(rèn)值是系統(tǒng)內(nèi)存兆數(shù),小于2048;
如果大于1024,必須在/etc/system中指定,如果大于4096,它的值為4096;
當(dāng)系統(tǒng)出現(xiàn)用戶進(jìn)程生成(FORK)緩慢時(shí),系統(tǒng)報(bào)信息;
out of processes
默認(rèn)值比較大有以下情況:
數(shù)據(jù)庫(kù)系統(tǒng)使用較大內(nèi)存,但相對(duì)少的進(jìn)程,減少M(fèi)AXUSERS的值,可以節(jié)省系統(tǒng)內(nèi)存;
PIDMAX
這個(gè)參數(shù)指定系統(tǒng)最大可能進(jìn)程ID; 默認(rèn)值為30000,范圍為266到999999;只在啟動(dòng)
時(shí)候進(jìn)行設(shè)置;
max_nprocs
系統(tǒng)最大進(jìn)程數(shù),包含系統(tǒng)進(jìn)程和用戶進(jìn)程;默認(rèn)值為為10+(16*MAXUSERS)
該值范圍為266到MAXPID;
基于Intel i386體系結(jié)構(gòu)的linux操作系統(tǒng)中,已經(jīng)提供了這樣的多進(jìn)程運(yùn)行的支持。
通過(guò)合理的選擇進(jìn)程調(diào)度算法,可以獲得比較好的平均相應(yīng)時(shí)間和較高的系統(tǒng)性能。但
是,美中不足的是,在目前的2.2.x版本的Linux內(nèi)核中,存在對(duì)最大進(jìn)程數(shù)的限制。也
就是說(shuō),在目前的Linux系統(tǒng)中,最多只能有4090個(gè)用戶進(jìn)程同時(shí)存在。對(duì)于一般的桌面
應(yīng)用,這個(gè)數(shù)目是綽綽有余。但是,對(duì)于企業(yè)級(jí)的服務(wù)器應(yīng)用來(lái)說(shuō),則是不夠的。
設(shè)想一個(gè)典型的Web服務(wù)器軟件,它們一般都采用多進(jìn)程/線程的結(jié)構(gòu)。每當(dāng)接到一個(gè)連
接請(qǐng)求,就產(chǎn)生一個(gè)子進(jìn)程/線程來(lái)處理。顯然,對(duì)于一個(gè)重負(fù)載的服務(wù)器來(lái)說(shuō),同時(shí)有
成千上萬(wàn)個(gè)連接是很常見(jiàn)的。而這時(shí),采用kernel 2.2.x的系統(tǒng)就不能勝任了。因此,
可以說(shuō)正是因?yàn)榇嬖谶@個(gè)最大進(jìn)程數(shù)的限制,使得Linux不能勝任企業(yè)級(jí)服務(wù)器操作系統(tǒng)
的工作。事實(shí)上,目前這個(gè)級(jí)別的操作系統(tǒng)一般都是較為成熟,并且沒(méi)有上述限制的
Solaris、AIX、HP-UX等系統(tǒng)。
maxuprc
一個(gè)用戶可以生成的最大用戶進(jìn)程數(shù);
默認(rèn)值為MAX_NPROCS-RESERVED_PROCS
STREAM
nstrpush
默認(rèn)值為9,這個(gè)參數(shù)定義了允許有多少個(gè)STREAM 模塊加載在系統(tǒng)核心中,我猜想這個(gè)
參數(shù)是指相對(duì)于一個(gè)用戶或一個(gè)進(jìn)程,通常不用修改該參數(shù);
strmsgsz
默認(rèn)值為 65536, 單個(gè)系統(tǒng)調(diào)用可以傳給一個(gè)STREAM設(shè)備信息的數(shù)據(jù)部分的最大字節(jié)數(shù)
;任何write(2)超過(guò)這個(gè)大小限制會(huì)被分為多個(gè)信息;
范圍為:0到262144 bytes
當(dāng)出現(xiàn)putmsg(2)系統(tǒng)調(diào)用返回ERANGE時(shí),需要修改該參數(shù);
strctlsz
默認(rèn)值為 65536, 單個(gè)系統(tǒng)調(diào)用可以傳給一個(gè)STREAM設(shè)備信息的控制部分的最大字節(jié)數(shù)
;范圍:0-MAXINT BYTES;
General Kernel Variables
noexec_user_stack
Warning: This option might crash some of your application software, and
endanger your system's stability!
By default, the Solaris 32 bit application stack memory areas are set
with permissions to read, write and execute, as specified in the SPARC
and Intel ABI. Though many hacks prefer to modify the program counter
saved during a subroutine call, a program snippet in the stack area can
be used to gain root access to a system.
If the variable is set to a non-zero value, the stack defaults to read
and write, but not executable permissions. Most programs, but not all,
will function correctly, if the default stack permissions exclude
executable rights. Attempts to execute code on the stack will kill the
process with a SIGSEGV signal and log a message in kern:notice. Program
which rely on an executable stack must use the mprotect(2) function to
explicitly mark executable memory areas.
Refer to the System Administration Guide for more information on this
topic. Admins which don't want the report about executable stack can set
the noexec_user_stack_log variable explicitly to 0.
Also note that the 64 bit V9 ABI defaults to stacks without execute
permissions.
TCP/IP參數(shù)設(shè)置
TCP/IP參數(shù)可以由ndd工具來(lái)設(shè)置,
Ndd命令能容易的在不重新配置系統(tǒng)內(nèi)核和重起系統(tǒng)的情況下,修改核心和TCP/IP的設(shè)備
的一些參數(shù)。使用如下命令可看到相應(yīng)的幫助。
#ndd /dev/arp /?
? (read only)
arp_cache_report (read only)
arp_debug (read and write)
arp_cleanup_interval (read and write)
# ndd /dev/icmp /?
? (read only)
icmp_wroff_extra (read and write)
icmp_def_ttl (read and write)
icmp_bsd_compat (read and write)
icmp_xmit_hiwat (read and write)
icmp_xmit_lowat (read and write)
icmp_recv_hiwat (read and write)
icmp_max_buf (read and write)
icmp_status (read only)
#ndd /dev/ip /?
? (read only)
ip_forwarding (read and write)
ip_respond_to_address_mask_broadcast(read and write)
ip_respond_to_echo_broadcast (read and write)
ip_respond_to_timestamp (read and write)
ip_respond_to_timestamp_broadcast(read and write)
ip_send_redirects (read and write)
ip_forward_directed_broadcasts(read and write)
ip_debug (read and write)
ip_mrtdebug (read and write)
ip_ire_cleanup_interval (read and write)
ip_ire_flush_interval (read and write)
ip_ire_redirect_interval (read and write)
ip_def_ttl (read and write)
ip_forward_src_routed (read and write)
ip_wroff_extra (read and write)
ip_ire_pathmtu_interval (read and write)
ip_icmp_return_data_bytes (read and write)
ip_send_source_quench (read and write)
ip_path_mtu_discovery (read and write)
ip_ignore_delete_time (read and write)
ip_ignore_redirect (read and write)
ip_output_queue (read and write)
ip_broadcast_ttl (read and write)
ip_icmp_err_interval (read and write)
ip_reass_queue_bytes (read and write)
ip_strict_dst_multihoming (read and write)
ip_addrs_per_if (read and write)
ip_ill_status (read only)
ip_ipif_status (read only)
ip_ire_status (read only)
ip_ipc_status (read only)
ip_rput_pullups (read and write)
ip_enable_group_ifs (read and write)
# ndd /dev/tcp /?
? (read only)
tcp_time_wait_interval (read and write)
tcp_conn_req_max_q (read and write)
tcp_conn_req_max_q0 (read and write)
tcp_conn_req_min (read and write)
tcp_conn_grace_period (read and write)
tcp_cwnd_max (read and write)
tcp_debug (read and write)
tcp_smallest_nonpriv_port (read and write)
tcp_ip_abort_cinterval (read and write)
tcp_ip_abort_linterval (read and write)
tcp_ip_abort_interval (read and write)
tcp_ip_notify_cinterval (read and write)
tcp_ip_notify_interval (read and write)
tcp_ip_ttl (read and write)
tcp_keepalive_interval (read and write)
tcp_maxpsz_multiplier (read and write)
tcp_mss_def (read and write)
tcp_mss_max (read and write)
tcp_mss_min (read and write)
tcp_naglim_def (read and write)
tcp_rexmit_interval_initial (read and write)
tcp_rexmit_interval_max (read and write)
tcp_rexmit_interval_min (read and write)
tcp_wroff_xtra (read and write)
tcp_deferred_ack_interval (read and write)
tcp_snd_lowat_fraction (read and write)
tcp_sth_rcv_hiwat (read and write)
tcp_sth_rcv_lowat (read and write)
tcp_dupack_fast_retransmit (read and write)
tcp_ignore_path_mtu (read and write)
tcp_rcv_push_wait (read and write)
tcp_smallest_anon_port (read and write)
tcp_largest_anon_port (read and write)
tcp_xmit_hiwat (read and write)
tcp_xmit_lowat (read and write)
tcp_recv_hiwat (read and write)
tcp_recv_hiwat_minmss (read and write)
tcp_fin_wait_2_flush_interval (read and write)
tcp_co_min (read and write)
tcp_max_buf (read and write)
tcp_zero_win_probesize (read and write)
tcp_strong_iss (read and write)
tcp_rtt_updates (read and write)
tcp_wscale_always (read and write)
tcp_tstamp_always (read and write)
tcp_tstamp_if_wscale (read and write)
tcp_rexmit_interval_extra (read and write)
tcp_deferred_acks_max (read and write)
tcp_slow_start_after_idle (read and write)
tcp_slow_start_initial (read and write)
tcp_co_timer_interval (read and write)
tcp_extra_priv_ports (read only)
tcp_extra_priv_ports_add (write only)
tcp_extra_priv_ports_del (write only)
tcp_status (read only)
tcp_bind_hash (read only)
tcp_listen_hash (read only)
tcp_conn_hash (read only)
tcp_queue_hash (read only)
tcp_host_param (read and write)
tcp_1948_phrase (write only)
ndd命令語(yǔ)法為
#ndd –set driver parameter
顯示當(dāng)前值
#ndd /dev/arp arp_debug
0
0:代表特性禁止
ndd –set /dev/arp arp_debug 1
1:允許
由于這些參數(shù)一般是經(jīng)過(guò)優(yōu)化過(guò)的,而且一旦改變失誤,可能導(dǎo)致系統(tǒng)的不正常工作。
所以sun不提供文檔供人隨意調(diào)節(jié)。
See ndd(1M) for more information;
但是tcp_conn_hash_size和ipc_tcp_conn_hash_size這兩個(gè)參數(shù)只能在/etc/system中
設(shè)置;
如果想在系統(tǒng)啟動(dòng)過(guò)程中修改TCP/IP參數(shù),需要將NDD命令加入啟動(dòng)腳本中。使用下面的
方法來(lái)創(chuàng)建一個(gè)包含NDD命令的啟動(dòng)腳本;
· 在/etc/init.d路徑下建立一個(gè)腳本,并在相應(yīng)
/etc/rc2.d,/etc/rc1.d,/etc/rcs.d建立相應(yīng)的連接;
· 這個(gè)腳本必須在S69inet和S72inetsvc腳本之間;
· 該文件名的前綴為S70或S71。有同一前綴的腳本連續(xù)執(zhí)行,不會(huì)有什么問(wèn)
題;
· 參閱/etc/init.d目錄下的README文件獲取更多的信息;
tcp:tcp_conn_hash_size
默認(rèn)值為 256,在忙的服務(wù)器建議增加;
控制TCP模塊哈希表的大小
$ ndd /dev/tcp tcp_conn_hash
tcp_conn_hash_size = 256
TCP dest snxt suna swnd rnxt rack rwnd
rto mss w sw rw t recent [lport,fport] state
251 f5bcf2a8 130.075.003.xxx 204a5e77 204a5e77 0000032120 e6255721
e6255721 0000034752
02000 01448 1 00 00 1 002a16c0 [22, 1022] TCP_ESTABLISHED
The default size is printed when investigating the table. If you have a
busy server, you might want to consider increasing the table's size. Mr.
Storm reports that SUN increases the hash size up to 262144 for web
server benchmarks.
有關(guān)ARP協(xié)議的細(xì)節(jié),請(qǐng)自己參閱相關(guān)文檔。對(duì)于sun的系統(tǒng),核心默認(rèn)的ARP表過(guò)期的時(shí)
間是5分鐘,并且可以調(diào)節(jié).另外一張表是ip層的路由表,它和arp表配合記錄動(dòng)態(tài)路由信
息,20分鐘過(guò)期,最后一個(gè)特性是”無(wú)償ARP” ,即系統(tǒng)廣播自己的硬件地址。這個(gè)特性
用來(lái)診斷是否存在相同的硬件地址,另外也用來(lái)生成硬件地址的變動(dòng)通知。
1、ARP攻擊
針對(duì)ARP的攻擊主要有兩種,一種是DOS,一種是Spoof。
ARP欺騙往往應(yīng)用于一個(gè)內(nèi)部網(wǎng)絡(luò),我們可以用它來(lái)擴(kuò)大一個(gè)已經(jīng)存在的網(wǎng)絡(luò)安全漏洞。
如果你可以入侵一個(gè)子網(wǎng)內(nèi)的機(jī)器,其它的機(jī)器安全也將受到ARP欺騙的威脅。同樣,利
用APR的DOS甚至能使整個(gè)子網(wǎng)癱瘓。
2、對(duì)ARP攻擊的防護(hù)
防止ARP攻擊是比較困難的,修改協(xié)議也是不大可能。但是有一些工作是可以提高本地網(wǎng)
絡(luò)的安全性。
首先,你要知道,如果一個(gè)錯(cuò)誤的記錄被插入ARP或者IP route表,可以用兩種方式來(lái)刪
除。
a. 使用arp –d host_entry
b. 自動(dòng)過(guò)期,由系統(tǒng)刪除
這樣,可以采用以下的一些方法:
1). 減少過(guò)期時(shí)間
#ndd –set /dev/arp arp_cleanup_interval 60000
#ndd -set /dev/ip ip_ire_flush_interval 60000
60000=60000毫秒 默認(rèn)是300000
加快過(guò)期時(shí)間,并不能避免攻擊,但是使得攻擊更加困難,帶來(lái)的影響是在網(wǎng)絡(luò)中會(huì)大
量的出現(xiàn)ARP請(qǐng)求和回復(fù),請(qǐng)不要在繁忙的網(wǎng)絡(luò)上使用。
2). 建立靜態(tài)ARP表
這是一種很有效的方法,而且對(duì)系統(tǒng)影響不大。缺點(diǎn)是破壞了動(dòng)態(tài)ARP協(xié)議??梢越⑷?nbsp;
下的文件。
test.nsfocus.com 08:00:20:ba:a1:f2
user. nsfocus.com 08:00:20:ee:de:1f
使用arp –f filename加載進(jìn)去,這樣的ARP映射將不會(huì)過(guò)期和被新的ARP數(shù)據(jù)刷新,除
非使用arp –d才能刪除。但是一旦合法主機(jī)的網(wǎng)卡硬件地址改變,就必須手工刷新這個(gè)
arp文件。這個(gè)方法,不適合于經(jīng)常變動(dòng)的網(wǎng)絡(luò)環(huán)境。
3).禁止ARP
可以通過(guò)ifconfig interface –arp 完全禁止ARP,這樣,網(wǎng)卡不會(huì)發(fā)送ARP和接受ARP
包。但是使用前提是使用靜態(tài)的ARP表,如果不在apr表中的計(jì)算機(jī) ,將不能通信。這個(gè)
方法不適用與大多數(shù)網(wǎng)絡(luò)環(huán)境,因?yàn)檫@增加了網(wǎng)絡(luò)管理的成本。但是對(duì)小規(guī)模的安全網(wǎng)
絡(luò)來(lái)說(shuō),還是有效和可行的。
3、IP
IP是用來(lái)傳輸數(shù)據(jù)的底層協(xié)議。
4、IP Forwarding (IP轉(zhuǎn)發(fā)) :
IP 轉(zhuǎn)發(fā)是在不同網(wǎng)卡之間路由包數(shù)據(jù)的過(guò)程。一般是用路由器來(lái)實(shí)現(xiàn),但是擁有多網(wǎng)絡(luò)
接口的主機(jī)也可以實(shí)現(xiàn)。當(dāng)有兩個(gè)網(wǎng)絡(luò)接口的時(shí)候,Solairs系統(tǒng)默認(rèn)打開(kāi)ip轉(zhuǎn)發(fā)。
關(guān)閉IP轉(zhuǎn)發(fā)
對(duì)于多宿主主機(jī),存在可能的安全問(wèn)題是,攻擊者可能通過(guò)ip轉(zhuǎn)發(fā)的方式訪問(wèn)到私有網(wǎng)
絡(luò)。在solaisr系統(tǒng)中,包轉(zhuǎn)發(fā)能很的容易關(guān)閉。簡(jiǎn)單的生成一個(gè)文件 /etc/notrouter
,就能在下次啟動(dòng)的時(shí)候關(guān)閉ip轉(zhuǎn)發(fā)。
另外通過(guò)ndd命令也能在系統(tǒng)運(yùn)行的時(shí)候關(guān)閉ip轉(zhuǎn)發(fā)。
#ndd –set /dev/ip ip_forwarding 0
嚴(yán)格限定多主宿主機(jī)
如果是多宿主機(jī),還可以加上更嚴(yán)格的限定防止ip spoof的攻擊
#ndd –set /dev/ip ip_strict_dst_multihoning 1
默認(rèn)是關(guān)閉的(值為0)
轉(zhuǎn)發(fā)包廣播
由于在轉(zhuǎn)發(fā)狀態(tài)下默認(rèn)是允許的,為了防止被用來(lái)實(shí)施smurf攻擊,關(guān)閉這一特性。 (參
見(jiàn)cert-98.01)
#ndd –set /dev/ip ip-forward_directed_broadcasts 0
5、路由
路由的過(guò)程就是檢查路由信息,從而決定如何從哪個(gè)接口傳輸數(shù)據(jù)包的過(guò)程。即使一個(gè)
桌面系統(tǒng),也要有路由設(shè)置。路由表需要實(shí)時(shí)的升級(jí)?,F(xiàn)在有多種路由協(xié)議可以用來(lái)路
由數(shù)據(jù)。Solaris系統(tǒng)使用in.routed守護(hù)程序支持RIP version 1,使用in.rdisc守護(hù)
進(jìn)程支持ICMP路由更新。當(dāng)solairs系統(tǒng)配置成為一個(gè)路由設(shè)備來(lái)轉(zhuǎn)發(fā)數(shù)據(jù)包的時(shí)候,它
通過(guò)上面的兩種方式動(dòng)態(tài)更新路由信息。
6、攻擊
有多種方法能威脅動(dòng)態(tài)路由協(xié)議。攻擊者能偽造虛假的路由更新信息發(fā)送過(guò)來(lái),從而達(dá)
到DOS的效果;同樣的方法,還能使數(shù)據(jù)報(bào)文轉(zhuǎn)發(fā)到其他的網(wǎng)絡(luò)上,使攻擊者能監(jiān)聽(tīng)數(shù)據(jù)
。
默認(rèn)的solairs系統(tǒng)使用系統(tǒng)守護(hù)程序動(dòng)態(tài)管理路由信息。靜態(tài)路由很好的防止路由信息
被遠(yuǎn)程動(dòng)態(tài)改變。使用/etc/defaultrouter來(lái)設(shè)置本地子網(wǎng)的路由。使用route命令來(lái)
設(shè)置其他路由信息。
但是對(duì)于一個(gè)簡(jiǎn)單網(wǎng)絡(luò)來(lái)說(shuō),使用靜態(tài)路由是合適的,一旦網(wǎng)絡(luò)中有較多的路由設(shè)備,
必須使用動(dòng)態(tài)路由。Solairs系統(tǒng)將來(lái)也會(huì)繼續(xù)支持動(dòng)態(tài)路由協(xié)議。
轉(zhuǎn)發(fā)源路由包。
源路由包中包含了了指定數(shù)據(jù)如何路由的信息。因此攻擊者可能使用源路由包繞過(guò)某些
特定的路由器和防火墻設(shè)備,也可能用來(lái)避開(kāi)一個(gè)已知的IDS系統(tǒng)的監(jiān)控范圍。在大多數(shù)
solairs的應(yīng)用系統(tǒng)上,是不需要這個(gè)特性的。由于solairs在打開(kāi)ip轉(zhuǎn)發(fā)以后默認(rèn)支持
源路由轉(zhuǎn)發(fā),所以我們必須手動(dòng)關(guān)閉它
#ndd –set /dev/ip ip_forward_src_routed 0
7、ICMP
ICMP:網(wǎng)絡(luò)控制信息協(xié)議。下面討論在IP驅(qū)動(dòng)上配置solaris的ICMP特性。
8、廣播:
ICMP廣播經(jīng)常會(huì)帶來(lái)麻煩,這里有一條原則來(lái)防止廣播風(fēng)暴-控制ICMP的錯(cuò)誤信息不被
生成。為來(lái)防止攻擊者利用ICMP實(shí)施DOS攻擊,最好禁止本地網(wǎng)絡(luò)對(duì)ICMP廣播的響應(yīng)。
Solairs系統(tǒng)能調(diào)節(jié)三種ICMP廣播的參數(shù)。
響應(yīng)Echo廣播:
Echo廣播通常用來(lái)診斷網(wǎng)絡(luò)主機(jī)的存活情況,一旦主機(jī)收到一個(gè)對(duì)廣播地址的echo請(qǐng)求
,默認(rèn)情況下所有系統(tǒng)會(huì)回復(fù)這個(gè)廣播要求。當(dāng)有人惡意定制過(guò)量的echo包,系統(tǒng)中的
流量將大為增加。因此我們可以關(guān)閉對(duì)echo廣播的響應(yīng)
#ndd –set /dev/ip ip_respond_to_echo_boadcast 0
響應(yīng)時(shí)間戳廣播
時(shí)間戳通常用來(lái)同步兩個(gè)不同系統(tǒng)的時(shí)鐘,但是系統(tǒng)沒(méi)有必要回復(fù)對(duì)廣播地址發(fā)送的時(shí)
間戳請(qǐng)求,所以我們可以關(guān)閉這種回應(yīng)。
#ndd –set /dev/ip ip_respond_to_timestamp_broadcast 0
地址掩碼廣播
地址掩碼請(qǐng)求被用來(lái)確定本地掩碼,通常是網(wǎng)絡(luò)中無(wú)盤(pán)工作站在啟動(dòng)的時(shí)候發(fā)送。用下
面的命令能禁止對(duì)這樣請(qǐng)求的應(yīng)答
#ndd –set /dev/ip ip_respond_to_address_mask_broadcast 0
9、重定向錯(cuò)誤
重定向錯(cuò)誤:通常是路由器用來(lái)通知主機(jī)使用另一個(gè)路由器來(lái)傳輸數(shù)據(jù)的指示報(bào)文。報(bào)
文重指定的路由器必須和發(fā)送路由器一樣連接同一個(gè)子網(wǎng),而收到報(bào)文的主機(jī)必須在自
己的路由表里新增一條到那個(gè)子網(wǎng)的路由。不像ARP的包,這個(gè)路由不會(huì)過(guò)期也不會(huì)自動(dòng)
刪除。很多系統(tǒng)檢測(cè)這樣的報(bào)文用來(lái)發(fā)現(xiàn)錯(cuò)誤和潛在的問(wèn)題,從而優(yōu)先更改自己的路由
表。
接受重定向錯(cuò)誤
一個(gè)攻擊者能偽造重定向錯(cuò)誤的報(bào)文從而給目標(biāo)主機(jī)裝載一個(gè)新的路由,而這個(gè)路由也
許更本就是錯(cuò)誤的,這樣主機(jī)就不會(huì)和一些特定的主機(jī)或網(wǎng)絡(luò)通信,這是一種DOS(deny
of service)攻擊。雖然重定向報(bào)文本身有一些校驗(yàn)規(guī)則,但是這些規(guī)則能很容易的被欺
騙。而且目前存在大量的工具來(lái)達(dá)到這個(gè)目的。大多數(shù)只有一條默認(rèn)路由主機(jī)系統(tǒng)是不
需要理會(huì)這種報(bào)文的,因此我們可以使用ndd命令忽略ICMP重定向錯(cuò)誤報(bào)文。(solairs
默認(rèn)是不忽略的)
#ndd –set /dev/ip ip_ignore_redirect 1
發(fā)送重定向錯(cuò)誤報(bào)文
只有路由器才需要重定向錯(cuò)誤,任何主機(jī)即使是多宿主主機(jī)也不需要發(fā)送這種報(bào)文,因
此我們可以使用ndd來(lái)禁止本機(jī)發(fā)送錯(cuò)誤重定向報(bào)文。
Ndd –set /dev/ip ip_send_redirects 0
時(shí)間戳響應(yīng)
就像前面提到的,時(shí)間戳廣播報(bào)文在大多數(shù)環(huán)境下是不需要的。而solaris系統(tǒng)還能夠完
全不接受這種報(bào)文。
#ndd –set /dev/ip ip_respond_to_timestamp 0
關(guān)閉這個(gè)特性以后,有些使用rdate系統(tǒng)命令的unix主機(jī)將不能再同步時(shí)鐘。但是
solaris 2.6和7使用更好的時(shí)鐘同步方式-NTP(網(wǎng)絡(luò)時(shí)間協(xié)議),請(qǐng)參見(jiàn)xntpd的幫助。
10、TCP
TCP:傳輸控制協(xié)議
11、SYN_flood攻擊
TCP-SYN flood又稱半開(kāi)式連接攻擊,每當(dāng)我們進(jìn)行一次標(biāo)準(zhǔn)的TCP連接(如WWW瀏覽,下
載文件等)會(huì)有一個(gè)一個(gè)三次握手的過(guò)程,首先是請(qǐng)求方向服務(wù)方發(fā)送一個(gè)SYN消息,服
務(wù)方收到SYN后,會(huì)向請(qǐng)求方回送一個(gè)SYN-ACK表示確認(rèn),當(dāng)請(qǐng)求方收到SYN-ACK后則再
次向服務(wù)方發(fā)送一個(gè)ACK消息,一次成功的TCP連接由此就建立,可以進(jìn)行后續(xù)工作了,
如圖所示:
請(qǐng)求方 服務(wù)方
---------------------> SYN
SYN-ACK <----------------
----------------------> ACK
而TCP-SYN flood在它的實(shí)現(xiàn)過(guò)程中只有前兩個(gè)步驟,當(dāng)服務(wù)方收到請(qǐng)求方的SYN并
回送SYN-ACK確認(rèn)消息后, 請(qǐng)求方由于采用源地址欺騙等手段,致使服務(wù)方得不到ACK回
應(yīng),這樣,服務(wù)方會(huì)在一定時(shí)間處于等待接收請(qǐng)求方ACK消息的狀態(tài),一臺(tái)服務(wù)器可用的
TCP連接是有限的,如果惡意攻擊方快速連續(xù)的發(fā)送此類(lèi)連接請(qǐng)求,則服務(wù)器可用TCP連
接隊(duì)列很快將會(huì)阻塞,系統(tǒng)可用資源,網(wǎng)絡(luò)可用帶寬急劇下降,無(wú)法向用戶提供正常的
網(wǎng)絡(luò)服務(wù)。
對(duì)于solaris 2.5.1,只有安裝了patch 103582-1(或以上)才能防止syn_flood.在
synflood沒(méi)有流行以前,連接隊(duì)列和backlog隊(duì)列是相同的,solairs 2.6/7和安裝了
patch以后的2.5.1系統(tǒng),現(xiàn)在存在兩條隊(duì)列,一個(gè)是已連接的隊(duì)列,一條是未連接完成的
隊(duì)列。SYN攻擊時(shí)只能填充后一條隊(duì)列,而且,一旦隊(duì)列滿,將隨機(jī)丟棄老的syn包。系
統(tǒng)還會(huì)監(jiān)控這個(gè)隊(duì)列被短時(shí)間填充的情況,一旦懷疑是syn_flood,將在系統(tǒng)的messages
中記錄下來(lái)。
Mar 8 19:24:01 example unix: WARNING: High TCP connect timeout rate!
System (port 80) may be under a SYN flood attack!
新隊(duì)列的大小也是可以調(diào)節(jié)的,繁忙的web服務(wù)器需要提高未連接隊(duì)列的大小。默認(rèn)的大
小是1024,我們可以提高到4096。
ndd –set /dev/tcp tcp_conn_req_max_q0 4096
當(dāng)然,一般情況下,核心的隊(duì)列增大,系統(tǒng)的內(nèi)存最好也應(yīng)有相應(yīng)的增加。
12、連接耗盡攻擊
和SYN flood攻擊不同,連接耗盡攻擊不太常見(jiàn)。因?yàn)檫@種攻擊必須使用真實(shí)IP,攻擊的
目標(biāo)是已連接隊(duì)列。許多系統(tǒng)有一個(gè)同時(shí)連接的上限,取決于核心參數(shù)和系統(tǒng)內(nèi)存情況
。作為通常的web服務(wù)器,這個(gè)上限值很難達(dá)到,因?yàn)閔ttp的連接是典型的短時(shí)連接。但
是一個(gè)攻擊者可能快速發(fā)送大量的連接請(qǐng)求,同時(shí)保持連接,這樣正常訪問(wèn)者的連接就
可能被服務(wù)器拒絕。
我們可以通過(guò)優(yōu)化系統(tǒng)核心和增加內(nèi)存來(lái)緩解,但不是根本的方法。因?yàn)楣粽呖赡芡?nbsp;
時(shí)調(diào)動(dòng)多臺(tái)機(jī)器同時(shí)攻擊。當(dāng)然,我們可以在發(fā)現(xiàn)攻擊以后,在防火墻或路由器上拒絕
這些IP來(lái)源的連接。
如果不通過(guò)網(wǎng)絡(luò)設(shè)備,僅僅通過(guò)調(diào)節(jié)系統(tǒng)參數(shù)來(lái)緩解攻擊。一方面,可以調(diào)節(jié)web
server,如apache的timeout參數(shù),減短連接保持時(shí)間,另一方面,我們可以將核心以連
接隊(duì)列參數(shù)增大(默認(rèn)是128)。
#ndd –set /dev/tcp tcp_conn_req_max_q 1024
以上的方法能阻止大多數(shù)連接耗盡的攻擊企圖,除非攻擊者調(diào)動(dòng)更多的資源,發(fā)動(dòng)大規(guī)模
的DDOS,但這樣會(huì)使攻擊者更容易暴露。
13、IP 欺騙
IP欺騙基本原理:
TCP連接的建立 :為了利用TCP連接交換數(shù)據(jù),主機(jī)間首先必須建立一個(gè)連接。TCP建立連
接時(shí)可以分為3個(gè) 步驟,稱為三步握手法。如果主機(jī)A運(yùn)行rlogin客戶程序,并且希望連
接到主機(jī)B上的rlogin daemon 服務(wù)器程序上,連接過(guò)程如圖二所示。
1 A ---SYN---> B
2 A <--SYN/ACK--- B
3 A ---ACK---> B
圖二
需要提醒讀者的是,主機(jī)A和B的TCP模塊分別使用自己的序列編號(hào)。在時(shí)刻1時(shí),客戶端
通過(guò)設(shè)置標(biāo)志位SYN=1告訴服務(wù)器它需要建立連接。同時(shí),客戶端在其TCP頭中的序列號(hào)
域SEQ放置了它的初始序列號(hào)(ISN),并且告訴服務(wù)器序列號(hào)標(biāo)示域是有效的,應(yīng)該 被
檢查。在時(shí)刻2時(shí),服務(wù)器端在接收了上面的SYN后,作出的反應(yīng)是將自己的ISN和對(duì)客
戶端的ACKA發(fā)向客戶端并且千知下一個(gè)期待獲得的數(shù)據(jù)序列號(hào)是(ISN+1)。客戶端在第
一流時(shí)刻,對(duì)服務(wù)器的ISN進(jìn)行確認(rèn)。這時(shí),數(shù)據(jù)傳輸就可以進(jìn)行了。ISN與序列號(hào)的遞
增 了解序數(shù)編號(hào)如何選擇初始序列號(hào)和如何根據(jù)時(shí)間變化是很重要的。似乎應(yīng)該有這種
情 況,當(dāng)主機(jī)啟動(dòng)后序列編號(hào)初始化為1,但實(shí)際上并非如此。初始序列號(hào)是由
tcp_init函 數(shù)確定的。ISN每秒增加128000,如果有連接出現(xiàn),每次連接將反計(jì)數(shù)器的
數(shù)值增加 64000。很顯然,這使得用于表示ISN的32位計(jì)數(shù)器在沒(méi)有連接的情況下每
9.32小時(shí)復(fù)位 一次。之所以這樣,是因?yàn)檫@樣有利于最大限度地減少舊有連接的信息干
擾當(dāng)前連接的 機(jī)會(huì)。這里運(yùn)用了2MSL等待時(shí)間的概念(不在本文討論的范圍之內(nèi)。)如
果初始序列 號(hào)是隨意選擇的,那么不能保證現(xiàn)有序列號(hào)是不同于先前的。假設(shè)有這樣一
種情況,在 一個(gè)路由回路中的數(shù)據(jù)包最終跳出了循環(huán),回到了“舊有”的連接(此時(shí)其
實(shí)是不同于 前者的現(xiàn)有連接(,顯然會(huì)發(fā)生對(duì)現(xiàn)有連接的干擾。 端口號(hào) 為了提供對(duì)
TCP模塊的并行訪問(wèn),TCP提供了叫做端口的用戶接口。端口被操作系統(tǒng)內(nèi)核 利用來(lái)標(biāo)示
不同的網(wǎng)絡(luò)進(jìn)程,也就是嚴(yán)格區(qū)分傳輸層入口的標(biāo)示(就是說(shuō),IP不關(guān)心他 們的存在)
。TCP端口與IP地址一起提供網(wǎng)絡(luò)端到端的通信。事實(shí)上,在任何時(shí)刻任何Internet連接
都能由4個(gè)要素來(lái)措述:源IP地址、源地址端口號(hào)、目的IP地址和目的地址。采樣目標(biāo)主
機(jī)發(fā)出的TCP序列號(hào),猜測(cè)出它的數(shù)據(jù)序列號(hào)。然后,偽裝成被信任的主機(jī), 同時(shí)建立
起與目標(biāo)主機(jī)基于地址驗(yàn)證的應(yīng)用連接。如果成功,黑客可以使用一種簡(jiǎn)單的命令放置
一個(gè)系統(tǒng)后門(mén),以進(jìn)行非授權(quán)操作。
目前,RFC 1498定義了更好的隨機(jī)ISN生成方法,使得這種攻擊很難成功。對(duì)于solaris
系統(tǒng)ISN生成有三種方式。
0: 可預(yù)測(cè)的ISN
1: 增強(qiáng)的ISN 隨機(jī)生成
2: RFC 1948描述的ISN生成方式
所有版本的solaris默認(rèn)生成方式值是1。2.5.1只有 0,1兩種方式,2.6/7擁有0,1,2三種
ISN 生成方式。
我們可以修改/etc/default/inetinit文件來(lái)提高ISN的生成強(qiáng)度。
將 TCP_STRONG_ISS=1改為 TCP_STRONG_ISS=2
重起系統(tǒng)使他生效。對(duì)于solair 2.5.1,此方法無(wú)效。
14、增加私有端口
一般的情況下,1-1024端口被稱為私有端口,只允許具有根權(quán)限的進(jìn)程連接。但是有些大
于1024的端口,即使需要這樣的限制,卻無(wú)法定義,如NFS的服務(wù)器端口2049,當(dāng)然還有
一些其他定義的高于1024的私有端口。
在solairs2.5.1/2.6/7下使用如下方式,可以自定義最小的非私有端口
ndd –set /dev/tcp tcp_smallest_nonpriv_port 2050
這樣以來(lái),0-2049都被定義為私有端口。
在solaris 2.6/7下,還能使用另一個(gè)參數(shù)單獨(dú)指定私有端口。
#ndd /dev/tcp tcp_extra_priv_ports
2049
4045
用來(lái)顯示已經(jīng)定義的擴(kuò)展私有端口
#ndd –set /dev/tcp tcp_extra_priv_ports_add 6112
來(lái)增加新的私有端口定義。
使用 ndd –set /dev/tcp tcp_extra_priv_ports_del 來(lái)刪除定義。
要注意的是,不要隨便定義私有端口,因?yàn)橛行┓歉鶛?quán)限的進(jìn)程會(huì)使用這些端口。特別
是改變最小非私有端口這個(gè)參數(shù),經(jīng)常會(huì)引起問(wèn)題。應(yīng)仔細(xì)分析你的需求再用擴(kuò)展私有
端口定義的方式單獨(dú)增加。
15.tcp_max_buf
最大緩存字節(jié)數(shù);這個(gè)參數(shù)控制了由setsockopt(3SOCKET)函數(shù)設(shè)置發(fā)送和接收BUFFER
大?。?nbsp;
默認(rèn)值:1048576
范圍為8192到1073741824
如果在一個(gè)高速的網(wǎng)絡(luò)環(huán)境中創(chuàng)建TCP連接,增加該值來(lái)與網(wǎng)速相適應(yīng);
等等;
16、附件:設(shè)置腳本,來(lái)源于sun公司
#!/sbin/sh
#
# Copyright (c) 1999 by Sun Microsystems, Inc.
# All rights reserved.
#
# $Id: nddconfig,v 1.2 1999/09/29 22:25:04 kaw Exp $
#
# Copy this script to /etc/init.d and name it 'nddconfig'. Create a
# hardlink to /etc/init.d/nddconfig in /etc/rc2.d named 'S70nddconfig'.
#
# Keith A. Watson
#
PATH=/usr/bin:/usr/sbin
#
# This file contain network related options settings. The settings
# included here are considered safe in terms of security. Some settings
# may not work in your environment. The comments provided for each
# explain what effect the setting has.
#
# A '0' indicates false/off.
# A '1' indicates true/on.
#
#
# arp_cleanup_interval
#
# This option determines the period of time the Address Resolution
# Protocol (ARP) cache maintains entries. ARP attacks may be effective
# with the default interval. Shortening the timeout interval should
# reduce the effectiveness of such an attack.
# The default value is 300000 milliseconds (5 minutes).
#
ARP_CLEANUP_INTERVAL=60000
#
# ip_forward_directed_broadcasts
#
# This option determines whether to forward broadcast packets directed
# to a specific net or subnet, if that net or subnet is directly
# connected to the machine. If the system is acting as a router, this
# option can be exploited to generate a great deal of broadcast network
# traffic. Turning this option off will help prevent broadcast traffic
# attacks.
# The default value is 1 (True).
#
IP_FORWARD_DIRECTED_BROADCASTS=0
#
# ip_forward_src_routed
#
# This option determines whether to forward packets that are source
# routed. These packets define the path the packet should take instead
# of allowing network routers to define the path.
# The default value is 1 (True).
#
IP_FORWARD_SRC_ROUTED=0
#
# ip_ignore_redirect
#
# This option determines whether to ignore Internet Control Message
# Protocol (ICMP) packets that define new routes. If the system is
# acting as a router, an attacker may send redirect messages to alter
# routing tables as part of sophisticated attack (man in the middle
# attack) or a simple denial of service.
# The default value is 0 (False).
#
IP_IGNORE_REDIRECT=1
#
# ip_ire_flush_interval
#
# This option determines the period of time at which a specific route
# will be kept, even if currently in use. ARP attacks may be effective
# with the default interval. Shortening the time interval may reduce
# the effectiveness of attacks.
# The default interval is 1200000 milliseconds (20 minutes).
#
IP_IRE_FLUSH_INTERVAL=60000
#
# ip_respond_to_address_mask_broadcast
#
# This options determines whether to respond to ICMP netmask requests
# which are typically sent by diskless clients when booting. An
# attacker may use the netmask information for determining network
# topology or the broadcast address for the subnet.
# The default value is 0 (False).
#
IP_RESPOND_TO_ADDRESS_MASK_BROADCAST=0
#
# ip_respond_to_echo_broadcast
#
# This option determines whether to respond to ICMP broadcast echo
# requests (ping). An attacker may try to create a denial of service
# attack on subnets by sending many broadcast echo requests to which all
# systems will respond. This also provides information on systems that
# are available on the network.
# The default value is 1 (True).
#
IP_RESPOND_TO_ECHO_BROADCAST=0
#
# ip_respond_to_timestamp
#
# This option determines whether to respond to ICMP timestamp requests
# which some systems use to discover the time on a remote system. An
# attacker may use the time information to schedule an attack at a
# period of time when the system may run a cron job (or other time-
# based event) or otherwise be busy. It may also be possible predict
# ID or sequence numbers that are based on the time of day for spoofing
# services.
# The default value is 1 (True).
#
IP_RESPOND_TO_TIMESTAMP=0
#
# ip_respond_to_timestamp_broadcast
#
# This option determines whether to respond to ICMP broadcast timestamp
# requests which are used to discover the time on all systems in the
# broadcast range. This option is dangerous for the same reasons as
# responding to a single timestamp request. Additionally, an attacker
# may try to create a denial of service attack by generating many
# broadcast timestamp requests.
# The default value is 1 (True).
#
IP_RESPOND_TO_TIMESTAMP_BROADCAST=0
#
# ip_send_redirects
#
# This option determines whether to send ICMP redirect messages which
# can introduce changes into remote system's routing table. It should
# only be used on systems that act as routers.
# The default value is 1 (True).
#
IP_SEND_REDIRECTS=0
#
# ip_strict_dst_multihoming
#
# This option determines whether to enable strict destination
# multihoming. If this is set to 1 and ip_forwarding is set to 0, then
# a packet sent to an interface from which it did not arrive will be
# dropped. This setting prevents an attacker from passing packets across
# a machine with multiple interfaces that is not acting a router.
# The default value is 0 (False).
#
IP_STRICT_DST_MULTIHOMING=1
#
# tcp_conn_req_max_q0
#
# This option determines the size of the queue containing half-open
# connections. This setting provides protection from SYN flood attacks.
# Solaris 2.6 and 7 (and 2.5.1 with patch 103582-12 and higher) include
# protection from these attacks. The queue size default is adequate for
# most systems but should be increased for busy Web servers.
# The default value is 1024.
#
TCP_CONN_REQ_MAX_Q0=4096
# Process the argument. 'stop' ignored.
case "$1" in
'start')
# set the appropriate network options
ndd -set /dev/arp arp_cleanup_interval /
$ARP_CLEANUP_INTERVAL
ndd -set /dev/ip ip_forward_directed_broadcasts /
$IP_FORWARD_DIRECTED_BROADCASTS
ndd -set /dev/ip ip_forward_src_routed /
$IP_FORWARD_SRC_ROUTED
ndd -set /dev/ip ip_ignore_redirect /
$IP_IGNORE_REDIRECT
ndd -set /dev/ip ip_ire_flush_interval /
$IP_IRE_FLUSH_INTERVAL
ndd -set /dev/ip ip_respond_to_address_mask_broadcast /
$IP_RESPOND_TO_ADDRESS_MASK_BROADCAST
ndd -set /dev/ip ip_respond_to_echo_broadcast /
$IP_RESPOND_TO_ECHO_BROADCAST
ndd -set /dev/ip ip_respond_to_timestamp /
$IP_RESPOND_TO_TIMESTAMP
ndd -set /dev/ip ip_respond_to_timestamp_broadcast /
$IP_RESPOND_TO_TIMESTAMP_BROADCAST
ndd -set /dev/ip ip_send_redirects /
$IP_SEND_REDIRECTS
ndd -set /dev/ip ip_strict_dst_multihoming /
$IP_STRICT_DST_MULTIHOMING
ndd -set /dev/tcp tcp_conn_req_max_q0 /
$TCP_CONN_REQ_MAX_Q0
;;
'stop')
;;
'show')
echo "Currently unimplemented."
;;
*)
echo "Usage: $0 { start | stop | show }"
exit 1
;;
esac
exit 0
ndd - get and set driver configuration parameters