服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. iptables Linuxnetworking
  3. iptables和多个端口
Intereting Posts
使用无人参与文件join域中的图像 Hyper-V Windows Server 2008 R2企业版+ Linux许可证 用户在RHEL上看到所有其他LDAP用户的默认行为? 更新Ubuntu VPS返回错误 关于是降级还是replaceSQL Server 2008 使用nslookup从ansible playbook中检测networking 使用Amazon EC2的Java MBeans Apache可以使用Alias指令来获取文件吗? 不尊重FcgidMaxProcesses Apache httpd的简单用户指南/教程? 用Apache的mod_proxy_fcgi设置php-fpm chroot 在EC2实例之间进行SSH连接而不必提供密钥 PowerShell导入DnsShell模块 Oracle和SQL Server能否存在于同一台服务器上? 奇怪的mysqldump行为

iptables和多个端口

这对我不起作用:

# iptables -A INPUT -p tcp --dports 110,143,993,995 -j ACCEPT iptables v1.4.7: unknown option `--dports' Try `iptables -h' or 'iptables --help' for more information. 

然而,在手册页中,有一个选项 – --dports …任何想法?

  • 在Iptables中debugging规则
  • 如何重置Ubuntu 12.04 iptables默认不locking自己?
  • 白名单允许使用iptables的IP(input/输出)
  • iptables – 目标将数据包路由到特定的接口?
  • 使用IPtables或空路由黑名单约100万个IP地址?

你必须在规则中使用--match multiport来定义更多的端口

 #iptables -A INPUT -p tcp --match multiport --dports 110,143,993,995 -j ACCEPT 

在使用dports选项之前,您需要指定-m multiport模块

  • 添加iptables规则是否足够,无需重新启动?
  • Ubuntu ufw:在每个接口的基础上设置一个规则
  • iptables:如何通过特定的端口只允许一个IP?
  • 我怎样才能阻止Ubuntu中的所有三个端口?
  • 为什么ICMPredirect主机发生?
  • Iptables在巨大的环境中pipe理
  • traceroute使用UDP或ICMP还是两者?
  • 如何将TCPstream量复制到一个或多个远程服务器以进行基准testing?
  • 用其所有规则删除一个iptables链
  • 为什么运行服务器的Docker容器将端口暴露给外部世界,即使所述端口被iptables阻塞?

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy