首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ip6tables将不接受-d目的地,但iptables将接受

ip6tables将不接受-d目的地,但iptables将接受
EN

Unix & Linux用户
提问于 2017-01-09 00:57:28
回答 1查看 1.4K关注 0票数 0

我试图允许IPv6地址连接到服务器上的某个IP,而不是其他IP。下面的内容不适用于ip6tables,但它只适用于普通的iptables。但是,当我从-d xx.xx.xx.77命令中删除ip6tables时,它将工作,这将允许这个ip6地址连接到我不想要的盒子上的任何IP。

代码语言:javascript
复制
ip6tables -I INPUT -d xx.xx.xx.77 -i enp2s0f0 -p tcp -m multiport --dports http,https -s 2400:cb00::/32 -j ACCEPT
ip6tables v1.6.0: host/network `xx.xx.xx.77' not found

man ip6tables-d-s展示了以下内容:

代码语言:javascript
复制
   [!] -s, --source address[/mask][,...]
          Source  specification.  Address  can  be  either a network name, a hostname, a network IP address (with /mask), or a plain IP address. Hostnames will be resolved once only, before the rule is submitted to the kernel.  Please note that
          specifying any name to be resolved with a remote query such as DNS is a really bad idea.  The mask can be either an ipv4 network mask (for iptables) or a plain number, specifying the number of 1's at the left side of the network mask.
          Thus, an iptables mask of 24 is equivalent to 255.255.255.0.  A "!" argument before the address specification inverts the sense of the address. The flag --src is an alias for this option.  Multiple addresses can be specified, but this
          will expand to multiple rules (when adding with -A), or will cause multiple rules to be deleted (with -D).

   [!] -d, --destination address[/mask][,...]
          Destination specification.  See the description of the -s (source) flag for a detailed description of the syntax.  The flag --dst is an alias for this option.
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-01-09 23:22:25

IPv6无法连接到IPv4。在ip6tables中,一切都需要ipv6

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/335874

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档