From owner-FreeBSD-users-jp@jp.freebsd.org  Wed Dec 24 16:49:09 1997
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta7/8.7.3) id QAA15258
	Wed, 24 Dec 1997 16:49:09 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta7/8.7.3) with SMTP id QAA15252
	for <FreeBSD-users-jp@jp.freebsd.org>; Wed, 24 Dec 1997 16:49:08 +0900 (JST)
Received: from server (unverified [192.168.1.200]) by server.mtk.co.jp
 (EMWAC SMTPRS 0.83) with SMTP id <B0000009822@server.mtk.co.jp>;
 Wed, 24 Dec 1997 16:49:07 +0900
Date: Wed, 24 Dec 1997 16:49:07 +0900
Message-ID: <B0000009822@server.mtk.co.jp>
From: =?ISO-2022-JP?B?GyRCPj4yPDwjRkQbKEI=?= <hal@mtk.co.jp>
To: FreeBSD-users-jp@jp.freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-Mailer: Becky! ver 1.23
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24]
X-Sequence: FreeBSD-users-jp 22762
Subject: [FreeBSD-users-jp 22762] natd configuration
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

$B$3$s$K$A$O!#>>2<!wEl5~%9%l!<%H$G$9!#(B

natd$B$N@_Dj$K$D$$$F$o$+$i$J$$$3$H$,$"$k$N$G!"<ALd$5$;$F(B
$BD:$-$^$9!#(B

natd_1.11$B$r%$%s%9%H!<%k$7!"3F<o@_Dj$r9T$C$?$N$G$9$,!"(B
static NAT$B$,$&$^$/F0:n$7$^$;$s!#(B
OS$B$O(BFreeBSD(98)2.2.2-RELEASE$B$G(B
$BFbB&$N(BIP$B$O(B192.168.1.201(ed3) netmask255.255.255.0
$B30B&$N(BIP$B$O(Bx.x.x.2(ed4) netmask255.255.255.0
$B%k!<%?$N(BIP$B$O(Bx.x.x.1$B$G$9!#(B
$B$^$?FbIt$K$O(BIP$B$,(B192.168.1.200$B$N(BMail&DNS$B%5!<%P$,$"$j(B
DNS$B$K$O(Bx.x.x.3$B$G5-=R$7$F$$$^$9!#(B

$B$^$:8=>u$r<($7$^$9$H!"(B

-----------------------------------------------------------
1.$B!!(Bnatd_1.11$B$r(Bmake & make install

2.$B!!(Boptions IPFIREWALL / options IPDIVERT
$B!!!!$G(Bkernel$B$r(Brebuild

3.$B!!(B/etc/services $B$K0J2<$rDI2C(B
$B!!!!(Bnatd  6668/divert #Network Address Translation socket

4.$B!!(B/etc/rc.firewall$B$K0J2<$rDI2C!&JQ99(B
$B!!!!(Bfirewall=open
$B!!!!!J(Bopen$B%;%/%7%g%s$G!K(B
$B!!!!(B# /sbin/ipfw add 65000 pass all from any to any
$B!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J%3%a%s%H%"%&%H!K(B
$B!!!!(B/sbin/ipfw add divert 6668 all from any to any ed4
$B!!!!(B/sbin/ipfw add pass all from any to any
$B!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J<h$j$"$($:!K(B

5.$B!!(B/etc/rc.conf$B$r0J2<$N$h$&$KJQ99(B
$B!!!!(Bfirewall="YES"
$B!!!!(Bnetwork_interface="ed3 ed4 lo0"
$B!!!!(Bifconfig_ed3="inet 192.168.1.201 netmask 255.255.255.0"
$B!!!!(Bifconfig_ed4="inet x.x.x.2 netmask 255.255.255.0"
$B!!!!(Bifconfig_lo0="inet 127.0.0.1"
$B!!!!(B
$B!!!!(Bdefaultrouter="x.x.x.1"
$B!!!!(Bstatic_routes=""
$B!!!!(Bgateway_enable="YES"
$B!!!!(Brouter_enable="NO"
$B!!!!(Brouter="routed"
$B!!!!(Brouter_flags=""

6.$B!!(B/etc/rc$B$N(Bstarting standard deamons$B$N=j$K0J2<$rDI2C(B
$B!!!!(B/usr/local/sbin/natd -f /etc/natd.conf;

7.$B!!(B/etc/natd.conf$B$r:n@.!J0J2<FbMF!K(B
$B!!!!(Bport 6668
$B!!!!(Binterface ed4
$B!!!!(Bredirect_address 192.168.1.200 x.x.x.3
-----------------------------------------------------------

$B:F5/F08e!"(Bclient$B$+$i(Bgateway$B$r(B192.168.1.201$B$K$7$F!"30It$K(B
$B%"%/%;%9$G$-$^$7$?$,!"30It$+$i(Bx.x.x.3$B$KBP$7%"%/%;%9$,=PMh$^$;$s!#(B
$B6qBNE*$K$O30It$N%a!<%k%5!<%P$+$i(Bx.x.x.3$B$N%a!<%k%5!<%P$K(B
$B%a!<%k$rAw$C$F$_$^$7$?!#(B

$B$^$?!"FbIt$+$i(Bping x.x.x.3$B$G$bFO$-$^$;$s!#(B
$B!JEvA3$G$9$,(Bx.x.x.1/x.x.x.2$B$KBP$7$F$O(Bping$B$G5"$C$F$-$^$9!K(B

$B2a5n$N%m%0$r8+$F$_$?$i(Bnatd$B$N%^%K%e%"%k$N(Bed0$B$O30It$r(B
$BI=$7$F$$$k$H$N$3$H$G!"(B/etc/rc.firewall$B$H(B/etc/natd.conf$B$K$O(B
ed4$B$r5-=R$7$?$N$G$9$,!";n$7$K(Bed3$B$r5-=R$7$F$_$k$H(B
$B%k!<%?$N30$K$O=P$F$$$1$^$;$s$G$7$?$,!"FbB&$K$$$k(B
$B%a!<%k%5!<%P$KBP$7(Bping x.x.x.3$B$G5"$C$F$-$^$7$?!#(B

$B$=$3$G!"(B/etc/rc.firewall$B$r(B
$B!!!!(B/sbin/ipfw add divert 6668 all from any to any ed4
$B!!!!(B/sbin/ipfw add divert 6668 all from any to x.x.x.3 ed3
$B!!!!(B/sbin/ipfw add pass all from any to any
$B$KJQ99$7!"(B/etc/natd.conf$B$K(Bed3$B$H(Bed4$B$r#2$D5-=R$7$F$_$^$7$?$,(B
/usr/local/sbin/natd$B$,(Binterface$B%*%W%7%g%s$r#1$D$7$+(B
$B<h$l$J$/!"<:GT$7$^$7$?!#(B

$B$^$?!"(B/usr/local/sbin/natd$B$N<B9T0LCV$b(B/etc/rc.firewall$BFb$K(B
$BD>@\CV$$$?$j!"(B/etc/rc.local$B$KCV$$$?$j$7$^$7$?$,!"$d$O$j(B
$BBLL\$G$7$?!#(B

$B$A$g$C$HJ}:v$,L5$/$J$C$F$7$^$C$?$N$G!"<1<T$NJ}$NCf$K(B
redirect_address$B$N%*%W%7%g%s$r;HMQ$5$l$F$$$kJ}$,(B
$B$$$i$C$7$c$$$^$7$?$i!"%"%I%P%$%9$NJ}$r$*4j$$$$$?$7$^$9!#(B

////////////////////////////////////////////////////////
Haruyoshi Matsushita
Tokyo Slate Co.,LTD.   &   Matsushita Trading Co.,LTD.
E-Mail: hal@mtk.co.jp     haruyoshi@pis.bekkoame.or.jp
URL:  http://www.mtk.co.jp/
TEL: 81-3-3737-1441    FAX: 81-3-3731-1019
////////////////////////////////////////////////////////
