免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3612 | 回复: 2

[服务应用] iptables在不启用的情况下,怎么查看配置? [复制链接]

论坛徽章:
0
发表于 2014-09-24 15:37 |显示全部楼层
  1. [root@db3 ~]# service iptables status
  2. iptables: Firewall is not running.
  3. [root@db3 ~]# iptables -nL
  4. Chain INPUT (policy ACCEPT)
  5. target     prot opt source               destination         

  6. Chain FORWARD (policy ACCEPT)
  7. target     prot opt source               destination         

  8. Chain OUTPUT (policy ACCEPT)
  9. target     prot opt source               destination         
  10. [root@db3 ~]# service iptables start
  11. iptables: Applying firewall rules: [  OK  ]
  12. [root@db3 ~]# iptables -nL
  13. Chain INPUT (policy ACCEPT)
  14. target     prot opt source               destination         
  15. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
  16. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
  17. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  18. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
  19. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21
  20. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpts:1024:65535
  21. REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable

  22. Chain FORWARD (policy ACCEPT)
  23. target     prot opt source               destination         
  24. REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

  25. Chain OUTPUT (policy ACCEPT)
  26. target     prot opt source               destination         
复制代码
本来是配了防火墙的,但如果stop的话用iptables-nL看就为空,请问有什么方法查看呢?

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
发表于 2014-09-24 15:42 |显示全部楼层
  1. cat /etc/sysconfig/iptables
复制代码

论坛徽章:
0
发表于 2014-09-24 15:54 |显示全部楼层
回复 2# Shell_HAT


    谢谢!

    本来记得有这个文件,刚刚2了,在suse的机器find / -name "iptables"没找到,就以为记错了。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP