QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 744|回复: 0

求助网关设置,急~!

[复制链接]
发表于 2004-12-28 22:25:29 | 显示全部楼层 |阅读模式
系统:freebsd5.3
双网卡:8139
rc.conf如下设置:
[code:1]gateway_enable="YES"
defaultrouter="61.144.xx.1" # 网关
ifconfig_rl0="inet 61.144.xx.xx  netmask 255.255.255.0" # 外网IP
ifconfig_rl1="inet 192.168.0.81  netmask 255.255.255.0"
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
firewall_type="/etc/ipfw.rules"
firewall_quiet="NO"
firewall_logging_enable="YES"
natd_interface="rl0"
natd_enable="YES"
natd_flags="-config /etc/natd.conf"[/code:1]

ipfw自定义ipfw.rules的内容如下:
[code:1]add 00400 divert natd ip from any to any via rl0
add 00001 deny log ip from any to any ipoptions rr
add 00002 deny log ip from any to any ipoptions ts
add 00003 deny log ip from any to any ipoptions ssrr
add 00004 deny log ip from any to any ipoptions lsrr
add 00005 deny tcp from any to any in tcpflags syn,fin
add 10000 allow tcp from any to 192.168.0.100 22 in
add 10001 allow tcp from any to 192.168.0.100 80 in
add 10002 allow tcp from any to 192.168.0.100 21 in
add 19997 check-state
add 19998 allow tcp from any to any out keep-state setup
add 19999 allow tcp from any to any out
add 20001 allow udp from any 53 to me in recv rl0
add 20002 allow udp from any to 192.168.0.100 53 in recv rl0
add 29999 allow udp from any to any out
add 30000 allow icmp from any to any icmptypes 3
add 30001 allow icmp from any to any icmptypes 4
add 30002 allow icmp from any to any icmptypes 8 out
add 30003 allow icmp from any to any icmptypes 0 in
add 30004 allow icmp from any to any icmptypes 11 in
add 40000 allow all from 192.168.0.0/16 to any
add 40001 allow all from any to 192.168.0.0/16[/code:1]
我想每台客户机82台都通过192.168.0.81网关上网。
帮我看看这样设置有什么不妥的地方?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-6 19:18 , Processed in 0.059306 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表