BSD 5.4下ipfilter的问题
时间:2005-07-01
来源:互联网
我的网络环境是
以太网,ISP 绑定IP MAC
xl0 连接外网(MAC ISP以绑定) fxp0连接内网
主机
BSD 5.4 MINI 安装
内核加入
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
/etc/rc.conf
hostname="x286.org"
defaultrouter="172.31.112.1"
ifconfig_xl0="inet 172.31.112.90 netmask 255.255.0.0"
gateway_enable="YES"
ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.0.0"
ipfilter_enables=”YES”
ipf –C –f /etc/ipf.rules
ipfilter_flags=”-E”
ipnat_enable=”YES”
ipnat_program=”/sbin/ipnat –CF -f”
ipnat_rules=”/etc/ipnat.rules”
ipmon_enable=”YES”
ipmon_flags=”-D /var/log/ipfilter.log”
/etc/ipf.rulse
pass out on xl0 all
pass in on xlo all
pass out on fxp0 all
pass in on fxp0 all
/etc/ipnat.rulse
map rl1 192.168.0.0/24 -> 172.31.112.90/32 portmap tcp/udp 10000:39999
map rl1 192.168.0.0/24 -> 172.31.112.90/32
客户机
用的是网卡和 FXP0 直连
网络设置
IP 192.168.0.12
255.255.255.0
网关 192.168.0.1
DNS 202.96.64.68
无法正常上网
PING 192.168.0.1 可以 PING 通
请问各位
问题出在哪里~~~~~~~~~~~~~~~~~~~~谢谢
以太网,ISP 绑定IP MAC
xl0 连接外网(MAC ISP以绑定) fxp0连接内网
主机
BSD 5.4 MINI 安装
内核加入
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
/etc/rc.conf
hostname="x286.org"
defaultrouter="172.31.112.1"
ifconfig_xl0="inet 172.31.112.90 netmask 255.255.0.0"
gateway_enable="YES"
ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.0.0"
ipfilter_enables=”YES”
ipf –C –f /etc/ipf.rules
ipfilter_flags=”-E”
ipnat_enable=”YES”
ipnat_program=”/sbin/ipnat –CF -f”
ipnat_rules=”/etc/ipnat.rules”
ipmon_enable=”YES”
ipmon_flags=”-D /var/log/ipfilter.log”
/etc/ipf.rulse
pass out on xl0 all
pass in on xlo all
pass out on fxp0 all
pass in on fxp0 all
/etc/ipnat.rulse
map rl1 192.168.0.0/24 -> 172.31.112.90/32 portmap tcp/udp 10000:39999
map rl1 192.168.0.0/24 -> 172.31.112.90/32
客户机
用的是网卡和 FXP0 直连
网络设置
IP 192.168.0.12
255.255.255.0
网关 192.168.0.1
DNS 202.96.64.68
无法正常上网
PING 192.168.0.1 可以 PING 通
请问各位
问题出在哪里~~~~~~~~~~~~~~~~~~~~谢谢
作者: donkey286 发布时间: 2005-07-01
pass out on fxp1 all
pass in on fxp1 all
在etc/ipf.rules里加上这因为你内核中默认阻隔所有连接.
在etc/ipnat.rules里在加上
map xl0 192.168.0.0/24 -> 61.xxx.xxx.xxx/32 proxy port ftp ftp/tcp
map xl0 192.168.0.0/24 -> 61.xxx.xxx.xx/32 portmap tcp/udp 10000:65000
map xl0 192.168.0.0/24 -> 61.xxx.xx.xxx.xx32
pass in on fxp1 all
在etc/ipf.rules里加上这因为你内核中默认阻隔所有连接.
在etc/ipnat.rules里在加上
map xl0 192.168.0.0/24 -> 61.xxx.xxx.xxx/32 proxy port ftp ftp/tcp
map xl0 192.168.0.0/24 -> 61.xxx.xxx.xx/32 portmap tcp/udp 10000:65000
map xl0 192.168.0.0/24 -> 61.xxx.xx.xxx.xx32
作者: sxmm 发布时间: 2005-07-09
/etc/ipf.rulse rules????
pass out all
pass in all
/etc/ipnat.rulse rules???
map xl0 192.168.0.0/24 -> 172.31.112.90/32 proxy port ftp ftp/tcp
map rl1 192.168.0.0/24 -> 172.31.112.90/32 portmap tcp/udp 10000:39999
map rl1 192.168.0.0/24 -> 172.31.112.90/32
rc.conf的ipf改为
ipfilter_flags=””
ipfilter_rules="/etc/ipf.rules"
pass out all
pass in all
/etc/ipnat.rulse rules???
map xl0 192.168.0.0/24 -> 172.31.112.90/32 proxy port ftp ftp/tcp
map rl1 192.168.0.0/24 -> 172.31.112.90/32 portmap tcp/udp 10000:39999
map rl1 192.168.0.0/24 -> 172.31.112.90/32
rc.conf的ipf改为
ipfilter_flags=””
ipfilter_rules="/etc/ipf.rules"
作者: netswords 发布时间: 2005-07-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28