看板FreeBSD
标 题natd 下的 redirect_port 问题
发信站静宜计中BBS站 (Wed Dec 15 19:21:48 2004)
转信站ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!pubbs
我的bsd怎麽样都设不起来redirect_port的功能
有网友可以给点建议吗?
FreeBSD 4.9R vr1是对外网卡,从外面测试怎样都连不到内部的web server
以下是我的设定档。
rc.conf:
gateway_enable="YES"
firewall_enable="YES"
firewall_type="OPEN"
natd_enable="YES"
natd_interface="vr1"
natd_flags="-config /etc/natd.conf"
kernel:
options IPFIREWALL
options IPDIVERT
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPFIREWALL_VERBOSE
options IPFIREWALL_FORWARD
options DUMMYNET
natd.conf:
redirect_port tcp 192.168.1.246:80 80
rc.local:
/sbin/ipfw add 1100 allow tcp from any to 192.168.1.246 80
/sbin/ipfw add 1200 allow tcp from 192.168.1.246 to any
ipfw show的结果:
00050 2208 184686 divert 8668 ip from any to any via vr1
00100 0 0 allow ip from any to any via lo0
00200 0 0 deny ip from any to 127.0.0.0/8
00300 0 0 deny ip from 127.0.0.0/8 to any
01100 18 864 allow tcp from any to 192.168.1.246 80
01200 0 0 allow tcp from 192.168.1.246 to any
65000 4363 477916 allow ip from any to any
65535 0 0 allow ip from any to any
--
◣
◥ ‧◤ 啊~啊~啊
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ ◥ ◣
◤
※ 来源:‧静宜大学计算机中心bbs站 bbs.pu.edu.tw‧[FROM: www.karomax.com.tw]