免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4521 | 回复: 13
打印 上一主题 下一主题

Solaris10中系统自带ipfilter如何启动? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-20 09:20 |只看该作者 |倒序浏览
bash-3.00# svcs /network/pfil          (查看ipfilter另外一个内核模块)\r\nSTATE          STIME    FMRI\r\nonline          8:26:18 svc:/network/pfil:default\r\n\r\nbash-3.00# svcs /network/ipfilter      (初始ipfilter为disable)\r\nSTATE          STIME    FMRI\r\ndisabled        8:54:30 svc:/network/ipfilter:default\r\n\r\nbash-3.00# svcadm enable /network/ipfilter    (开启服务)\r\n\r\nbash-3.00# svcs /network/ipfilter     (查询是否开启,结果提示该服务在维护! 怎么解决?)\r\nSTATE          STIME    FMRI\r\nmaintenance     8:55:11 svc:/network/ipfilter:default\r\n\r\nbash-3.00# svcs -d /network/ipfilter    (谁依赖ipfilter的服务都是开启)\r\nSTATE          STIME    FMRI\r\nonline          8:26:18 svc:/network/pfil:default\r\nonline          8:26:20 svc:/system/filesystem/usr:default\r\nonline          8:26:20 svc:/network/physical:default\r\nonline          8:26:20 svc:/system/identity:node\r\n\r\nbash-3.00# svcs -D /network/ipfilter     (依赖ipfilter的服务也都是开启)\r\nSTATE          STIME    FMRI\r\nonline          8:26:23 svc:/milestone/network:default\r\n\r\n\r\n问题:是什么原因导致ipfilter服务处于维护状态, svcsadm clear /network/ipfilter 也无济于事。如果是有问题该怎样查看问题。

论坛徽章:
0
2 [报告]
发表于 2006-11-20 12:50 |只看该作者
应该是ipfilter的配置参数不对,看看Ipfilter的配置参数。\r\n别问我,我也不知道怎么看哦

论坛徽章:
0
3 [报告]
发表于 2006-11-20 15:37 |只看该作者
原帖由 yuhuohu 于 2006-11-20 12:50 发表\r\n应该是ipfilter的配置参数不对,看看Ipfilter的配置参数。\r\n别问我,我也不知道怎么看哦
\r\n\r\n\r\n你说的是主配置文件吗? \r\nbash-3.00# find / -name ipf.conf\r\n/var/sadm/pkg/SUNWipfr/save/pspool/SUNWipfr/reloc/etc/ipf/ipf.conf\r\n/usr/kernel/drv/ipf.conf\r\n/etc/ipf/ipf.conf\r\n\r\n哪个应该是的?分别打开3个文件,里面内容为:\r\n------------------------------------------------------------\r\nbash-3.00# cat /var/sadm/pkg/SUNWipfr/save/pspool/SUNWipfr/reloc/etc/ipf/ipf.conf\r\n#\r\n# ipf.conf\r\n#\r\n# IP Filter rules to be loaded during startup\r\n#\r\n# See ipf(4) manpage for more information on\r\n# IP Filter rules syntax\r\n------------------------------------------------------------\r\nbash-3.00# cat /usr/kernel/drv/ipf.conf\r\n#\r\n#\r\nname=\"ipf\" parent=\"pseudo\" instance=0;\r\n------------------------------------------------------------\r\nbash-3.00# cat /etc/ipf/ipf.conf\r\n#\r\n# ipf.conf\r\n#\r\n# IP Filter rules to be loaded during startup\r\n#\r\n# See ipf(4) manpage for more information on\r\n# IP Filter rules syntax.\r\n------------------------------------------------------------\r\n哪个是主配置文件?

论坛徽章:
0
4 [报告]
发表于 2006-11-21 03:51 |只看该作者
svcs -x svc:/network/ipfilter:default\r\n\r\nsvc:/network/ipfilter:default (IP Filter)\r\n State: online since Wed Nov 15 03:45:47 2006\r\n   See: ipfilter(5)\r\n   See: /etc/svc/volatile/network-ipfilter:default.log\r\nImpact: None.\r\n\r\n查看 /etc/svc/volatile/network-ipfilter:default.log 的內容看看有什麼錯誤訊息。

论坛徽章:
0
5 [报告]
发表于 2006-11-21 08:26 |只看该作者
你自己都不知道自己要过滤什么地址什么端口,又何苦去启用它呢\r\n\r\n好好看看Solaris10的系统管理文档集中的:SystemAdministration Guide: IP Services\r\nChapter25 Solaris IP Filter (Overview)\r\nChapter26 Solaris IP Filter (Tasks)

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-03-19 06:20:00数据库技术版块每日发帖之星
日期:2016-07-05 06:20:00
6 [报告]
发表于 2006-11-21 09:31 |只看该作者
pfil not plumbed on any network interfaces.\r\nNo network traffic will be filtered.\r\n\r\n没有配置网络

论坛徽章:
0
7 [报告]
发表于 2006-11-21 10:15 |只看该作者
原帖由 yuhuohu 于 2006-11-21 10:06 发表\r\nLZ继续努力啊
\r\n\r\n\r\n帮忙顶。` 学会为止。

论坛徽章:
0
8 [报告]
发表于 2006-11-21 10:17 |只看该作者
LZ,我看了ipf的帮助,好像要做好多事情哦\r\n\r\n Enabling Solaris IP Filter Feature\r\n     Solaris IP Filter is installed with  the  Solaris  operating\r\n     system. However, packet filtering is not enabled by default.\r\n     Use the following  procedure  to  activate  the  Solaris  IP\r\n     Filter feature.\r\n\r\n     1.  Assume a role that includes  the  IP  Filter  Management\r\n         rights profile (see rbac(5)) or become superuser.\r\n\r\n     2.  Edit the /etc/ipf/pfil.ap file. This file  contains  the\r\n         names  of network interface cards (NICs) on the host. By\r\n         default, the names are commented out. Uncomment the dev-\r\n         ice  names  that  carry  the network traffic you want to\r\n         filter. See ipfilter(5) for an example of a portion of a\r\n         pfil.ap file.-------------------------------------------------------配置pfil.ap文件\r\n\r\n     3.  Activate your changes to the  /etc/ipf/pfil.ap  file  by\r\n         restarting  the  network/pfil  service instance, as fol-\r\n         lows:\r\n\r\n         # scvadm restart network/pfil\r\n\r\n     4.  Create a packet filtering rule set. See ipf(4).--------建包过滤规则\r\n\r\n     5.  (Optional) Create a network  address  translation  (NAT)\r\n         configuration file. See ipnat.conf(4).-------------可选\r\n\r\n     6.  (Optional) Create an address  pool  configuration  file.\r\n         See ippool(4).------------------------可选\r\n\r\n         Create an ipool.conf file if you  want  to  refer  to  a\r\n         group of addresses as a single address pool. If you want\r\n         the address pool configuration file to be loaded at boot\r\n         time, create a file called /etc/ipf/ippool.conf in which\r\n         to put the address pool. If you do not want the  address\r\n         pool  configuration  file to be loaded at boot time, put\r\n         the ippool.conf file in a location other  than  /etc/ipf\r\n         and manually activate the rules.\r\n\r\n     7.  Enable Solaris IP Filter, as follows:\r\n\r\n         # svcadm enable network/ipfilter\r\n\r\n     8.  Activate Solaris  IP  Filter  either  by  rebooting  the\r\n         machine  or  unplumbing  and plumbing the network inter-\r\n         faces on which you are filtering. Here is an example  of\r\n         unplumbing and plumbing:------------------------------------重启机器或删除添加网卡来激活IP filter\r\n\r\n         # ifconfig hme0 unplumb\r\n         # ifconfig hme0 plumb 172.16.32.15 netmask 255.255.255.0 up\r\n         # ifconfig hme0 inet6 unplumb\r\n         # ifconfig hme0 inet6 plumb fec3:f840::1/96 up

论坛徽章:
0
9 [报告]
发表于 2006-11-21 10:28 |只看该作者
!!!!你有QQ吗? 边做边交流~。\r\n\r\n\r\n第一步: vi /etc/ipf/pfil.ap\r\niprb    -1      0       pfil\r\nelxl    -1      0       pfil\r\ne1000g  -1      0       pfil\r\nbge     -1      0       pfil\r\nnf      -1      0       pfil\r\nfa      -1      0       pfil\r\nci      -1      0       pfil\r\nel      -1      0       pfil\r\nipdptp  -1      0       pfil\r\nlane    -1      0       pfil\r\ndnet    -1      0       pfil\r\npcelx   -1      0       pfil\r\nspwr    -1      0       pfil\r\n\r\nrtls   -1      0       pfil   <-------这个是我添加进去的rtls0是我唯一网卡接口!\r\n\r\n第二步:# svcadm restart network/pfil   <-----重启生效\r\n\r\n第三步:vi /etc/ipf/ipf.conf\r\n添加2条规则  pass out quick on rtls0 from any to any\r\n             block in quick on rtls0 from 192.168.1.0/24 to 192.168.1.39   <-----添加2条规则\r\n\r\n第四步:# svcadm enable network/ipfilter    <---重启ipfilter服务。\r\n\r\n第五步:reboot 重新启动pc \r\n\r\n第六步: svcs /network/ipfilter  显示结果 维护状态  !汗。。\n\n[ 本帖最后由 chenlie39 于 2006-11-21 11:44 编辑 ]

论坛徽章:
0
10 [报告]
发表于 2006-11-21 11:39 |只看该作者
我已经搞定了。。哥们,很容易啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP