VPS侦探论坛

标题: 请教军哥:怎么查看iptables已经开放了哪些端口 [打印本页]

作者: superany    时间: 2012-11-17 12:01
标题: 请教军哥:怎么查看iptables已经开放了哪些端口
怎么查看iptables已经开放了哪些端口
作者: licess    时间: 2012-11-17 14:34
https://www.vpser.net/security/linux-iptables.html
早就发过了
https://www.vpser.net/vps-howto 先去学习学习
作者: superany    时间: 2012-11-20 09:07
标题: 回复 2# 的帖子
5555 3q3q~~~~~~`
作者: Ang    时间: 2018-4-9 18:42
  1. [root@host ~]# iptables  -L -n --line-numbers
  2. Chain INPUT (policy ACCEPT)
  3. num  target     prot opt source               destination
  4. 1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
  5. 2    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
  6. 3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
  7. 4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
  8. 5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443
  9. 6    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:3306
  10. 7    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 8

  11. Chain FORWARD (policy ACCEPT)
  12. num  target     prot opt source               destination

  13. Chain OUTPUT (policy ACCEPT)
  14. num  target     prot opt source               destination
复制代码

看了论坛上提问的人,防火墙规则都好多。我也照那篇文章填了一下命令,输出一看,只有这么不到十行,惭愧至极!




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4