¥µ¡¼¥Ð¤Ê¤É¤Ë»ÈÍѤ¹¤ë¥Þ¥·¥ó¤ä¡¢
¾ðÊó¼Â¸³¡Ê³ØÉô2ǯÌܸå´ü¼ø¶È¡ÖʪÍý¼Â¸³µ¡×¡Ë¤Ç»ÈÍѤ¹¤ë
¾ðÊó¼Â¸³µ¡¤Ë¤Ï¸ÇÄê¤Î¥×¥é¥¤¥Ù¡¼¥ÈIP¥¢¥É¥ì¥¹¤ò
³ä¤ê¿¶¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤Ê¤ª, ¸ÇÄêIP¥¢¥É¥ì¥¹¤ÎÀßÄê¤Ï¶á¤¤¤¦¤Á¤Ë
gate-toroku-system
¤Ë´Þ¤Þ¤ì¤ëͽÄê¤Ê¤Î¤Ç, ¼êÆ°¤ÇÀßÄê¤ò¹Ô¤¦¤Î¤Ï¤½¤ì¤Þ¤Ç¤Î»ÃÄêŪ¤ÊÁ¼Ã֤Ǥ¹.
[1.1] ¸ÇÄêIP¥¢¥É¥ì¥¹³ä¤êÅö¤Æ¤Î¶ñÂÎŪ¼ê½ç
¤¢¤ë¥Þ¥·¥ó¤Ë¸ÇÄêIP¥¢¥É¥ì¥¹¤ò³ä¤ê¿¶¤ë¤Ë¤Ï
/etc/dhcpd.conf
¤òÊÔ½¸¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¡Ê²¼µ»²¾È¡Ë
¤½¤Î¸å DHCP¥Ç¡¼¥â¥ó¤ò
ºÆµ¯Æ°¤¹¤ë¤³¤È¤Ç͸ú¤Ë¤Ê¤ê¤Þ¤¹¡£
Î㤨¤Ð¡¢¡Ö00:90:cc:a2:f4:e8
¡×¤È¤¤¤¦ MAC¥¢¥É¥ì¥¹¤ò»ý¤Ä
¡Öhoge¡×¤È¤¤¤¦¥Û¥¹¥È̾¤Î¥Þ¥·¥ó ¤Ë IP¥¢¥É¥ì¥¹¡Ö192.168.0.100
¡×
¤ò³ä¤ê¿¶¤ë¤¿¤á¤Ë¤Ï°Ê²¼¤Î¹Ô¤ò
/etc/dhcpd.conf ¤Ë½ñ¤²Ã¤¨¤Þ¤¹¡£
host hoge {
hardware ethernet 00:90:cc:a2:f4:e8;
fixed-address 192.168.0.100;
}
½ñ¼°¤Ï
host ¥Û¥¹¥È̾ {
hardware ethernet £Í£Á£Ã¥¢¥É¥ì¥¹ ;
fixed-address £É£Ð¥¢¥É¥ì¥¹ ;
}
¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï PC °ì¤Ä°ì¤Ä¤ò¸Ä¡¹¤ËÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤Þ¤¿¡¢Æ°Åª¥¢¥É¥ì¥¹¤È½Å¤Ê¤é¤Ê¤¤¤è¤¦¤ËIP¥¢¥É¥ì¥¹¤òÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¡Ê¡Ö¥Û¥¹¥È̾¡×¤Ë´Ø¤·¤Æ¤Ï¡¢Êص¹¾åʬ¤«¤ê¤ä¤¹¤¤¤â¤Î¤ò¤Ä¤±¤Æ¤¤¤ë¤À¤±¤Ç¡¢
²¿¤ò½ñ¤¹þ¤ó¤Ç¤âÆ°ºî¤Ï¤·¤Þ¤¹¡£¡Ë
[1.2] ¸ÇÄꥢ¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤ë¥Þ¥·¥ó¤Î¾ðÊó
¸ÇÄê¤ÎIP¥¢¥É¥ì¥¹¤ò³ä¤ê¿¶¤ëºÝ¤Ë¤Ï¡¢
¤½¤Î¥¢¥É¥ì¥¹¤ò»ÈÍѤ¹¤ë¥Þ¥·¥ó¤Î´ÉÍý¼Ô¤Ê¤É¤Î¾ðÊó¤¬
¤ï¤«¤Ã¤Æ¤¤¤ë¤³¤È¤¬Ë¾¤Þ¤·¤¤¤¿¤á¡¢/etc/dhcpd.conf
¤Ë¤½¤Î¾ðÊó¤ò½ñ¤²Ã¤¨¤Þ¤¹¡£
¤³¤ì¤Ï¼êÆ°¤ÇÀßÄê¤ò¹Ô¤¦¤È¤¤ËÊØÍø¤Ê¤è¤¦¤Ë½ñ¤¯¤â¤Î¤Ç,
gate-toroku-system
¤¬µ¡Ç½¤·»Ï¤á¤¿Ãʳ¬¤ÇɬÍפʤ¯¤Ê¤ê¤Þ¤¹.
½ñ¤¤¤Æ¤ª¤¯¤Ù¤¾ðÊó¤Ï°Ê²¼¤Î5¤Ä¤Ç¤¹¡£
- ¡¦root
- ¥Þ¥·¥ó¤Î½êͼԤΥ¢¥«¥¦¥ó¥È [µÚ¤Ó¼Â̾]
- ¡¦place
- ÀßÃÖ¾ì½ê
- ¡¦note
- ÍÑÅӤʤÉ
- ¡¦accepted
- ¥¢¥É¥ì¥¹¤Î³ä¤êÅö¤Æ¤¬Í¸ú¤Ë¤Ê¤Ã¤¿Æü»þ
- ¡¦hostname
- ¥Þ¥·¥ó¤Î¥Û¥¹¥È̾
½ñ¼°¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£¥³¥á¥ó¥Èʸ¤Ê¤Î¤ÇʸƬ¤Ë¡Ö#¡×
¤ò¤Ä¤±¤Þ¤¹¡£
¡Ê¤â¤Ã¤È¤¹¤Ã¤¤ê¤¹¤ë½ñ¤Êý¤¬¤¢¤ì¤Ð¡¢ÊѤ¨¤Æ¤¯¤À¤µ¤¤¡Ë
# root: ¥¢¥«¥¦¥ó¥È̾ [¼Â̾], place: ÀßÃÖ¾ì½ê
# note: ÍÑÅӤʤÉ
# accepted: ÀßÄêÆü»þ, hostname: ¥Û¥¹¥È̾
Î㤨¤Ð¡¢¾åµ¤Îhoge¤È¤¤¤¦¥Þ¥·¥ó¤Ë¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤ëºÝ¤Ë¤Ï
ÀßÄê¤ÎÉôʬ¤Î¾å¤Ë¤³¤Î¾ðÊó¤ò½ñ¤²Ã¤¨¤Æ¤¯¤À¤µ¤¤¡£
¤Þ¤È¤á¤ë¤È°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¡Ê¥¢¥«¥¦¥ó¥È̾¤Ê¤É¤ÏÁ´¤Æ²Í¶õ¤Î¤â¤Î¤Ç¤¹¡Ë
# root: taro [ËÌÂç ÂÀϺ], place: 7-103
# note: ¤Ê¤Ë¤«¤Î¸¦µæ
# accepted: 2001-10-09, hostname: hoge
host hoge {
hardware ethernet 00:90:cc:a2:f4:e8;
fixed-address 192.168.0.100;
}
¾ðÊó¼Â¸³¤Ç»ÈÍѤ¹¤ë¾ðÊó¼Â¸³µ¡¤Ë¤Ï¸ÇÄê¤Î¥×¥é¥¤¥Ù¡¼¥ÈIP¥¢¥É¥ì¥¹
¤ò³ä¤êÅö¤Æ¤Þ¤¹¡£¡Ê¥°¥í¡¼¥Ð¥ë¥¢¥É¥ì¥¹¤ò»ý¤Ä3nµ¡¤ÏÊÌ¡Ë
[2.1] ³ä¤êÅö¤Æ¤ë¤Ù¤IP¥¢¥É¥ì¥¹
³ä¤êÅö¤Æ¤ë¥¢¥É¥ì¥¹¤Ï
192.168.0.(100+¾ðÊó¼Â¸³µ¡¤Î¥Ê¥ó¥Ð¡¼)
¤Ç¤¹¡£¤è¤Ã¤Æ
joho01 192.168.0.101
joho02 192.168.0.102
joho04 192.168.0.104
joho05 192.168.0.105
¡¦
¡¦
¡¦
joho20 192.168.0.120
joho22 192.168.0.122
joho23 192.168.0.123
¤È¤Ê¤ê¤Þ¤¹¡£¶ñÂÎŪ¤Ê³ä¤êÅö¤ÆÊý¤Ï
¾åµ
¤ò»²¹Í¤Ë¤·¤Æ²¼¤µ¤¤¡£
¢¨¾ðÊó¼Â¸³µ¡¤Ë´Ø¤·¤Æ¤Ï¡¢´ÉÍý¼Ô̾¤Ê¤É¤ò½ñ¤¹þ¤àɬÍפϤ¢¤ê¤Þ¤»¤ó¡£
[2.2] /etc/hosts ¤Ø¤ÎÄɲýñ¤¹þ¤ß
¸ÇÄêIP¤ò³ä¤êÅö¤Æ¤¿¤Î¤Ç¡¢
¥Û¥¹¥È̾¤ÈIP¥¢¥É¥ì¥¹¤òÂбþÉÕ¤±¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
°Ê²¼¤Î¤â¤Î¤ò /etc/hosts
¤Ø½ñ¤²Ã¤¨¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ì¤Ï¡¢blue¤¬¾ðÊó¼Â¸³µ¡¤ÈÄÌ¿®¤¹¤ë¤È¤¤Ë¥Û¥¹¥È̾¤Ç¤Ç¤¤ë¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ç¤¹¡£
192.168.0.101 joho01.ep.sci.hokudai.ac.jp joho01
192.168.0.102 joho02.ep.sci.hokudai.ac.jp joho02
192.168.0.104 joho04.ep.sci.hokudai.ac.jp joho04
192.168.0.105 joho05.ep.sci.hokudai.ac.jp joho05
192.168.0.107 joho07.ep.sci.hokudai.ac.jp joho07
192.168.0.108 joho08.ep.sci.hokudai.ac.jp joho08
192.168.0.110 joho10.ep.sci.hokudai.ac.jp joho10
192.168.0.111 joho11.ep.sci.hokudai.ac.jp joho11
192.168.0.113 joho13.ep.sci.hokudai.ac.jp joho13
192.168.0.114 joho14.ep.sci.hokudai.ac.jp joho14
192.168.0.116 joho16.ep.sci.hokudai.ac.jp joho16
192.168.0.117 joho17.ep.sci.hokudai.ac.jp joho17
192.168.0.119 joho19.ep.sci.hokudai.ac.jp joho19
192.168.0.120 joho20.ep.sci.hokudai.ac.jp joho20
192.168.0.122 joho22.ep.sci.hokudai.ac.jp joho22
192.168.0.123 joho23.ep.sci.hokudai.ac.jp joho23
¸ÇÄê¥×¥é¥¤¥Ù¡¼¥ÈIP¥¢¥É¥ì¥¹¤ÎÀßÄê¤Ï¶á¤¤¤¦¤Á¤Ë
gate-toroku-system
¤Ç´ÉÍý¤¹¤ë¤è¤¦¤Ë¤Ê¤ë¤¿¤á, ¤½¤ì¤ËÂбþ¤Ç¤¤ë¤è¤¦¤Ë
¸ÇÄê¥×¥é¥¤¥Ù¡¼¥È¥¢¥É¥ì¥¹¤ÇÀܳ¤ò¹Ô¤Ã¤Æ¤¤¤ë¥Þ¥·¥ó¤Ë¤Ä¤¤¤Æ
¤½¤ì¤¾¤ì, gate-toroku-system ¤Ç»ÈÍѤ·¤Æ¤¤¤ë
IP¥¢¥É¥ì¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤ÈƱÍͤΤâ¤Î¤òºîÀ®¤·¤Æ¤ª¤¤Þ¤¹.
¤Ê¤ª, ¤³¤Îºî¶È¤Ïgate-toroku-system¤¬µ¡Ç½¤¹¤ë¤Þ¤Ç¤Î
°ì»þŪ¤Ê´ü´Ö¤Î¤ß¹Ô¤¦¤â¤Î¤Ç¤¹.
[3.1] IP¥¢¥É¥ì¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤Î½ñ¼°
gate-toroku-system ¤Ç»ÈÍѤ·¤Æ¤¤¤ëIP¥¢¥É¥ì¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤ÎÆâÍƤÏ
°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹. (¤Ê¤ª, ²¼¤ÎÎã¤Ï¤Ç¤¿¤é¤á¤Ê¥Ñ¥é¥á¡¼¥¿¤ò½ñ¤¤¤Æ¤¢¤ê¤Þ¤¹.)
eth: 00:90:CC:A2:F0:A6
phase: result
type: A
root: hoge
hubport: AE002.3
cname:
place: 3-103
mx:
note: ¾ðÊó¼Â¸³ÍÑ
ip: 133.87.45.??
accepted: by nobody using gate-ip-apply on 2000-04-14T12:13:20+0000
owner: foo
hardware: PC98
date: 2001-11-30T12:28:32+0000
hostname: joho3
¾å¤ÎÎã¤ÇÀÖ»ú¤Ç½ñ¤¤¤Æ¤¢¤ëÉôʬ¤¬
¸ÇÄê¥×¥é¥¤¥Ù¡¼¥ÈIP¥¢¥É¥ì¥¹»ÈÍѤκݤËÀßÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤
(¤Ä¤Þ¤ê, ¥æ¡¼¥¶¤Ë¿½ÀÁ¤·¤Æ¤â¤é¤ï¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤)¹àÌܤǤ¹.
¤Þ¤¿, ÀÄ»ú¤Ç½ñ¤¤¤Æ¤¢¤ëÉôʬ¤Ï
DHCP¥µ¡¼¥Ð¤Î´ÉÍý¼Ô¤¬¤³¤Î¥«¡¼¥É¤òºîÀ®¤¹¤ëºÝ¤Ë,
¤½¤Î»þ¤Î»þ´Ö¤Ë¤è¤Ã¤ÆÊѹ¹¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¹àÌܤǤ¹.
[3.2] ¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥ÉºîÀ®¼ê½ç
¼ÂºÝ¤Ë¸ÇÄê¥×¥é¥¤¥Ù¡¼¥ÈIP¥¢¥É¥ì¥¹¤Î³ä¤êÅö¤Æ¤ò
¹Ô¤¦ºÝ¤Î¼ê½ç¤Ç¤¹.
[3.2.1] ¿½ÀÁ¤Î¼õ¤±ÉÕ¤±
IP¥¢¥É¥ì¥¹¤Î¿·µ¬¼èÆÀ¡¦Êѹ¹¡¦ÇÑ»ß
¤Ë½¾¤Ã¤Æ¸ÇÄê¥×¥é¥¤¥Ù¡¼¥ÈIP¥¢¥É¥ì¥¹¤ÎÅÐÏ¿¿½ÀÁ¤ò¹Ô¤Ã¤Æ¤â¤é¤¤¤Þ¤¹.
¿½ÀÁ¤ÎºÝ¤ËÍøÍѼԤϥǡ¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤ËɬÍפʾðÊó¤ò
½ñ¤¹þ¤à¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç,
¤³¤Î¿½ÀÁ¤ò¼õ¤±¤¿»þÅÀ¤Ç¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥ÉºîÀ®¤ËɬÍפʾðÊó¤Ï¼ê¤ËÆþ¤ê¤Þ¤¹.
([3.1]¤ÎÎã¤ÎÀÖ»ú¤ÎÉôʬ¤Ç¤¹)
[3.2.2] ¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥ÉºîÀ®
¿½ÀÁ¤ÎºÝ¤ËÆþ¼ê¤·¤¿¾ðÊ󤫤é¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Þ¤¹.
(´û¤Ë, À칶¥Í¥Ã¥È¥ï¡¼¥¯°Ñ°÷²ñ¤¬¾µÇ§¤·¤Æ¤¤¤ë¾ì¹ç¤ò¹Í¤¨¤Æ¤¤¤Þ¤¹)
- ´û¸¤ÎIP¥¢¥É¥ì¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤ò¥³¥Ô¡¼¤·, ¿÷·¿¤Ë¤·¤Þ¤¹.
(¤Á¤Ê¤ß¤Ë gate-toroku-system ¤ÎIP¥¢¥É¥ì¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥ÉÃÖ¤¾ì¤Ï
/home/gate/ipdb/ °Ê²¼)
- ¤½¤Î¥«¡¼¥É¤Î¥Õ¥¡¥¤¥ë̾¤ò¡Ö¥Û¥¹¥È̾¡×¤ÈƱ¤¸¤â¤Î¤Ë¤·¤Æ¤¯¤À¤µ¤¤.
(gate-toroku-system ¤Ç¤ÏIP¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤Î̾Á°¤Ï¤½¤³¤Ë
½ñ¤¹þ¤Þ¤ì¤Æ¤¤¤ë¥Û¥¹¥È̾¤ÈƱ¤¸)
- ¾åµ([3.1])¤ÎÎã¤ÎÀÖ»ú¤ÎÉôʬ¤ò, ¿½ÀÁ¤µ¤ì¤¿¾ðÊó
¤ò¸µ¤Ë½ñ¤¹þ¤ó¤Ç¤¤¤¤Þ¤¹.
- ºîÀ®»þ¹ï¤«¤éÀÄ»ú¤ÎÉôʬ¤òÊѹ¹¤·¤Þ¤¹.
°Ê¾å¤Ç¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤¬´°À®¤·¤Þ¤·¤¿.
[3.2.3] ¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤ÎÊÝ´É
°Ê¾å¤ÇºîÀ®¤·¤¿¥«¡¼¥É¤òÊݴɤ·¤Æ¤ª¤¤Þ¤¹.
ËÜÍè, gate-toroku-system ¤Ç¤ÏIP¥¢¥É¥ì¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ï
/home/gate/ipdb/ °Ê²¼¤ËÊݸ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬,
¸½ºß(2001/12/22)¤Ç¤Ï¤Þ¤À¤³¤Îµ¡Ç½¤¬ gate-toroku-system ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¤¿¤á,
gate-toroku-system ¤È¤Ï̵´Ø·¸¤Ê¤È¤³¤í¤Ë°ì»þÊݴɤ·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹.
º£¤Î¤È¤³¤í¤Ï, /etc/dhcpipdb ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·,
¤½¤ÎÃæ¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤òÊݴɤ·¤Æ¤ª¤¯¤³¤È¤Ë¤·¤Þ¤¹.
¤¤¤º¤ì gate-toroku-system ¤ËDHCP¥µ¡¼¥Ð¤ò´ÉÍý¤¹¤ëµ¡Ç½¤¬´Þ¤Þ¤ì¤¿¾ì¹ç¤Ë¤Ï
¤³¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥«¡¼¥É¤ò /home/gate/ipdb/ °Ê²¼¤Î
¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¹çή¤µ¤»¤Þ¤¹.
Ëü¤¬°ì¥µ¡¼¥Ð¤¬¥¯¥é¥Ã¥·¥å¤·¤¿¾ì¹ç¤ä
¾¤ÎPC¤Ë¤ªÌòÌܤò¾ù¤ë¾ì¹ç¤Ë
¤½¤Î¥µ¡¼¥ÐÆÃͤÎÀßÄêÃͤò»ý¤ÄÀßÄê¥Õ¥¡¥¤¥ë¤òÊݸ¤·¤Æ¤ª¤¯¤È
¼ê´Ö¤¬¾Ê¤±¤Þ¤¹¡£
[4.1] /etc/dhcpd.conf ¤ÎÊݸ
ưŪ³ä¤êÅö¤Æ¤ÎÀßÄê¤Ï¤È¤â¤«¤¯¡¢¼êÆ°³ä¤êÅö¤Æ¤Î¤¿¤á¤Î
MAC¥¢¥É¥ì¥¹¤ÈIP¥¢¥É¥ì¥¹¤È¤ÎÂбþɽ¤¬Âç»ö¤Ê¤Î¤Ç
¡Ê¸Å¤¤Âбþɽ¤Ï°ÕÌ£¤¬Ìµ¤¤¤Î¤Ç¡Ë
Êݸ¤·¤Æ¤ª¤¤¤¿Êý¤¬°ÂÁ´¤Ç¤¹¡£
¼«Ê¬¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ê¤É¤Ë¥³¥Ô¡¼¤·¤Æ¤ª¤¯¤ÈÎɤ¤¤Ç¤·¤ç¤¦¡£
[5.1.1] DHCP¤ò¡Ö郎¡×¡Ö¤¤¤Ä¡×»ÈÍѤ·¤Æ¤¤¤ë¤Î¤«¤ò³Îǧ¤¹¤ë¡£
DHCP¥µ¡¼¥Ð¤ò´ÉÍý¤¹¤ë¾å¤Ç¡¢¡Ö郎¡×¡Ö¤¤¤Ä¡×DHCP¥µ¡¼¥Ð¤ò»ÈÍѤ·¤¿¤Î¤«¤¬
¤ï¤«¤ì¤Ð²¿¤«¤¢¤Ã¤¿¤È¤¤Ë¸¶°ø¤òÄɵᤷ¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡£
Debian¤Ç¤Ï /var/log/syslog ¤Ê¤É¤Î
¥Õ¥¡¥¤¥ë¤Ë¡¢¥¯¥é¥¤¥¢¥ó¥È¤«¤é¤ÎÍ×µá¤ä¥µ¡¼¥Ð¤«¤é¤Î±þÅú
¤¬µÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
[5.1.2] ´ÉÍý¥í¥°
¶ñÂÎŪ¤ËµÏ¿¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Ï
- /var/log/syslog
- /var/log/syslog.0
- /var/log/syslog.1.gz
- /var/log/syslog.2.gz
- /var/log/syslog.3.gz
- /var/log/syslog.4.gz
- /var/log/syslog.5.gz
- /var/log/syslog.6.gz
¤Î6¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ç¤¹¡£°ì¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ë1Æüʬ¤Î¥í¥°¤¬Î¯¤Þ¤ê¡¢
¹ç·×1½µ´Öʬ¤Î¥í¥°¤¬Î¯¤Þ¤ê¤Þ¤¹¡£
¾ï¤Ë¹¹¿·¤µ¤ì¤Ä¤Å¤±¡¢ºÇ¿·¤Î¤â¤Î¤Ï /var/log/syslog
¤ËµÏ¿¤µ¤ì¤Þ¤¹¡£
²¼6¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ïgzip·Á¼°¤Ç°µ½Ì¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢
¡Özcat¡×¤ä¡Özless¡×
¤ò»ÈÍѤ¹¤ì¤ÐÃæ¿È¤ò¸«¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¡Ê¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ÎÀßÄê¤Ë¤è¤ê¥ë¡¼¥È¸¢¸Â¤¬Ìµ¤¤¤È¸«¤ë¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¤¬¡Ë
[5.1.3] ´ÉÍý¥í¥°¤ÎÃæ¿È
°Ê²¼¤Ï´ÉÍý¥í¥°¤ÎÃæ¿È¤Î°ìÉô¤ÎDHCP¤Ë´Ø·¸¤·¤¿Éôʬ¤À¤±¤ò
È´¿è¤·¤¿¤â¤Î¤Ç¤¹¡£¡ÊÃæ¿È¤Ï¾¯¡¹½ñ¤´¹¤¨¤Æ¤¢¤ê¤Þ¤¹¡£¡Ë
$ sudo zcat /var/log/syslog.1.gz
....
Jun 29 20:18:47 blue dhcpd-2.2.x: DHCPDISCOVER from 00:90:cc:a2:f4:e8 via eth1
Jun 29 20:18:47 blue dhcpd-2.2.x: DHCPOFFER on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 20:18:47 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.113 from 00:90:cc:a2:f4:e8 via eth1
Jun 29 20:18:47 blue dhcpd-2.2.x: DHCPACK on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 20:39:27 blue -- MARK --
Jun 29 20:56:03 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.149 from 00:90:cc:a2:a4:cb via eth1
Jun 29 20:56:03 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:08:47 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.113 from 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:08:47 blue dhcpd-2.2.x: DHCPACK on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:08:55 blue -- MARK --
Jun 29 21:14:19 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.149 from 00:90:cc:a2:a4:cb via eth1
Jun 29 21:14:19 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:23:03 blue dhcpd-2.2.x: DHCPDISCOVER from 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:23:03 blue dhcpd-2.2.x: DHCPOFFER on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:23:03 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.113 from 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:23:03 blue dhcpd-2.2.x: DHCPACK on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:26:52 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.149 from 00:90:cc:a2:a4:cb via eth1
Jun 29 21:26:52 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:29:21 blue -- MARK --
Jun 29 21:33:35 blue -- MARK --
Jun 29 21:34:48 blue dhcpd-2.2.x: DHCPREQUEST for 192.168.0.149 from 00:90:cc:a2:a4:cb via eth1
Jun 29 21:34:48 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:59:27 blue -- MARK --
....
|
¡Ö»þ´Ö¡×¡Ö¥Ñ¥±¥Ã¥È¤ÎÆâÍơסÖÍ׵ᤷ¤¿¥¯¥é¥¤¥¢¥ó¥È¤ÎMAC¥¢¥É¥ì¥¹¡×
¡ÖÂߤ·¤¿IP¥¢¥É¥ì¥¹¡×¤È¤¤¤Ã¤¿¤â¤Î¤¬µÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
¡Ö¥Ñ¥±¥Ã¥È¤ÎÆâÍơפ˴ؤ·¤Æ¤Ï
epnetfan 2001ǯÅÙ ºÂ³ØÊÔ ¡ÖDHCP¤È¤Ï¡©¡×
¤ËÀâÌÀ¤¬ºÜ¤Ã¤Æ¤¤¤Þ¤¹¡£
¢¨flash¥³¥ó¥Æ¥ó¥Ä¤Ê¤Î¤Ç¡¢ÍÆÎ̤¬Â礤¯¥À¥¦¥ó¥í¡¼¥É¤Ë»þ´Ö¤¬¤«¤«¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
¤Þ¤¿¡¢¥Ö¥é¥¦¥¶¤Ë¤è¤Ã¤Æ¤Ï¸«¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡¢¤Ê¤É¤Î²ÄǽÀ¤¬¤¢¤ê¤Þ¤¹¡£
¸æλ¾µ¤¯¤À¤µ¤¤¡£
[5.1.4] ¾¯¡¹ÊØÍø¤Ê(?)´ÉÍý¥í¥°¤Î³Îǧˡ
Àè¤Û¤É¤Î¥í¥°¤ÎÃæ¿È¤ËÁ´¤ÆÌܤòÄ̤¹¤Î¤ÏÂçÊѤʤΤǡÖgrep¡×
¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤ÆɬÍפÊÉôʬ¤À¤±¤ò¼è¤ê½Ð¤¹¤È³Îǧ¤¬³Ú¤Ç¤¹¡£
Î㤨¤Ð¡¢°Ê²¼¤ÎÊýË¡¤Ï¤É¤¦¤Ç¤·¤ç¤¦?
$ sudo zcat /var/log/syslog.1.gz | grep DHCPACK | less
....
Jun 29 20:18:47 blue dhcpd-2.2.x: DHCPACK on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 20:56:03 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:08:47 blue dhcpd-2.2.x: DHCPACK on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:14:19 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:23:03 blue dhcpd-2.2.x: DHCPACK on 192.168.0.113 to 00:90:cc:a2:f4:e8 via eth1
Jun 29 21:26:52 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
Jun 29 21:34:48 blue dhcpd-2.2.x: DHCPACK on 192.168.0.149 to 00:90:cc:a2:a4:cb via eth1
....
|
¤³¤¦¤¹¤ë¤È³Îǧ¤¬¡Ê¿¾¯¤Ï¡Ë³Ú¤Ë¤Ê¤ê¤Þ¤¹¡£
¾åµ¤Î¥³¥Þ¥ó¥É¤ÏŤ¤¤Î¤Ç¡¢»ÈÍѤ¹¤ë¤Ê¤éalias¤Ê¤É¤ËÅÐÏ¿¤·¤Æ¤ª¤±¤Ð
¤è¤¤¤Ç¤·¤ç¤¦¡£
[5.2.1] ¡ÖưŪIP¥¢¥É¥ì¥¹¡×¤ò¤É¤Î¤è¤¦¤Ë³ä¤ê¿¶¤Ã¤Æ¤¤¤ë¤Î¤«Ä´¤Ù¤ë¡£
DHCP¥µ¡¼¥Ð¤Ç¤Ï¡ÖIP¥¢¥É¥ì¥¹¤ÎưŪ³ä¤êÅö¤Æ¡×¤ò¹Ô¤¤¤Þ¤¹¤¬¡¢
¡Öï¤Ë¡Ê¤É¤Î¥Û¥¹¥È¤Ë¡Ë¡×¡¢¡Ö¤É¤ÎIP¥¢¥É¥ì¥¹¤ò¡×¡¢¡Ö¤¤¤Ä¤«¤é¤¤¤Ä¤Þ¤Ç¡×³ä¤êÅö¤Æ¤¿¤Î¤«
¤òµÏ¿¤·¤Æ¤¤¤ë¥í¥°¤¬¤¢¤ê¤Þ¤¹¡£
[5.2.2] ´ÉÍý¥í¥°
¶ñÂÎŪ¤ËµÏ¿¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Ï°Ê²¼¤Î¤â¤Î¤Ç¤¹¡£
[5.2.3] ´ÉÍý¥í¥°¤ÎÃæ¿È
°Ê²¼¤Ï´ÉÍý¥í¥°¤ÎÃæ¿È¤Î°ìÉô¤Ç¤¹¡£¡ÊÃæ¿È¤Ï¾¯¡¹½ñ¤´¹¤¨¤Æ¤¢¤ê¤Þ¤¹¡Ë
$ sudo cat /var/dhcp/dhcp.leases
....
lease 192.168.0.132 {
starts 5 2001/05/25 12:56:40;
ends 6 2001/05/26 00:56:40;
hardware ethernet 00:90:cc:a2:f9:36;
client-hostname "joho24";
}
lease 192.168.0.135 {
starts 5 2001/05/25 16:22:56;
ends 5 2001/05/25 18:02:56;
hardware ethernet 00:90:27:18:ef:89;
uid 01:00:90:27:18:ef:89;
client-hostname "hirame";
}
lease 192.168.0.133 {
starts 5 2001/05/25 15:21:50;
ends 5 2001/05/25 17:01:50;
hardware ethernet 00:90:cc:a2:f9:41;
uid 01:00:90:cc:a2:f9:41;
client-hostname "JOHO05";
}
lease 192.168.0.130 {
starts 5 2001/05/25 15:45:43;
ends 5 2001/05/25 16:26:52;
hardware ethernet 00:90:cc:a2:f4:e8;
uid 01:00:90:cc:a2:f4:e8;
}
....
|
¡Östart¡×¤ÏÂߤ·½Ð¤·³«»Ï»þ´Ö¡¢¡Östop¡×¤ÏÂߤ·½Ð¤·½ªÎ»»þ´Ö¤Ç¤¹¡£
¤Ê¤ª¡¢¤³¤³¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤ë»þ´Ö¤Ï¥°¥ê¥Ë¥Ã¥¸É¸½à»þ(GMT)
¤Ê¤Î¤Ç¡¢¥µ¡¼¥Ð¤Î¥Ñ¥½¥³¥ó¤Î»þ´Ö¤È¤º¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¤¬
µ¤¤Ë¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
Í׵ᤷ¤¿¥¯¥é¥¤¥¢¥ó¥È¤Î¥Ñ¥½¥³¥ó¤Ë¤Á¤ã¤ó¤È¥Û¥¹¥È̾¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï
¥Û¥¹¥È̾¤¬É½¼¨¤µ¤ì¡¢¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
[6.1] netstat ¥³¥Þ¥ó¥É
¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀܳ¾õ¶·¤ä¥ë¡¼¥Æ¥£¥ó¥°¥Æ¡¼¥Ö¥ë¤òÄ´¤Ù¤ë¤¿¤á¤Ë
¡Önetstat¡×¤È¤¤¤¦¥³¥Þ¥ó¥É¤¬¤¢¤ê¤Þ¤¹¡£
¤³¤Î¥³¥Þ¥ó¥É¤ÇIP¥Þ¥¹¥«¥ì¡¼¥É¤ÇÀܳ¤·¤Æ¤¤¤ë¥Þ¥·¥ó¤Î
¥ë¡¼¥Æ¥£¥ó¥°¾ðÊó¤âÆÀ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
IP¥Þ¥¹¥«¥ì¡¼¥ÉÀܳ¤Î¥Þ¥·¥ó¤ÎÀܳ¾õ¶·¤ò¸«¤ë¤¿¤á¤Ë¤Ï°Ê²¼¤Î¥³¥Þ¥ó¥É¤òÆþÎϤ·¤Þ¤¹¡£
$ netstat -Mn
IP masquerading entries
prot expire source destination ports
udp 2:36.23 192.168.0.134 133.87.45.70 1024 -> 53 (65072)
udp 4:38.11 192.168.0.120 133.87.45.70 1024 -> 53 (65083)
tcp 14:59.97 192.168.0.134 133.87.45.72 888 -> 22 (65073)
tcp 14:12.69 192.168.0.130 133.87.45.72 1136 -> 22 (64810)
tcp 0:55.22 192.168.0.120 133.87.45.72 1165 -> 80 (65084)
tcp 0:55.22 192.168.0.120 133.87.45.72 1166 -> 80 (65086)
tcp 0:42.22 192.168.0.123 133.87.45.72 1037 -> 80 (65081)
tcp 0:42.22 192.168.0.123 133.87.45.72 1036 -> 80 (65079)
....
|
³Æ¹àÌÜ |
ɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Î°ÕÌ£ |
-n ¥ª¥×¥·¥ç¥ó¤ò¤Ä¤±¤Ê¤«¤Ã¤¿¾ì¹ç |
prot |
»ÈÍѤµ¤ì¤Æ¤¤¤ë¥×¥í¥È¥³¥ë |
expire |
ÄÌ¿®¤¬ÀÚÃǤµ¤ì¤ë¤Þ¤Ç¤Î»Ä¤ê»þ´Ö |
source |
ȯ¿®¸µ¤ÎIP¥¢¥É¥ì¥¹ |
ȯ¿®¸µ¤Î¥Û¥¹¥È¥Í¡¼¥à(ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤ÏIP¥¢¥É¥ì¥¹) |
destination |
Á÷¿®Àè¤ÎIP¥¢¥É¥ì¥¹ |
Á÷¿®Àè¤Î¥É¥á¥¤¥ó¥Í¡¼¥à |
ports |
¥Ý¡¼¥ÈÈÖ¹æ |
¥µ¡¼¥Ó¥¹Ì¾ |