/usr/share/doc/HOWTO/ja-html/Config-HOWTO-3.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Configuration HOWTO: °ìÈÌŪ¤Ê´ÉÍýºî¶È</TITLE>
<LINK HREF="Config-HOWTO-4.html" REL=next>
<LINK HREF="Config-HOWTO-2.html" REL=previous>
<LINK HREF="Config-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="Config-HOWTO-4.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Config-HOWTO-2.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Config-HOWTO.html#toc3">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s3">3. °ìÈÌŪ¤Ê´ÉÍýºî¶È</A></H2>
<P>
<P>½ñ¤¯¤³¤È¤Ï¤¿¤¯¤µ¤ó¤¢¤ê¤Þ¤¹¤¬¡¢»þ´Ö¤Ï¸Â¤é¤ì¤Æ¤¤¤Þ¤¹! ¤³¤³¤Ï³Ú¤·¤¯¤ä¤ê¤Þ
¤·¤ç¤¦¡£Â¾¤Ë¤â¤¿¤¯¤µ¤ó¤Îºî¶È¤¬¤¢¤Ê¤¿¤òÂÔ¤Á¤«¤Þ¤¨¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤ÎÀá¤Ï
¥Í¥Ã¥È¥ï¡¼¥¯Ãæ¿´¤Ç¹Ô¤¤Þ¤¹¡£
<P>¥Í¥Ã¥È¥ï¡¼¥¯¤ÎʬÌî¤Ï¤È¤Æ¤â¹¤¯¡¢¤³¤³¤ÇÀâÌÀ¤·¿Ô¤¯¤¹¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£»²
¹Íʸ¸¥¤È¤·¤Æ NET-3 HOWTO ¤òµó¤²¤Æ¤ª¤¤Þ¤¹¡£¤Þ¤¿¡¢¤Û¤È¤ó¤É¤Î¥Ç¥£¥¹¥È¥ê
¥Ó¥å¡¼¥·¥ç¥ó¤Ë¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥µ¡¼¥Ó¥¹¤ÎÀßÄê¤Ë¤Ä¤¤¤Æ¤Îʸ½ñ¤¬ÉÕ°¤·¤Æ¤¤¤Þ
¤¹¡£¤³¤³¤Ç¤Ï¤¤¤¯¤Ä¤«¤ÎÅÀ¤À¤±¤òºÆ³Îǧ¤·¤Þ¤·¤ç¤¦¡£
<P>¤¢¤Ê¤¿¤¬¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤È»×¤ï¤ì¤ë¥µ¡¼¥Ó¥¹¤Ë¤Ä¤¤¤Æ¤¹¤Ù¤¤³¤È¤Î´Êñ¤Ê¥ê
¥¹¥È¤ò¼¨¤·¤Þ¤¹: cron ¤ä timed ¤È¤¤¤Ã¤¿¥«¥ì¥ó¥À¡¼¤äÈ÷˺Ͽ¡£http, samba,
telnet/ssh ¤Î¥¢¥¯¥»¥¹¡¢anonymous FTP, POP/IMAP ¥µ¡¼¥Ð¡¢NFS ¥µ¡¼¥Ó¥¹¡Ä¡£
<P>
<H2><A NAME="ss3.1">3.1 ¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀßÄê</A>
</H2>
<P>
<P>¤ª»È¤¤¤Î¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ë¤ª¤¤¤Æ¥Í¥Ã¥È¥ï¡¼¥¯¥µ¡¼¥Ó¥¹¤ò¿·¤·¤¯ÄɲÃ
¤¹¤ë¤¿¤á¤Î¼ÂºÝ¤Î¼ê½ç¤Ï¤â¤Ã¤È¤º¤Ã¤ÈÊ£»¨¤Ç¤¹¤¬¡¢°Ê²¼¤Î¥¹¥¯¥ê¥×¥È¤ÏºÇ½é¤Î
¼ê¤¬¤«¤ê¤È¤·¤Æ¤Ï½½Ê¬¤Ê¤Ï¤º¤Ç¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
#!/bin/sh
# net-up.sh: set up network access
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
ifconfig $DEVICE $IPADDR netmask $NETMASK up
route add -net $NETWORK netmask $NETMASK $DEVICE
route add default gw $GATEWAY
</PRE>
</CODE></BLOCKQUOTE>
<P>¤³¤Î¥¹¥¯¥ê¥×¥È¤ò»È¤¦¤È¡¢¥ì¥¹¥¥å¡¼¥Ç¥£¥¹¥¯¤Î»ÈÍÑ»þ¤Ë¼ê·Ú¤Ë¥Í¥Ã¥È¥ï¡¼¥¯
¥¢¥¯¥»¥¹¤ò͸ú¤Ë¤Ç¤¤Þ¤¹¡£¸«¤Æ¤ÎÄ̤ê¤Ç¤¹¤¬¡¢¤³¤Î¥¹¥¯¥ê¥×¥È¤Ç¤Ï³°Éô¤Ë
ping, ftp, telnet ¤·¤«¤Ç¤¤Þ¤»¤ó¡£
<P>
<H2><A NAME="ss3.2">3.2 ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ø¤ÎÀܳ¤Î¶¦Í</A>
</H2>
<P>
<P>¤³¤ì¤Ï Linux ¤ò¥µ¡¼¥Ð¤È¤·¤Æ»È¤¦¤ÈÊØÍø¤Ê»Å»ö¤Î¤Ò¤È¤Ä¤Ç¤¹¡£¸½ºß¤Ï¡¢¤´¤¯
Ê¿Ëޤʥ«¡¼¥Í¥ë¤Ç¤â IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ëµ¡Ç½, IP ¥Þ¥¹¥«¥ì¡¼¥Éµ¡Ç½¡¢
¥Õ¥©¥ï¡¼¥Ç¥£¥ó¥°µ¡Ç½¤¬¥Ç¥Õ¥©¥ë¥È¤Ç͸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê
¤¤¤è¤¦¤Ç¤¢¤ì¤Ð¡¢IP-Masquerade mini-HOWTO ¤ò¤´Í÷¤Ë¤Ê¤Ã¤Æ¡¢¤³¤ì¤é¤Îµ¡Ç½
¤ò͸ú¤Ë¤¹¤ëÊýË¡¤òÄ´¤Ù¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤«¤é
ipfwadm (¥«¡¼¥Í¥ë 2.0.x;
<A HREF="http://www.xos.nl/linux/ipfwadm/">http://www.xos.nl/linux/ipfwadm/</A>)
¤Þ¤¿¤Ï
ipchains (¥«¡¼¥Í¥ë 2.2.x;
<A HREF="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html">http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html</A>)
¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£É¬Íפʥµ¡¼¥Ó¥¹¤Î¤¿¤á¤Î¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤ò
͸ú¤Ë¤¹¤ë¤Î¤ò˺¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£Î㤨¤Ð¡¢FTP ¤ò»È¤¦¤¿¤á¤Ë¤Ï°Ê²¼¤Î¹Ô¤ò
/etc/rc.d/rc.sysconfig ¤ËÄɲä·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
/sbin/modprobe ip_masq_ftp
</PRE>
</CODE></BLOCKQUOTE>
<P>¤³¤Î¾¤Î¥â¥¸¥å¡¼¥ë¤ÏÉáÄÌ¡¢
/lib/modules/KERNEL-VERSION/ipv4 ¤Ë¤¢¤ê¤Þ¤¹¡£
<P>¤¢¤Ê¤¿¤Î LAN ¤Ë¤¤¤ë¾¤Î¥Þ¥·¥ó¤ËÂФ·¤Æ IP ¥Þ¥¹¥«¥ì¡¼¥Éµ¡Ç½¤ò͸ú¤Ë¤¹¤ë
¤Î¤Ï¤È¤Æ¤â´Êñ¤Ç¤¹¡£¤Þ¤º¡¢¥Í¥Ã¥È¥ï¡¼¥¯½é´ü²½¥¹¥¯¥ê¥×¥È
(/etc/sysconfig/network ¤¬Àµ¤·¤¤¾ì½ê¤Î¤Ï¤º¤Ç¤¹)¤òÄ´¤Ù¤Æ¡¢
<CODE>FORWARD_IPV4=true</CODE> ¤È¤¤¤¦¹Ô¤¬¤¢¤ë¤«¤É¤¦¤«¤ò³Îǧ¤·¤Þ¤¹¡£¤³¤ì¤Ï¡¢
¥Í¥Ã¥È¥ï¡¼¥¯¥µ¥Ö¥·¥¹¥Æ¥à¤¬Î©¤Á¾å¤¬¤ë»þ¤Ë
/proc/sys/net/ipv4/ip_forward ¤ò 1 ¤ËÀßÄꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì
¤Þ¤¹¡£
<P>°Ê²¼¤Î¹Ô¤ò /etc/rc.d/rc.sysinit ¤ËÄɲä·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
# default: packets cannot go reach the outside
/sbin/ipfwadm -F -p deny
# allow all machines on the local network to reach the Internet
/sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
# alternatively, allow only these two machines
# /sbin/ipfwadm -F -a m -S 192.168.1.100/24 -D 0.0.0.0/0
# /sbin/ipfwadm -F -a m -S 192.168.1.101/24 -D 0.0.0.0/0
</PRE>
</CODE></BLOCKQUOTE>
<P>¥«¡¼¥Í¥ë 2.2.x ·Ï¤ò¤ª»È¤¤¤Ç¤¢¤ì¤Ð¡¢<CODE>ipfwadm</CODE> ¤Ç¤Ï¤Ê¤¯
<CODE>ipfwadm-wrapper</CODE> ¤ò»È¤¦¤ÈÁÇÁ᤯Ω¤Á¾å¤¬¤ê¤Þ¤¹¡£
<P>¤³¤³¤Þ¤Ç¤¯¤ë¤È¡¢¥¯¥é¥¤¥¢¥ó¥È¥Þ¥·¥ó¤«¤é ISP ¤ËÅÅÏäò¤«¤±¤µ¤»¤ë¼ê¤¬Íߤ·
¤¯¤Ê¤ë¤Ç¤·¤ç¤¦¡£É®¼Ô¤Ï
Mserver (
<A HREF="http://cpwright.villagenet.com/mserver/">http://cpwright.villagenet.com/mserver/</A>)
¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£etc/mserver.conf ¤òÊÔ½¸¤·¤Æ¤¯¤À¤µ¤¤¡£
½¤Àµ¤¹¤ëɬÍפ¬¤¢¤ë¹àÌÜ¤Ï ``checkhost'', ``shadow'', ``cname'' ¤À¤±¤Ç¤¹¡£
¼¡¤ËÀܳ(Ê£¿ô²Ä)¤òÄêµÁ¤·¤Þ¤¹¡£¤â¤Á¤í¤ó¡¢¥¯¥é¥¤¥¢¥ó¥È¥Þ¥·¥ó¤Ë¤Ï¡¢
ÍøÍѲÄǽ¤Ê¥¯¥é¥¤¥¢¥ó¥È¤Î¤Ò¤È¤Ä¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£
<P>
<P>
<P>
<H2><A NAME="Restricting"></A> <A NAME="ss3.3">3.3 ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥¯¥»¥¹¤ÎÀ©¸Â </A>
</H2>
<P>
<P>PPP ¤ò»È¤Ã¤Æ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤Ç¤¤¿¤â¤Î¤È¤·¤Þ¤¹¡£¤¤¤Ã¤¿¤óÀܳ¤¹¤ë¤È¡¢
¤¢¤Ê¤¿¤Î¥Þ¥·¥ó¤Ï¹¶·â¤Ë¤µ¤é¤µ¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£¤½¤³¤Ç¡¢°Ê²¼¤Î¹Ô¤ò
/etc/hosts.allow ¤ËÄɲ䷤Ƥ¯¤À¤µ¤¤:
<P>
<BLOCKQUOTE><CODE>
<PRE>
# only allow access to localhost
ALL: 127.
</PRE>
</CODE></BLOCKQUOTE>
<P>¤½¤ì¤«¤é°Ê²¼¤Î¹Ô¤ò /etc/hosts.deny ¤ËÄɲä·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
# deny access to everyone
ALL: ALL
</PRE>
</CODE></BLOCKQUOTE>
<P>¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËľÀÜ·Ò¤¬¤Ã¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ë½ê°¤·¤Æ¤¤¤ë¤Ê¤é¡¢
finger, telnet, ¤½¤ì¤«¤é¾¤Î¥µ¡¼¥Ó¥¹¤â¥»¥¥å¥ê¥Æ¥£¤Î¤¿¤á¤Ë»ß¤á¤Æ¤ª¤¯Êý
¤¬¤è¤¤¤Ç¤·¤ç¤¦¡£telnet ¤ÎÂå¤ï¤ê¤Ë¤Ï <CODE>ssh</CODE> ¤ò»È¤¤¤Þ¤·¤ç¤¦¡£ÊÔ½¸
¤¹¤Ù¤¥Õ¥¡¥¤¥ë¤Ï /etc/inetd.conf ¤Ç¤¹¡£¥µ¡¼¥Ó¥¹¤ò»ß¤á¤ëÂå
¤ï¤ê¤Ë¡¢°Ê²¼¤Î¹Ô¤ò /etc/hosts.allow ¤ËÄɲ䷤ƥͥåȥ¥¯
¥¢¥¯¥»¥¹¤òÀ©¸Â¤¹¤ëÊýË¡¤â¤¢¤ê¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
in.telnetd: 192.168.1., .¾¤Î.¿®Íꤷ¤Æ¤¤¤ë.¥Í¥Ã¥È¥ï¡¼¥¯
in.ftpd: 192.168.1., .¾¤Î.¿®Íꤷ¤Æ¤¤¤ë.¥Í¥Ã¥È¥ï¡¼¥¯
</PRE>
</CODE></BLOCKQUOTE>
<P>¤½¤ì¤«¤é°Ê²¼¤Î¹Ô¤ò /etc/hosts.deny ¤ËÄɲä·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
in.telnetd: ALL
in.ftpd: ALL
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>
<H2><A NAME="ss3.4">3.4 NFS ¤Î¥¨¥¯¥¹¥Ý¡¼¥È</A>
</H2>
<P>
<P>¥µ¡¼¥Ð¾å¤ËÃÖ¤¤¤Æ¤¤¤ë¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Î¥¨¥¯¥¹¥Ý¡¼¥È¤Ï°ìÈÌŪ¤Ë¹Ô¤ï¤ì¤Æ
¤¤¤Þ¤¹¡£¤È¤³¤í¤¬¡¢¤¢¤ë¥æ¡¼¥¶¤Î UID ¤ä GID ¤¬¥Þ¥·¥ó´Ö¤Ç°ìÃפ·¤Æ¤¤¤Ê¤¤¤È
ÌäÂ꤬µ¯¤³¤ê¤Þ¤¹¡£¥æ¡¼¥¶ guido ¤Î UID/GID ¤¬ <CODE>server</CODE> ¤Ç 500 ¤Ç
¤¢¤ê¡¢<CODE>client</CODE> ¤Ç 512 ¤Î¾ì¹ç¤Ë¤Ï¡¢°Ê²¼¤ÎÀßÄ꤬ÊØÍø¤Ç¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
# /etc/exports
/tmp ¼«Ê¬¤Î.¥¯¥é¥¤¥¢¥ó¥È.¥Þ¥·¥ó(rw)
/home/guido ¼«Ê¬¤Î.¥¯¥é¥¤¥¢¥ó¥È.¥Þ¥·¥ó(rw,map_static=/etc/nfs/client.map)
</PRE>
</CODE></BLOCKQUOTE>
<P>/etc/nfs/client.map ¤Ï°Ê²¼¤Î¤è¤¦¤Ë½ñ¤¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
# /etc/nfs/client.map
# NFS mapping for client
# remote local
uid 512 500
gid 512 500
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>
<P>
<H2><A NAME="ss3.5">3.5 ¥Í¡¼¥à¥µ¡¼¥Ð</A>
</H2>
<P>
<P>¤Þ¤À½ñ¤±¤Æ¤¤¤Þ¤»¤ó¡£
<P>
<HR>
<A HREF="Config-HOWTO-4.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Config-HOWTO-2.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Config-HOWTO.html#toc3">Ìܼ¡¤Ø</A>
</BODY>
</HTML>
|