我使用的是Ubuntu16.04LTS,除了一些IP地址之外,我想阻止所有连接。我运行了这些命令
ufw default allow outgoing
ufw default deny incoming
ufw allow ssh
ufw enable
ufw allow from 1.2.3.4它对我来说很好,但是现在我想允许一个ipv6地址,我正在使用这个命令。
ufw allow from 2405:204:108e:650c:10cb:11ea:bb8f:3937但这不起作用
发布于 2020-01-08 16:14:22
man ufw是答案(在第139行),手册中提到了以下内容:
...
ufw deny proto tcp from 2001:db8::/32 to any port 25
This will deny all traffic from the IPv6 2001:db8::/32 to tcp port 25
on this host. Note that IPv6 must be enabled in /etc/default/ufw for
IPv6 firewalling to work.
...由于OP没有提到更多关于他的困难的细节,我希望这个答案可以帮助您创建IPV6 ufw规则。
发布于 2022-06-28 06:37:16
信任谷歌搜索?
我注意到,当我在谷歌上搜索“我的ip”时,谷歌显示我有一个IPv6地址--这并不适用于访问ufw。
当我检查我的IP与另一个网站,然后我有一个IPv4地址-工作的访问与不明飞行物。
https://askubuntu.com/questions/913106
复制相似问题