/usr/share/doc/HOWTO/ja-html/VPN-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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>VPN HOWTO: ¥µ¡¼¥Ð</TITLE>
<LINK HREF="VPN-HOWTO-4.html" REL=next>
<LINK HREF="VPN-HOWTO-2.html" REL=previous>
<LINK HREF="VPN-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="VPN-HOWTO-4.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO-2.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO.html#toc3">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s3">3. ¥µ¡¼¥Ð</A></H2>
<P>¥µ¡¼¥Ð̵¤·¤Ç¤Ï¥¯¥é¥¤¥¢¥ó¥È¤Ï²¿¤ÎÌò¤Ë¤âΩ¤¿¤Ê¤¤¤Î¤Ç¡¢¤³¤Î¥»¥¯¥·¥ç¥ó¤Ç¤Ï
ºÇ½é¤Ë¤ä¤ë¤Ù¤¤¤¤¯¤Ä¤«¤Î¤³¤È¤ò¡¢¥µ¡¼¥Ð¦¤Ç¤¤¤«¤ËÀßÄꤹ¤ë¤«½Ò¤Ù¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£
<H2><A NAME="ss3.1">3.1 ¥»¥¥å¥ê¥Æ¥£ ¡Ý ¿Í¡¹¤òÄù¤á½Ð¤¹</A>
</H2>
<P>VPN ¤Ë¤È¤Ã¤Æ¥»¥¥å¥ê¥Æ¥£¤ÏÈó¾ï¤Ë½ÅÍפǤ¹¡£Âè°ì¡¢¤À¤«¤é¤³¤½ VPN ¤ò¹½ÃÛ¤·¤Æ
¤¤¤ë¤ó¤Ç¤¹¤è¤Í¡© ¥µ¡¼¥Ð¤òÀßÄꤹ¤ë¤Ë¤¢¤¿¤Ã¤Æ¤Ï¡¢¤¤¤¯¤Ä¤«¤Î¤³¤È¤ò¿´¤Ëα¤á¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
<H3>¥Ç¡¼¥â¥ó¤ò¸º¤é¤»</H3>
<P>¤³¤Î¥µ¡¼¥Ð¤Ï¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ÎËÃÖ¤«¤ì¡¢¥È¥é¥Õ¥£¥Ã¥¯¤ò
¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÃæ¤ØžÁ÷¤¹¤ë¤è¤¦¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢²Äǽ¤Ê¸Â¤ê
¤½¤ÎÈ¢¤ò°ÂÁ´¤Ë¤¹¤ë¤È¤¤¤¦¤Î¤ÏÎɤ¤¹Í¤¨¤Ç¤¹¡£Linux ¤Î¥»¥¥å¥ê¥Æ¥£¤Ë¤Ä¤¤¤Æ¤Ï
<A HREF="http://www.linuxdoc.org/HOWTO/Security-HOWTO.html">Linux Security HOWTO</A>
¤Ç¤µ¤é¤ËÄ´¤Ù¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ [ ÌõÃí¡§ÆüËܸìÌõ¤Ï
<A HREF="http://www.linux.or.jp/JF/JFdocs/Security-HOWTO.html">http://www.linux.or.jp/JF/JFdocs/Security-HOWTO.html</A> ¤Ë¤¢¤ê¤Þ¤¹¡£]
ÌÜŪ¤Î¤¿¤á¤Ë¡¢»ä¤Ï sshd ¤È Roxen Web server
°Ê³°¤ÎÁ´¤Æ¤ò kill ¤·¤Þ¤·¤¿¡£VPN ¤Ë¥¢¥¯¥»¥¹¤¹¤ë¿·¤·¤¤¥Þ¥·¥ó¤òÀßÄꤹ¤ë¤¿¤á¡¢
2¤Ä¤Î¥Õ¥¡¥¤¥ë¡Ê¥¹¥¯¥ê¥×¥È¡¢¤½¤Î¾¡Ë¤ò¥À¥¦¥ó¥í¡¼¥É¤¹¤ëÌÜŪ¤Ç¥¦¥§¥Ö¥µ¡¼¥Ð¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
FTP ¥µ¡¼¥Ð¤Ï»È¤¤¤Þ¤»¤ó¡£¤½¤ì¤Ï¡¢¥¦¥§¥Ö¥µ¡¼¥Ð·Ðͳ¤Ç¿¾¯¤Î¥Õ¥¡¥¤¥ë¤ò¸«¤¨¤ë
¤è¤¦¤Ë¤¹¤ë¤Î¤ËÈæ¤Ù¡¢FTP ¥µ¡¼¥Ð·Ðͳ¤ÇƱ¤¸¤³¤È¤ò°ÂÁ´¤Ë¤Ç¤¤ë¤è¤¦¤ËÀßÄꤹ¤ë¤Î¤Ï
Æñ¤·¤¤¤«¤é¤Ç¤¹¡£¤½¤ì¤Ë¡¢Ã±¤Ë¥Õ¥¡¥¤¥ë¤ò¥À¥¦¥ó¥í¡¼¥É
¤Ç¤¤ì¤Ð¤¤¤¤¤Î¤Ç¤¹¡£¤â¤·ËÜÅö¤Ë¥²¡¼¥È¥¦¥§¥¤¤ÇÊÌ¡¹¤Î¥µ¡¼¥Ð¤ò
Áö¤é¤»¤¿¤¤¤È»×¤Ã¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¥×¥é¥¤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤¢¤ë¥Þ¥·¥ó°Ê³°¡¢
¤½¤ì¤é¤Î¥µ¡¼¥Ð¤Ë¥¢¥¯¥»¥¹¤Ç¤¤Ê¤¤¤è¤¦À©¸Â¤¹¤Ù¤¤«¤âÃΤì¤Þ¤»¤ó¡£
<H3>¥Ñ¥¹¥ï¡¼¥É¤òµö¤¹¤Ê</H3>
<P>¤½¤¦¡¢¤½¤ì¤ÏÇϼ¯¤²¤¿¤³¤È¤Ëʹ¤³¤¨¤Þ¤¹¡£¤±¤ì¤É¤âµ¤¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡©
¥Ñ¥¹¥ï¡¼¥É¤Ï»È¤ï¤º¡¢¤½¤ì¤ò´°Á´¤Ë̵¸ú¤Ë¤·¤Æ¤·¤Þ¤¦¤Î¤Ç¤¹¡£
¤³¤Î¥Þ¥·¥ó¤ÎÁ´¤Æ¤Îǧ¾Ú¤Ï ssh ¤Î¸ø³«¸°Ç§¾Ú¥·¥¹¥Æ¥à¤òÄ̤·¤Æ¹Ô¤ï¤ì¤ë¤Ù¤¤Ç¤¹¡£
¤³¤ÎÊýË¡¤Ç¤Ï¥¡¼¤ò»ý¤Ã¤¿¼Ô¤À¤±¤¬Æþ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¤¬¡¢530 ʸ»ú¤â¤ÎŤµ¤Î¥Ð¥¤¥Ê¥ê
¤Î¥¡¼¤ò³Ð¤¨¤ë¤³¤È¤Ï¡¢ËؤÉÉÔ²Äǽ¤Ç¤¹¡£
<P>¤Ç¤Ï¡¢¤½¤Î¤¿¤á¤Ë¤Ï¤É¤¦¤¹¤ì¤ÐÎɤ¤¤Î¤Ç¤·¤ç¤¦¡©/etc/passwd ¥Õ¥¡¥¤¥ë¤òÊÔ½¸
¤¹¤ë¤³¤È¤¬É¬ÍפǤ¹¡£2 ÈÖÌܤΥե£¡¼¥ë¥É¤Ï¥Ñ¥¹¥ï¡¼¥É¥Ï¥Ã¥·¥å¡¢¤¢¤ë¤¤¤Ï
ǧ¾Ú¥·¥¹¥Æ¥à¤Ë /etc/shadow ¥Õ¥¡¥¤¥ë¤ò¸«¤ë¤è¤¦»Ø¼¨¤¹¤ë 'x' ¤Î¤¤¤º¤ì¤«¤¬
´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤³¤È¤Ï¡¢¤½¤Î¥Õ¥£¡¼¥ë¥É¤ò
'*'¤Ë½ñ¤¤«¤¨¤ë¤³¤È¤Ç¤¹¡£¤³¤ì¤Ïǧ¾Ú¥·¥¹¥Æ¥à¤ËÂФ·¤Æ¡¢¥Ñ¥¹¥ï¡¼¥É¤Ï̵¤·¤Ç¡¢
²¿¤âµö¤µ¤ì¤ë¤Ù¤¤Ç¤Ê¤¤¤È¤¤¤¦¤³¤È¤ò¼¨¤·¤Þ¤¹¡£
<P>
<A NAME="passwd"></A>
ŵ·¿Åª¤Ê /etc/passwd ¥Õ¥¡¥¤¥ë¤Î·Á¼°¤ò¼¡¤Ë¼¨¤·¤Þ¤¹¡£
<PRE>
....
nobody:x:65534:100:nobody:/dev/null:
mwilson:x:1000:100:Matthew Wilson,,,:/home/mwilson:/bin/bash
joe:*:504:101:Joe Mode (home),,,:/home/vpn-users:/usr/sbin/pppd
bill:*:504:101:Bill Smith (home),,,:/home/vpn-users:/usr/sbin/pppd
frank:*:504:101:Frank Jones (home),,,:/home/vpn-users:/usr/sbin/pppd
....
</PRE>
»ä¤¬ 2ÈÖÌܤΥե£¡¼¥ë¥É¤òÊÔ½¸¤¹¤ë¤À¤±¤Ç¤Ê¤¯¡¢¤â¤Ã¤È¼ê¤ò²Ã¤¨¤¿¤È¤¤¤¦¤³¤È¤ò
³Ð¤¨¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£Â¾¤Î¥Õ¥£¡¼¥ë¥É¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤·¤Þ¤¹¡£
<H2><A NAME="ss3.2">3.2 ¥æ¡¼¥¶¥¢¥¯¥»¥¹ - ¤ß¤ó¤Ê¤òÃæ¤Ø</A>
</H2>
<P>¥æ¡¼¥¶¥¢¥¯¥»¥¹¤Ï ssh ¤Îǧ¾Ú¥¹¥¡¼¥à¤òÄ̤·¤Æ°Ù¤µ¤ì¤Þ¤¹¡£¾å¤Ç½Ò¤Ù¤¿¤è¤¦¤Ë¡¢
¤³¤ì¤¬¹â¥ì¥Ù¥ë¤Î¥»¥¥å¥ê¥Æ¥£¤ò°Ý»ý¤·¤Ä¤Ä¡¢¥æ¡¼¥¶¤¬¥·¥¹¥Æ¥à¤Ë¥¢¥¯¥»¥¹¤¹¤ë
ÊýË¡¤Ç¤¹¡£¤â¤· ssh ¤ËÆëÀ÷¤ß¤¬¤Ê¤±¤ì¤Ð¡¢
<A HREF="http://www.ssh.org/">http://www.ssh.org/</A>¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
»ä¤¬ ssh ¤Î¥Ð¡¼¥¸¥ç¥ó 2 ¤Ç¤Ê¤¯¥Ð¡¼¥¸¥ç¥ó 1 ¤ò»È¤Ã¤Æ¤¤¤ë¤È¤¤¤¦¤³¤È¤ËÃí°Õ¤·¤Æ
¤¯¤À¤µ¤¤¡£Æäˡ¢¥Ð¡¼¥¸¥ç¥ó 1 ¤Ï¥Õ¥ê¡¼¤Ç¡¢2 ¤Ï¤½¤¦¤Ç¤Ê¤¤¤È¤¤¤¦Â礤ʰ㤤¤¬
¤¢¤ê¤Þ¤¹¡£
<H3><CODE>sshd</CODE> ¤òÀßÄꤹ¤ë</H3>
<P>¤¢¤Ê¤¿¤Ï sshd ¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡£¥ª¥×¥·¥ç¥ó¤Ë¤Ï¼¡¤Î¤è¤¦¤Ê
¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£°Õ¿Þ¤·¤Æ¤¤¤ë¤Î¤Ï¥Ñ¥¹¥ï¡¼¥Éǧ¾Ú¤ª¤è¤Ó rhosts ǧ¾Ú¤òÉԲĤË
¤¹¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£/etc/sshd_config ¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¼¡¤Ëµó¤²¤ë¤è¤¦¤Ê
¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£
<P>
<PRE>
PermitRootLogin yes
IgnoreRhosts yes
StrictModes yes
QuietMode no
CheckMail no
IdleTimeout 3d
X11Forwarding no
PrintMotd no
KeepAlive yes
RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
UseLogin no
</PRE>
<H2><A NAME="ss3.3">3.3 ¥æ¡¼¥¶¤òÀ©¸Â¤¹¤ë</A>
</H2>
<P>¤³¤ì¤Ç°¤¤¿Í¤¿¤Á¤ÏÄù¤á½Ð¤µ¤ì¡¢Îɤ¤¿Í¤À¤±¤¬¥¢¥¯¥»¥¹¤òµö¤µ¤ì¤ë
¤è¤¦¤Ë¤Ê¤Ã¤¿¤Î¤Ç¡¢º£ÅÙ¤ÏÎɤ¤¿Í¤¿¤Á¤¬°¤µ¤ò¤·¤Ê¤¤¤è¤¦¤Ë
¼ê¤òÂǤäƤª¤¯¤Ù¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
¤³¤ì¤ÏÈà¤é¤Ë pppd °Ê³°¤Î¤â¤Î¤òµ¯Æ°¤µ¤»¤Ê¤¤¤È¤¤¤¦¤³¤È¤Ç¡¢¶Ë¤á¤Æ´Êñ¤Ë¼Â¹Ô¤Ç¤¤Þ¤¹¡£
¤³¤ì¤ÏɬÍפ«¤â¤·¤ì¤Þ¤»¤ó¤·¡¢É¬ÍפǤʤ¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£»ä¤Ï¥æ¡¼¥¶¤òÀ©¸Â
¤·¤Æ¤¤¤Þ¤¹¡£¤½¤ì¤Ï¡¢Êݼ餷¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤¬ VPN ÀìÍѤǤ¢¤ê¡¢¥æ¡¼¥¶¤Ï
¤½¤Î¾å¤Ç¤½¤Î¾¤Î¤³¤È¤ò¤¹¤ëɬÍפ¬¤Ê¤¤¤¿¤á¤Ç¤¹¡£
<H3>sudo ¤«Èݤ«</H3>
<P>Unix ¥·¥¹¥Æ¥à¤Î´ÉÍý¼Ô¤¬¡¢¤¢¤ë¥æ¡¼¥¶¤¬ÆÃÄê¤Î¥×¥í¥°¥é¥à¤ò root ¸¢¸Â¤Ç
¼Â¹Ô¤Ç¤¤ë¤è¤¦µö²Ä¤òÍ¿¤¨¤ë¡¢ sudo ¤È¸Æ¤Ð¤ì¤ë¾®¤µ¤¯¤ÆÁÇŨ¤Ê¥×¥í¥°¥é¥à
¤¬¤¢¤ê¤Þ¤¹¡£pppd ¤Ï root ¤È¤·¤Æ¼Â¹Ô¤¹¤ëɬÍפ¬¤¢¤ë¤Î¤Ç¡¢¤³¤Î¾ì¹ç¤Ë¤ÏɬÍפǤ¹¡£
¥æ¡¼¥¶¤Ë¥·¥§¥ë¥¢¥¯¥»¥¹¤ò
µö²Ä¤·¤è¤¦¤È¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢¤³¤ÎÊýË¡¤ò»È¤¦É¬Íפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡£sudo ¤ò
¤É¤Î¤è¤¦¤ËÀßÄꤷ¡¢sudo ¤ò¤É¤Î¤è¤¦¤Ë»È¤¦¤«¤Ï sudo ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ç
Ä´¤Ù¤Æ¤¯¤À¤µ¤¤¡£³µ¤·¤Æ¡¢¾¯¿ô¤Î¿®Íê¤Ç¤¤ë¥æ¡¼¥¶¤Ë»È¤ï¤ì¤ë¤è¤¦¤Ê
Ê£¿ôÍøÍÑ¥·¥¹¥Æ¥à¤Ë¤ª¤¤¤Æ¡¢sudo ¤ò»È¤¦¤³¤È¤ÏºÇÁ±¤ÎÊýË¡¤Ç¤¹¡£
<P>
<P>¥æ¡¼¥¶¤Ë¥·¥§¥ë¥¢¥¯¥»¥¹¤òµö²Ä¤·¤Ê¤¤¤³¤È¤ò·è¤á¤¿¤Ê¤é¤Ð¡¢¤½¤³¤Ë¿¯Æþ¤µ¤»¤º¤Ë¤ª¤¯
¤â¤Ã¤È¤âÎɤ¤ÊýË¡¤Ï¡¢Èà¤é¤Î¥·¥§¥ë¤ò pppd ¤Ë¤¹¤ë¤³¤È¤Ç¤¹¡£¤³¤ì¤Ï /etc/passwd
¥Õ¥¡¥¤¥ë¤Ë¤è¤Ã¤Æ¼Â¸½¤Ç¤¤Þ¤¹¡£»ä¤¬ºÇ¸å¤Î 3 ¿Í¤Î¥æ¡¼¥¶¤Ë¤·¤¿¤³¤È¤Ï
<A HREF="#passwd">¾å¤Ë¤¢¤ëµ½Ò</A> ¤Ç¸«¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£/etc/passwd ¤Î
ºÇ¸å¤Î¥Õ¥£¡¼¥ë¥É¤Ï¥æ¡¼¥¶¤Î¥·¥§¥ë¤Ç¤¹¡£pppd ¤òÆ°¤«¤¹¤¿¤á¤Ë
ÆÃÊ̤ʤ³¤È¤ò¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£¤½¤ì¤Ï¥æ¡¼¥¶¤¬Àܳ¤¹¤ë¤È root ¤È¤·¤Æ
¼Â¹Ô¤µ¤ì¤Þ¤¹¡£¤³¤ì¤ÏºÇ¤â°ÂÁ´¤Ç¤¢¤ë¤ÈƱ»þ¤Ë¡¢°Ù¤·ÆÀ¤ë¤¦¤Á¤Î´Ö°ã¤¤¤Ê¤¯
ºÇ¤âñ½ã¤ÊÀßÄêÊýË¡¤Ç¤¹¡£¤½¤ì¤ÏÂ絬ÌϤǤޤȤޤä¿¥·¥¹¥Æ¥à¤ËÂФ·¤Æ¤Ï
ÍýÁÛŪ¤Ç¤¹¡£¤ä¤ë¤Ù¤¤³¤È¤Ï¤³¤Î¥É¥¥å¥á¥ó¥È¤Î¸å¤ÎÊý¤Ç¤¤Á¤ó¤ÈÀâÌÀ¤·¤Þ¤¹¡£
¤ªË¾¤ß¤Ç¤¢¤ì¤Ð
<A HREF="VPN-HOWTO-5.html#user-accounts">¤½¤Á¤é¤òÀè¤ËÆɤà</A> ¤³¤È¤â¤Ç¤¤Þ¤¹¡£
<H2><A NAME="ss3.4">3.4 ¥Í¥Ã¥È¥ï¡¼¥¥ó¥°</A>
</H2>
<P>¤³¤ì¤Ç¥æ¡¼¥¶¤Ï¥·¥¹¥Æ¥à¤Ë¥¢¥¯¥»¥¹½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤ï¤±¤Ç¤¹¤¬¡¢
Èà¤é¤¬¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¥¢¥¯¥»¥¹¤Ç¤¤ë¤³¤È¤Ï³Îǧ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
»ä¤¿¤Á¤Ï Linux ¥«¡¼¥Í¥ë¤Î¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤Î¥ë¡¼¥ë¤È¥ë¡¼¥Æ¥£¥ó¥°¥Æ¡¼¥Ö¥ë
¤Ë¤è¤Ã¤Æ¤½¤ì¤ò¹Ô¤¤¤Þ¤¹¡£<CODE>route</CODE> ¤ª¤è¤Ó <CODE>ipfwadm</CODE> ¥³¥Þ¥ó¥É¤ò
»È¤¦¤È¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥È¥é¥Õ¥£¥Ã¥¯¤òŬÀÚ¤ÊÊýË¡¤Ç°·¤¦¤è¤¦¥«¡¼¥Í¥ë¤òÀßÄê
¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£¤³¤ì°Ê¾å¤Î <CODE>ipfwadm</CODE>, <CODE>ipchains</CODE>
¤½¤ì¤«¤é <CODE>route</CODE> ¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Î¤¿¤á¤Ë¤Ï
<A HREF="http://www.linuxdoc.org/HOWTO/Linux-Networking-HOWTO.html">Linux Networking HOWTO</A> ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
<H3>¥«¡¼¥Í¥ë</H3>
<P>¤³¤Î¤¤¤¯¤Ä¤«¤òÆ°ºî¤µ¤»¤ë¤¿¤á¤Ë¤Ï¡¢¥«¡¼¥Í¥ë¤òÀµ¤·¤¯ÀßÄꤷ¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
¤â¤·¼«Ê¬¤Î¥«¡¼¥Í¥ë¤ò¤É¤Î¤è¤¦¤Ë¹½ÃÛ¤¹¤ì¤Ð¤è¤¤¤«Ê¬¤«¤é¤Ê¤¤¤Ê¤é¡¢
<A HREF="http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</A>¤òÆɤà¤Ù¤¤Ç¤¹¡£´ðËܥͥåȥ¥¯¤Ë²Ã¤¨¤Æ¡¢¼¡¤Ë¼¨¤¹
¥«¡¼¥Í¥ë¥ª¥×¥·¥ç¥ó¤¬¥ª¥ó¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤¹¤ëɬÍפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡£
»ä¤Ï¼«Ê¬¤Î¥·¥¹¥Æ¥à¤Ç 2.0.38 ¥«¡¼¥Í¥ë¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£
<P>2.0 ¥«¡¼¥Í¥ë¤Ë¤ª¤¤¤Æ -
<UL>
<LI>CONFIG_FIREWALL</LI>
<LI>CONFIG_IP_FORWARD</LI>
<LI>CONFIG_IP_FIREWALL</LI>
<LI>CONFIG_IP_ROUTER</LI>
<LI>CONFIG_IP_MASQUERADE (optional)</LI>
<LI>CONFIG_IP_MASQUERADE_ICMP (optional)</LI>
<LI>CONFIG_PPP</LI>
</UL>
<P>2.2 ¥«¡¼¥Í¥ë¤Ë¤ª¤¤¤Æ -
<UL>
<LI>CONFIG_FIREWALL</LI>
<LI>CONFIG_IP_ADVANCED_ROUTER</LI>
<LI>CONFIG_IP_FIREWALL</LI>
<LI>CONFIG_IP_ROUTER</LI>
<LI>CONFIG_IP_MASQUERADE (optional)</LI>
<LI>CONFIG_IP_MASQUERADE_ICMP (optional)</LI>
<LI>CONFIG_PPP</LI>
</UL>
<H3>¥Õ¥£¥ë¥¿µ¬Â§</H3>
<P>¤Þ¤º¡¢³°Â¦¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ø¤Î¥¢¥¯¥»¥¹¤òÀ©¸Â¤·¤Ä¤Ä¡¢¥æ¡¼¥¶¤¬ÆâÉô¥Í¥Ã¥È¥ï¡¼¥¯¤Ø
¥¢¥¯¥»¥¹½ÐÍè¤ë¤è¤¦¡¢¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤Î¥Õ¥£¥ë¥¿µ¬Â§¤òµ½Ò¤·¤Þ¤·¤ç¤¦¡£
¤â¤·¤³¤ì¤¬´ñ̯¤Ëʹ¤³¤¨¤ë¤Ê¤é¡¢
¤½¤ì¤Ë¤Ä¤¤¤Æ¤Ï¤³¤¦¹Í¤¨¤Æ¤ß¤Æ¤¯¤À¤µ¤¤ - Èà¤é¤Ï´û¤Ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ë
¥¢¥¯¥»¥¹¤Ç¤¤ë¾õÂ֤ˤ¢¤ê¡¢¤½¤ì¤Ç¤Ê¤¼Èà¤é¤¬¥Í¥Ã¥È¤Ë¥¢¥¯¥»¥¹¤¹¤ëºÝ¤Ë¥È¥ó¥Í¥ë¤ò
»È¤ï¤»¤ë¤Î¤«¡£¤½¤ì¤ÏÂÓ°èÉý¤È¥×¥í¥»¥Ã¥µ¤Î̵Â̸¯¤¤¤Ç¤¹¡£
<P>ŬÍѤµ¤ì¤ë¥Õ¥£¥ë¥¿µ¬Â§¤ÏÍøÍѤ¹¤ëÆâÉô¥Í¥Ã¥È¥ï¡¼¥¯¤Ë°Í¸¤·¤Æ¤¤¤Þ¤¹¡£
¤·¤«¤·¼ÂºÝ¡¢¥æ¡¼¥¶¤Ï¸À¤¤¤Þ¤¹ - "VPN ¤Î³°Â¦¤«¤é¡¢ÆâÉô¥Í¥Ã¥È¤Ë
¸þ¤«¤Ã¤ÆÍè¤Æ¤¤¤ë¥È¥é¥Õ¥£¥Ã¥¯¤òµö²Ä¤·¤Ê¤µ¤¤"¡£¤Ç¤Ï¤É¤¦¤·¤¿¤éÎɤ¤¤Î¤Ç¤·¤ç¤¦¤«¡©
¤¤¤Ä¤â¤Î¤è¤¦¤Ë¡¢¤½¤ì¤Ï¾ì¹ç¤Ë¤è¤ë¤Î¤Ç¤¹¡£¤â¤· 2.0 ¥«¡¼¥Í¥ë¤ò
Æ°¤«¤·¤Æ¤¤¤ë¤Ê¤é¤Ð¡¢<CODE>ipfwadm</CODE> ¤È¸Æ¤Ð¤ì¤ë¥Ä¡¼¥ë¤ò»È¤¤¤Þ¤¹¡£
°ìÊý¡¢¤â¤· 2.2 ¥«¡¼¥Í¥ë¤òÆ°¤«¤·¤Æ¤¤¤ë¤Î¤Ê¤é¡¢<CODE>ipchains</CODE> ¤È
¸Æ¤Ð¤ì¤ë¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»È¤¤¤Þ¤¹¡£
<P><CODE>ipfwadm</CODE> ¤Çµ¬Â§¤òÀßÄꤹ¤ë¤¿¤á¤Ë¤Ï¡¢¼¡¤Ë¼¨¤¹¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤Ç
¤½¤ì¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<PRE>
# /sbin/ipfwadm -F -f
# /sbin/ipfwadm -F -p deny
# /sbin/ipfwadm -F -a accept -S 192.168.13.0/24 -D 172.16.0.0/12
</PRE>
<P><CODE>ipchains</CODE> ¤Çµ¬Â§¤òÀßÄꤹ¤ë¤¿¤á¤Ë¤Ï¡¢¼¡¤Ë¼¨¤¹¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤Ç
¤½¤ì¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<PRE>
# /sbin/ipchains -F forward
# /sbin/ipchains -P forward DENY
# /sbin/ipchains -A forward -j ACCEPT -s 192.168.13.0/24 -d 172.16.0.0/12
</PRE>
<P>2.2 ¥«¡¼¥Í¥ë¤ò»È¤Ã¤Æ¤¤¤ë¿Í¤Ï
<A HREF="VPN-HOWTO-6.html#ipv4forwarding">¤³¤³</A>¤ò
Æɤó¤Ç¤¯¤À¤µ¤¤¡£
<H3>¥ë¡¼¥Æ¥£¥ó¥°</H3>
<P>¥æ¡¼¥¶¤Ï¥Í¥Ã¥È¤Ø¤Î¥¢¥¯¥»¥¹¤òµö¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢º£ÅÙ¤Ï
¥«¡¼¥Í¥ë¤Ë¡¢¥Ñ¥±¥Ã¥È¤òÁ÷¤ë¾ì½ê¤ò»Ø¼¨¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
¥·¥¹¥Æ¥à¤Ë¤ª¤¤¤Æ¡¢»ä¤Ï 2 ¤Ä¤Î¥¤¡¼¥µ¥Í¥Ã¥È¥«¡¼¥É¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£
°ìÊý¤Ï³°Éô¥Í¥Ã¥È¥ï¡¼¥¯¤ËÂФ¹¤ë¤â¤Î¡¢¤â¤¦°ìÊý¤ÏÆâÉô¥Í¥Ã¥È¥ï¡¼¥¯¤Ë
ÂФ¹¤ë¤â¤Î¤Ç¤¹¡£¤³¤Î¤³¤È¤Ï¡¢³°¤Ë¸þ¤«¤¦¥È¥é¥Õ¥£¥Ã¥¯¤Ï¥²¡¼¥È¥¦¥§¥¤¤Ç
¥Þ¥¹¥«¥ì¡¼¥É¤µ¤ì¡¢Ãæ¤ËÆþ¤Ã¤Æ¤¯¤ëÁ´¤Æ¤Î¥È¥é¥Õ¥£¥Ã¥¯¤Ï Cisco ¤Ç
¼è¤ê½ü¤«¤ì ·ÐÏ©¤òÄê¤á¤é¤ì¤ë¤Î¤Ç¡¢°ÂÁ´À¤òÊݤĤΤËÌòΩ¤Á¤Þ¤¹¡£
ÂçÉôʬ¤ÎÀßÄê¤Ë¤ª¤¤¤Æ¡¢·ÐÏ©ÀßÄê¤Ï¥·¥ó¥×¥ë¤Ç¤¢¤ë¤Ù¤¤Ç¤¹¡£
<P>¤³¤ì¤«¤é¤ä¤ë¤Î¤Ï¡¢ÆâÉô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤«¤é½Ð¤Æ¥×¥é¥¤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯¤Ë
¸þ¤«¤Ã¤ÆÍè¤ëÁ´¤Æ¤Î¥È¥é¥Õ¥£¥Ã¥¯¡¢¤½¤ì¤«¤é³°Éô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤«¤é½Ð¤ë
¤½¤Î¾ Á´¤Æ¤Î¥È¥é¥Õ¥£¥Ã¥¯¤Î·ÐÏ©¤òÀßÄꤹ¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
ÆÃÄê¤Î·ÐÏ©ÀßÄꥳ¥Þ¥ó¥É¤ÏÍøÍѤ·¤Æ¤¤¤ëÆâÉô¥Í¥Ã¥È¤Ë°Í¸¤·¤Æ¤¤¤Þ¤¹¡£
°Ê²¼¤Ï¤½¤ì¤¬¤É¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤¢¤ë¤«¤Î°ì¤Ä¤ÎÎã¤Ç¤¹¡£¤³¤ì¤é¤Î¹Ô¤Ï
¤â¤Á¤í¤ó¡¢¥í¡¼¥«¥ë¥Í¥Ã¥È¤Î´ðËÜ·ÐÏ©¤ËÉÕ¤±²Ã¤¨¤é¤ì¤Þ¤¹¡£
¤½¤ì¤Ë¡¢¤¢¤Ê¤¿¤Ï ÆâÉôÈÖ¹æ¤Î 3 ¥°¥ë¡¼¥×Á´¤Æ¤ò»È¤Ã¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤Ç¤·¤ç¤¦¡£
<P>
<PRE>
172.16.254.254 ¤¬ÆâÉô¥²¡¼¥È¥¦¥§¥¤¤Ç¤¢¤ë¤È¤¹¤ë¤È -
# /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 172.16.254.254 dev eth1
# /sbin/route add -net 172.16.0.0 netmask 255.240.0.0 gw 172.16.254.254 dev eth1
# /sbin/route add -net 192.168.0.0 netmask 255.255.0.0 gw 172.16.254.254 dev eth1
</PRE>
<P>·ÐÏ©¤ÎÀßÄê¤Ë¤ª¤±¤ëÉÕ²ÃŪ¤ÊÃí°Õ¤Ç¤¹¡£
¤â¤·¡¢Î㤨¤ÐÎ¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤Ê¤ÉÁÐÊý¸þ¤Î·ÐÏ©ÀßÄê¤ò»È¤Ã¤Æ¤¤¤ë
¤Î¤Ê¤é¡¢¤â¤¦°ì¤Ä¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
¥µ¡¼¥Ð¤Ë¤ª¤¤¤Æ¡¢¥¯¥é¥¤¥¢¥ó¥È¤ØÌá¤ë·ÐÏ©¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤³¤ì¤ò¤ä¤ê¿ë¤²¤ëºÇ¤â´Êñ¤ÊÊýË¡¤Ï¡¢ÀŤ«¤ËÌá¤ê¤Î·ÐÏ©¤òÀßÄꤹ¤ë¤è¤¦¤Ê
cron ¥¸¥ç¥Ö¤ò 1 ʬËè¤Ë¼Â¹Ô¤¹¤ë¤³¤È¤Ç¤¹¡£¥¯¥é¥¤¥¢¥ó¥È¤¬Àܳ¤·¤Æ¤¤¤Ê¤¯¤Æ¤â
¤¿¤¤¤·¤¿ÌäÂê¤Ç¤Ï¤Ê¤¯¡¢<CODE>route</CODE> ¤Ï¥¨¥é¡¼¡Ê¤¢¤Ê¤¿¤¬ÅÔ¹ç¤Î¤¤¤¤¤è¤¦¤Ë
<CODE>/dev/null</CODE> ¤ËÁ÷¤Ã¤¿¡Ë¤òÅǤ¯¤À¤±¤Ç¤¹¡£
<P>
<HR>
<A HREF="VPN-HOWTO-4.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO-2.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO.html#toc3">Ìܼ¡¤Ø</A>
</BODY>
</HTML>
|