| mmmmn 回复于:2002-11-14 19:06:23 |
| 你的交换机是什么? |
| YT 回复于:2002-11-14 22:52:00 |
| 双工的问题? |
| byuq 回复于:2002-11-14 22:56:35 |
| cqg hme: [ID 468982 kern.warning] WARNING: SUNW,hme0 : Failed to initialize hardware/driver, SEVERITY_HIGH, INIT Nov 8 00:53:48 cqg hme: [ID 468982 kern.warning] WARNING: SUNW,hme0 : No transciever found., SEVERITY_HIGH, XCVR Nov 8 00:53:48 是不是cluster2.2抱的错呀!?? |
| YT 回复于:2002-11-14 23:03:47 |
| 他是时断时续的问题,要是cluster报错的话,他应该早发现的,而且应用岂不是会出现性能下降的吗? |
| byuq 回复于:2002-11-14 23:07:29 |
| 我遇到过cluster2.2抱网卡错,就是时断时续,但是在不装cluster的情况下,就是好的! |
| YT 回复于:2002-11-15 04:02:13 |
| 哦?是吗?那等szfox007来说说情况吧。 呵呵 |
| szfox007 回复于:2002-11-15 19:04:18 |
| 不好意思,让大家帮我费心了 这部机器没有装cluster,接的是cisco 6000的交换机 我也怀疑是交换机双工的问题,但是不敢确定,也不会改 |
| mmmmn 回复于:2002-11-15 19:10:06 |
| 6000吗?好象是10m 的口吧? |
| YT 回复于:2002-11-15 19:53:52 |
| ndd命令可以进行更改的。 |
| YT 回复于:2002-11-15 19:55:49 |
| 顺便说一句,需要有关的步骤资料吗? |
| mmmmn 回复于:2002-11-15 19:57:24 |
| 需要:) |
| YT 回复于:2002-11-15 20:08:25 |
| man ndd去。 不告诉你。 我告诉最终用户。 |
| mmmmn 回复于:2002-11-15 20:09:46 |
| 我现在就是最终用户!!! |
| YT 回复于:2002-11-15 20:10:47 |
| 不,你是VAR, szfox007 才是endusr呢。 |
| mmmmn 回复于:2002-11-15 20:13:29 |
| 不好意思,我是国家单位的,最终用户:) |
| szfox007 回复于:2002-11-15 20:14:53 |
| 那块点告诉我啊,我是enduser阿 是不是要把网卡设为10m的阿? |
| YT 回复于:2002-11-15 21:37:56 |
| 好的,但是不要让mmmmn看见了。 切记! 一.Solaris ndd命令 Ndd命令能容易的在不重新配置系统内核和重起系统的情况下,修改核心和TCP/IP的设备的一些参数。使用如下命令可看到相应的帮助。 [root@ /]> ndd /dev/arp \? ? (read only) arp_cache_report (read only) arp_debug (read and write) arp_cleanup_interval (read and write) [root@ /]> 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) [root@ /]> 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) [root@ /]> ndd /dev/tcp \? ? (read only) tcp_close_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 /dev/arp arp_debug 0 0:代表特性禁止 ndd -set /dev/arp arp_debug 1 1:允许 由于这些参数一般是经过优化过的,而且一旦改变失误,可能导致系统的不正常工作。所以sun不提供文档供人随意调节。 二.ARP 有关ARP协议的细节,请自己参阅相关文档。对于sun的系统,核心默认的ARP表过期的时间是5分钟,并且可以调节.另外一张表是ip层的路由表,它和arp表配合记录动态路由信息,20分钟过期,最后一个特性是”无偿ARP” ,即系统广播自己的硬件地址。这个特性用来诊断是否存在相同的硬件地址,另外也用来生成硬件地址的变动通知。 1、ARP攻击 针对ARP的攻击主要有两种,一种是DOS,一种是Spoof。 ARP欺骗往往应用于一个内部网络,我们可以用它来扩大一个已经存在的网络安全漏洞。 如果你可以入侵一个子网内的机器,其它的机器安全也将受到ARP欺骗的威胁。同样,利用APR的DOS甚至能使整个子网瘫痪。 2、对ARP攻击的防护 防止ARP攻击是比较困难的,修改协议也是不大可能。但是有一些工作是可以提高本地网络的安全性。 首先,你要知道,如果一个错误的记录被插入ARP或者IP route表,可以用两种方式来删除。 a. 使用arp -d host_entry b. 自动过期,由系统删除 这样,可以采用以下的一些方法: 1). 减少过期时间 #ndd -set /dev/arp arp_cleanup_interval 60000 #ndd -set /dev/ip ip_ire_flush_interval 60000 60000=60000毫秒 默认是300000 加快过期时间,并不能避免攻击,但是使得攻击更加困难,带来的影响是在网络中会大量的出现ARP请求和回复,请不要在繁忙的网络上使用。 2). 建立静态ARP表 这是一种很有效的方法,而且对系统影响不大。缺点是破坏了动态ARP协议。可以建立如下的文件。 test.nsfocus.com 08:00:20:ba:a1:f2 user. nsfocus.com 08:00:20:ee:de:1f 使用arp -f filename加载进去,这样的ARP映射将不会过期和被新的ARP数据刷新,除非使用arp -d才能删除。但是一旦合法主机的网卡硬件地址改变,就必须手工刷新这个arp文件。这个方法,不适合于经常变动的网络环境。 3).禁止ARP 可以通过ifconfig interface -arp 完全禁止ARP,这样,网卡不会发送ARP和接受ARP包。但是使用前提是使用静态的ARP表,如果不在apr表中的计算机 ,将不能通信。这个方法不适用与大多数网络环境,因为这增加了网络管理的成本。但是对小规模的安全网络来说,还是有效和可行的。 3、IP IP是用来传输数据的底层协议。 4、IP Forwarding (IP转发) : IP 转发是在不同网卡之间路由包数据的过程。一般是用路由器来实现,但是拥有多网络接口的主机也可以实现。当有两个网络接口的时候,Solairs系统默认打开ip转发。 关闭IP转发 对于多宿主主机,存在可能的安全问题是,攻击者可能通过ip转发的方式访问到私有网络。在solaisr系统中,包转发能很的容易关闭。简单的生成一个文件 /etc/notrouter,就能在下次启动的时候关闭ip转发。 另外通过ndd命令也能在系统运行的时候关闭ip转发。 #ndd -set /dev/ip ip_forwarding 0 严格限定多主宿主机 如果是多宿主机,还可以加上更严格的限定防止ip spoof的攻击 #ndd -set /dev/ip ip_strict_dst_multihoning 1 默认是关闭的(值为0) 转发包广播 由于在转发状态下默认是允许的,为了防止被用来实施smurf攻击,关闭这一特性。 (参见cert-98.01) #ndd -set /dev/ip ip-forward_directed_broadcasts 0 5、路由 路由的过程就是检查路由信息,从而决定如何从哪个接口传输数据包的过程。即使一个桌面系统,也要有路由设置。路由表需要实时的升级。现在有多种路由协议可以用来路由数据。Solaris系统使用in.routed守护程序支持RIP version 1,使用in.rdisc守护进程支持ICMP路由更新。当solairs系统配置成为一个路由设备来转发数据包的时候,它通过上面的两种方式动态更新路由信息。 6、攻击 有多种方法能威胁动态路由协议。攻击者能伪造虚假的路由更新信息发送过来,从而达到DOS的效果;同样的方法,还能使数据报文转发到其他的网络上,使攻击者能监听数据。 默认的solairs系统使用系统守护程序动态管理路由信息。静态路由很好的防止路由信息被远程动态改变。使用/etc/defaultrouter来设置本地子网的路由。使用route命令来设置其他路由信息。 但是对于一个简单网络来说,使用静态路由是合适的,一旦网络中有较多的路由设备,必须使用动态路由。Solairs系统将来也会继续支持动态路由协议。 转发源路由包。 源路由包中包含了了指定数据如何路由的信息。因此攻击者可能使用源路由包绕过某些特定的路由器和防火墙设备,也可能用来避开一个已知的IDS系统的监控范围。在大多数solairs的应用系统上,是不需要这个特性的。由于solairs在打开ip转发以后默认支持源路由转发,所以我们必须手动关闭它 #ndd -set /dev/ip ip_forward_src_routed 0 7、ICMP ICMP:网络控制信息协议。下面讨论在IP驱动上配置solaris的ICMP特性。 8、广播: ICMP广播经常会带来麻烦,这里有一条原则来防止广播风暴-控制ICMP的错误信息不被生成。为来防止攻击者利用ICMP实施DOS攻击,最好禁止本地网络对ICMP广播的响应。Solairs系统能调节三种ICMP广播的参数。 响应Echo广播: Echo广播通常用来诊断网络主机的存活情况,一旦主机收到一个对广播地址的echo请求,默认情况下所有系统会回复这个广播要求。当有人恶意定制过量的echo包,系统中的流量将大为增加。因此我们可以关闭对echo广播的响应 #ndd -set /dev/ip ip_respond_to_echo_boadcast 0 响应时间戳广播 时间戳通常用来同步两个不同系统的时钟,但是系统没有必要回复对广播地址发送的时间戳请求,所以我们可以关闭这种回应。 #ndd -set /dev/ip ip_respond_to_timestamp_broadcast 0 地址掩码广播 地址掩码请求被用来确定本地掩码,通常是网络中无盘工作站在启动的时候发送。用下面的命令能禁止对这样请求的应答 #ndd -set /dev/ip ip_respind_to_address_mask_broadcast 0 9、重定向错误 重定向错误:通常是路由器用来通知主机使用另一个路由器来传输数据的指示报文。报文重指定的路由器必须和发送路由器一样连接同一个子网,而收到报文的主机必须在自己的路由表里新增一条到那个子网的路由。不像ARP的包,这个路由不会过期也不会自动删除。很多系统检测这样的报文用来发现错误和潜在的问题,从而优先更改自己的路由表。 接受重定向错误 一个攻击者能伪造重定向错误的报文从而给目标主机装载一个新的路由,而这个路由也许更本就是错误的,这样主机就不会和一些特定的主机或网络通信,这是一种DOS攻击。虽然重定向报文本身有一些校验规则,但是这些规则能很容易的被欺骗。而且目前存在大量的工具来达到这个目的。大多数只有一条默认路由主机系统是不需要理会这种报文的,因此我们可以使用ndd命令忽略ICMP重定向错误报文。(solairs默认是不忽略的) #ndd -set /dev/ip ip_ignore_redirect 1 发送重定向错误报文 只有路由器才需要重定向错误,任何主机即使是多宿主主机也不需要发送这种报文,因此我们可以使用ndd来禁止本机发送错误重定向报文。 Ndd -set /dev/ip ip_send_redirects 0 时间戳响应 就像前面提到的,时间戳广播报文在大多数环境下是不需要的。而solaris系统还能够完全不接受这种报文。 #ndd -set /dev/ip ip_respond_to_timestamp 0 关闭这个特性以后,有些使用rdate系统命令的unix主机将不能再同步时钟。但是solaris 2.6和7使用更好的时钟同步方式-NTP(网络时间协议),请参见xntpd的帮助。 10、TCP TCP:传输控制协议 11、SYN_flood攻击 TCP-SYN flood又称半开式连接攻击,每当我们进行一次标准的TCP连接(如WWW浏览,下载文件等)会有一个一个三次握手的过程,首先是请求方向服务方发送一个SYN消息,服务方收到SYN后,会向请求方回送一个SYN-ACK表示确认,当请求方收到SYN-ACK后则再次向服务方发送一个ACK消息,一次成功的TCP连接由此就建立,可以进行后续工作了,如图所示: 请求方 服务方 ---------------------> SYN SYN-ACK <---------------- ----------------------> ACK 而TCP-SYN flood在它的实现过程中只有前两个步骤,当服务方收到请求方的SYN并回送SYN-ACK确认消息后, 请求方由于采用源地址欺骗等手段,致使服务方得不到ACK回应,这样,服务方会在一定时间处于等待接收请求方ACK消息的状态,一台服务器可用的TCP连接是有限的,如果恶意攻击方快速连续的发送此类连接请求,则服务器可用TCP连接队列很快将会阻塞,系统可用资源,网络可用带宽急剧下降,无法向用户提供正常的网络服务。 对于solaris 2.5.1,只有安装了patch 103582-1(或以上)才能防止syn_flood.在synflood没有流行以前,连接队列和backlog队列是相同的,solairs 2.6/7和安装了patch以后的2.5.1系统,现在存在两条队列,一个是已连接的队列,一条是未连接完成的队列。SYN攻击时只能填充后一条队列,而且,一旦队列满,将随机丢弃老的syn包。系统还会监控这个队列被短时间填充的情况,一旦怀疑是syn_flood,将在系统的messages中记录下来。 Mar 8 19:24:01 example unix: WARNING: High TCP connect timeout rate! System (port 80) may be under a SYN flood attack! 新队列的大小也是可以调节的,繁忙的web服务器需要提高未连接队列的大小。默认的大小是1024,我们可以提高到4096。 ndd -set /dev/tcp tcp_conn_req_max_q0 4096 当然,一般情况下,核心的队列增大,系统的内存最好也应有相应的增加。 12、连接耗尽攻击 和SYN flood攻击不同,连接耗尽攻击不太常见。因为这种攻击必须使用真实IP,攻击的目标是已连接队列。许多系统有一个同时连接的上限,取决于核心参数和系统内存情况。作为通常的web服务器,这个上限值很难达到,因为http的连接是典型的短时连接。但是一个攻击者可能快速发送大量的连接请求,同时保持连接,这样正常访问者的连接就可能被服务器拒绝。 我们可以通过优化系统核心和增加内存来缓解,但不是根本的方法。因为攻击者可能同时调动多台机器同时攻击。当然,我们可以在发现攻击以后,在防火墙或路由器上拒绝这些IP来源的连接。 如果不通过网络设备,仅仅通过调节系统参数来缓解攻击。一方面,可以调节web server,如apache的timeout参数,减短连接保持时间,另一方面,我们可以将核心以连接队列参数增大(默认是12 #ndd -set /dev/tcp tcp_conn_req_max_q 1024 以上的方法能阻止大多数连接耗尽的攻击企图,除非攻击者调动更多的资源,发动大规模的DDOS,但这样会使攻击者更容易暴露。 13、IP 欺骗 IP欺骗基本原理: TCP连接的建立 :为了利用TCP连接交换数据,主机间首先必须建立一个连接。TCP建立连接时可以分为3个 步骤,称为三步握手法。如果主机A运行rlogin客户程序,并且希望连接到主机B上的rlogin daemon 服务器程序上,连接过程如图二所示。 1 A ---SYN---> B 2 A <--SYN/ACK--- B 3 A ---ACK---> B 图二 需要提醒读者的是,主机A和B的TCP模块分别使用自己的序列编号。在时刻1时,客户端 通过设置标志位SYN=1告诉服务器它需要建立连接。同时,客户端在其TCP头中的序列号 域SEQ放置了它的初始序列号(ISN),并且告诉服务器序列号标示域是有效的,应该 被检查。在时刻2时,服务器端在接收了上面的SYN后,作出的反应是将自己的ISN和对客 户端的ACKA发向客户端并且千知下一个期待获得的数据序列号是(ISN+1)。客户端在第一流时刻,对服务器的ISN进行确认。这时,数据传输就可以进行了。ISN与序列号的递增 了解序数编号如何选择初始序列号和如何根据时间变化是很重要的。似乎应该有这种情 况,当主机启动后序列编号初始化为1,但实际上并非如此。初始序列号是由tcp_init函 数确定的。ISN每秒增加工厂128000,如果有连接出现,每次连接将反计数器的数值增加 64000。很显然,这使得用于表示ISN的32位计数器在没有连接的情况下每9.32小时复位 一次。之所以这样,是因为这样有利于最大限度地减少旧有连接的信息干扰当前连接的 机会。这里运用了望2MSL等待时间的概念(不在本文讨论的范围之内。)如果初始序列 号是随意选择的,那么不能保证现有序列号是不同于先前的。假设有这样一种情况,在 一个路由回路中的数据包最终跳出了循环,回到了“旧有”的连接(此时其实是不同于 前者的现有连接(,显然会发生对现有连接的干扰。 端口号 为了提供对TCP模块的并行访问,TCP提供了叫做端口的用户接口。端口被操作系统内核 利用来标示不同的网络进程,也就是严格区分传输层入口的标示(就是说,IP不关心他 们的存在)。TCP端口与IP地址一起提供网络端到端的通信。事实上,在任何时刻任何I nternet连接都能由4个要素来措述:源IP地址、源地址端口号、目的IP地址和目的地址。采样目标主机发出的TCP序列号,猜测出它的数据序列号。然后,伪装成被信任的主机, 同时建立起与目标主机基于地址验证的应用连接。如果成功,黑客可以使用一种简单的命令放置一个系统后门,以进行非授权操作。 目前,RFC 1498定义了更好的随机ISN生成方法,使得这种攻击很难成功。对于solaris系统ISN生成有三种方式。 0: 可预测的ISN 1: 增强的ISN 随机生成 2: RFC 1948描述的ISN生成方式 所有版本的solaris默认生成方式值是1。2.5.1只有 0,1两种方式,2.6/7拥有0,1,2三种ISN 生成方式。 我们可以修改/etc/default/inetinit文件来提高ISN的生成强度。 将 TCP_STRONG_ISS=1改为 TCP_STRONG_ISS=2 重起系统使他生效。对于solair 2.5.1,此方法无效。 14、增加私有端口 一般的情况下,1-1024端口被称为私有端口,只允许具有根权限的进程连接。但是有些大于1024的端口,即使需要这样的限制,却无法定义,如NFS的服务器端口2049,当然还有一些其他定义的高于1024的私有端口。 在solairs2.5.1/2.6/7下使用如下方式,可以自定义最小的非私有端口 ndd -set /dev/tcp tcp_smallest_nonpriv_port 2050 这样以来,0-2049都被定义为私有端口。 在solaris 2.6/7下,还能使用另一个参数单独指定私有端口。 #ndd /dev/tcp tcp_extra_priv_ports 2049 4045 用来显示已经定义的扩展私有端口 #ndd -set /dev/tcp tcp_extra_priv_ports_add 6112 来增加新的私有端口定义。 使用 ndd -set /dev/tcp tcp_extra_priv_ports_del 来删除定义。 要注意的是,不要随便定义私有端口,因为有些非根权限的进程会使用这些端口。特别是改变最小非私有端口这个参数,经常会引起问题。应仔细分析你的需求再用扩展私有端口定义的方式单独增加。 15、附件:设置脚本,来源于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 < [email protected]> # 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 |
| x3y4z5 回复于:2002-11-15 22:45:33 |
| 对yt老大很佩服,但我确实不懂。。。。 |
| YT 回复于:2002-11-15 23:11:54 |
| 那就简单的说吧: 如果你的网卡是叫qfe0的话,想设置成100MB的 Full-Duplex(全双工模式) 则可以这样做: ndd -set /dev/qfe instance 0 ndd -set /dev/qfe adv_100T4_cap 0 ndd -set /dev/qfe adv_100fdx_cap 1 ndd -set /dev/qfe adv_100hdx_cap 0 ndd -set /dev/qfe adv_10fdx_cap 0 ndd -set /dev/qfe adv_10hdx_cap 0 ndd -set /dev/qfe adv_autoneg_cap 0 或者修改/etc/system文件,加入: set qfe:qfe_adv_autoneg_cap=0 set qfe:qfe_adv_100T4_cap=0 set qfe:qfe_adv_100fdx_cap=1 set qfe:qfe_adv_100hdx_cap=0 set qfe:qfe_adv_10fdx_cap=0 set qfe:qfe_adv_10hdx_cap=0 不要佩服我,我们互相学习而已嘛。 呵呵 |