LAN做测试FB,rc&ipnat问题。已解决。

2009-05-13 02:22:25来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


freebsd,配置IPF后,一个小小疑问?
网络结构:
Internet---Modem-----switch----pc1 [192.168.1.22/24]         192.168.1.1       ---- .. [192.168.1.x/24]                                ____                           ---|fxp0| 192.168.1.2                               -| rl0-| [10.0.0.1]-----PCA  [10.0.0.2]                              |(FB) |                               ------                              
                              
                             
mini,在kernel里加了:
options         IPFILTER
options         IPFILTER_LOG
options         IPFILTER_DEFAULT_BLOCK   # block all packets by default etc/rc.conf里加了:
sshd_enable="YES"
gateway_enable="YES"
ifconfig_fxp0="192.168.1.2 netmask 255.255.255.252"
ifconfig_rl0="10.0.0.1 netmask 255.255.255.0"
defaultrouter="192.168.1.1"ipfilter_enable="YES"
ipfilter_program="/sbin/ipf -E"
ipfilter_rules="/etc/ipf.conf"ipnat_enable="YES"
ipnat_interface="fxp0"
ipnat_program="/sbin/ipnat -CF -f"
ipnat_rules="/etc/ipnat.conf"sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmial_msp_quee_enable="NO" etc/ipnat.conf里加了:
map fxp0 10.0.0.0/24 -> 192.168.1.2/32 portmap tcp/udp 10000:50000
map fxp0 10.0.0.0/24 -> 192.168.1.2/32
map fxp0 10.0.0.0/24 -> 192.168.1.2/32 proxy port ftp ftp/tcp etc/ipf.conf里加了:〔测试用〕
pass out quick on lo0 all
pass in quick on lo0 all
pass out quick on rl0 all
pass in quick on rl0 all
pass out quick on fxp0 all
pass in quick on fxp0 all
----------------------------------------------
可以上网。
-----------------------
这个环境是想模拟互联网环境。
所以路由都从192.168.1.1走。我从我内网10.0.0.0/24 ping 外网OK,能上网OK;但是想ping 192.168.1.x/24
却ping不通,这个应该是:要到192.168.1.22的路由都要先到191.168.1.1,在192.168.1.1选择路由时,MODEM

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:configuring syscons的问题所在

下一篇:FreeBSD分区知识学习及实验备忘录