結局カーネルをコンパイルしてNATDとIPFW2?を有効にして以下の図のような構成にしました。 (FreeBSD6.x以降はNATDを有効するのにカーネルの再コンパイルは必要なかったみたいなんですが・・・)
とりあえずこれでOKかな?という感じです。 いろいろありがとうございました。 カーネルのソースに追加したもの -------------------------------------- options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=100 options IPDIVERT -------------------------------------- ネットワーク図 | +------+-----+ |YahooBBモデム| NAT/DHCPの機能はオフ +------------+ | xxx.xxx.xxx.xxx | | | fxp0(xxx.xxx.xxx.xxx)グローバルアドレス +----+-----+ | FreeBSD | NAT変換 +----+-----+ | ed0(192.168.1.10) | +-------+-----------+ HUB(192.168.1.0/24) | | (192.168.1.15) | | (192.168.1.xx/24) +-----------+ +----------+ |windows | |クライアント| +-----------+ +----------+ rc.conf --------------------------------------- gateway_enable="YES" hostname="xxx.xxx.jp" network_interfaces="YES" ifconfig_fxp0="DHCP" ifconfig_ed0="192.168.1.10 netmask 255.255.255.0" inetd_enable="YES" keymap="jp.106" nfs_client_enable="YES" sshd_enable="YES" usbd_enable="YES" sendmail_enable="NONE" #router_enable="YES" firewall_enable="YES" firewall_type="open" natd_enable="YES" natd_interface="fxp0" natd_flags="-dynamic yes" ------------------------------------------------- xxx# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default xxx.xx.xx.xxx UGS 0 1004 fxp0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.1 link#2 UC 0 0 ed0 192.168.1.15 00:04:76:4d:a5:a8 UHLW 1 531 ed0 1191 xxx.xx.xx link#1 UC 0 0 fxp0 xxx.xx.xx.xxx 00:0f:23:8a:06:00 UHLW 2 0 fxp0 1191 --------------------------------------------------------------------------------- ※課題 ・パケットフィルタリングのルールを書いて有効にすること。 ・DHCPを立てたほうが楽かな・・・。 -- posture@ mailto:[EMAIL PROTECTED] -------------------------------------- Yahoo! JAPAN Search Word Ranking 2006 http://pr.mail.yahoo.co.jp/search/