Last update: Oct 12, 2002
Copyright (C) 2000-2002 Hideaki Goto
# cp -p /etc/inet/inetd.conf /etc/inet/inetd.conf.DIST
/etc/inet/inetd.conf を編集すると、次のようなブロックが
見つかるはずです。(Solaris8では tcp, udp がそれぞれ
tcp6, udp6 になっています)
#
# Echo, discard, daytime, and chargen are used primarily for testing.
#
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
これらはすべて不要です。 もし各行頭の echo, discard, daytime, chargen の
前に # が付いていなかったら、上の例のように # を挿入しておきます。
inetd.conf を編集しただけでは、デーモン
として動き続けている inetd には反映されません。 以下の例のように
inetd のプロセスID.を調べて、HUPシグナルを送ります。
# ps -ef | grep inetd
root 157 1 0 4月 11 ? 0:01 /usr/sbin/inetd -s
# kill -HUP 157
#
# Tftp service is provided primarily for booting. Most sites run this
# only on machines acting as "boot servers."
#
#tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
もし tftp の頭に # が付いていなかったら、# を挿入します。
inetd に HUPシグナルを送ることを忘れずに。
% finger @kamo
とします。 ユーザのログイン名が分かっていれば、
@マークの前にログイン名も書けます。
恐くないですか?
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers." Many sites choose to disable
# some or all of these services to improve security.
#
finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd
#systat stream tcp nowait root /usr/bin/ps ps -ef
#netstat stream tcp nowait root /usr/bin/netstat netstat -f inet
コメントにしっかりと書いてあるではないですか!!
#
# The rusers service gives out user information. Sites concerned
# with security may choose to disable it.
#
rusersd/2-3 tli rpc/datagram_v,circuit_v wait root /usr/lib/netsvc/rusers/rpc.rusersd rpc.rusersd
行頭の rusersd の前に # を挿入しておきます。
somewhere(1)% ping -s 192.168.80.63
PING 192.168.80.63: 56 data bytes
64 bytes from kero5 (192.168.80.5): icmp_seq=0. time=5. ms
64 bytes from kero18.Xlabo.hoge.ac.jp (192.168.80.18): icmp_seq=0. time=5. ms
64 bytes from kero17.Xlabo.hoge.ac.jp (192.168.80.17): icmp_seq=0. time=6. ms
64 bytes from kero54.Xlabo.hoge.ac.jp (192.168.80.54): icmp_seq=0. time=6. ms
64 bytes from kero2 (192.168.80.2): icmp_seq=0. time=7. ms
64 bytes from kero56.Xlabo.hoge.ac.jp (192.168.80.56): icmp_seq=0. time=7. ms
64 bytes from kero9.Xlabo.hoge.ac.jp (192.168.80.9): icmp_seq=0. time=8. ms
64 bytes from 192.168.80.51: icmp_seq=0. time=9. ms
64 bytes from kero1.Xlabo.hoge.ac.jp (192.168.80.1): icmp_seq=0. time=13. ms
64 bytes from kero44.Xlabo.hoge.ac.jp (192.168.80.44): icmp_seq=0. time=13. ms
64 bytes from kero59.Xlabo.hoge.ac.jp (192.168.80.59): icmp_seq=0. time=14. ms
64 bytes from kero3.Xlabo.hoge.ac.jp (192.168.80.3): icmp_seq=0. time=14. ms
^C
----192.168.80.63 PING Statistics----
1 packets transmitted, 12 packets received, 12.00 times amplification
round-trip (ms) min/avg/max = 2/8/14
1つのパケットに対してみんなで一斉に答えてきたので、12倍にパケットが
ふくれ上がっています。 サブネット外から試しても一斉に返事が返ってくる
ようならば、これを悪用してWSやネットワークを使用不能に陥れられる
ことがあります。 以下のサイトの説明が参考になります。
# /usr/sbin/ndd -set /dev/ip ip_forward_directed_broadcasts 0
# /usr/sbin/ndd -set /dev/ip ip_respond_to_echo_broadcast 0
リブートしても自動的に反映されるように、/etc/rc2.d/S69inet に
書き加えておきます。
# Machine is a router: turn on ip_forwarding, run routed,
# and advertise ourselves as a router using router discovery.
echo 'machine is a router.'
/usr/sbin/ndd -set /dev/ip ip_forwarding 1
/usr/sbin/ndd -set /dev/ip ip_forward_directed_broadcasts 0
/usr/sbin/ndd -set /dev/ip ip_respond_to_echo_broadcast 0
[ -f /usr/sbin/in.routed ] && /usr/sbin/in.routed -s
[ -f /usr/sbin/in.rdisc ] && /usr/sbin/in.rdisc -r
#
# Machine is an IPv4 router: turn on ip_forwarding, run
# in.routed, and advertise ourselves as a router using router
# discovery.
#
echo 'Machine is an IPv4 router.'
/usr/sbin/ndd -set /dev/ip ip_forwarding 1
/usr/sbin/ndd -set /dev/ip ip_forward_directed_broadcasts 0
/usr/sbin/ndd -set /dev/ip ip_respond_to_echo_broadcast 0
[ -f /usr/sbin/in.routed ] && /usr/sbin/in.routed -s
[ -f /usr/sbin/in.rdisc ] && /usr/sbin/in.rdisc -r