UFW 轉發任何流量到DNS服务器
您可以使用以下命令来允许 UFW 转发任何流量到 DNS 服务器:
sudo ufw allow in on <interface> to any port 53 proto udp
sudo ufw allow in on <interface> to any port 53 proto tcp
sudo ufw allow out on <interface> to any port 53 proto udp
sudo ufw allow out on <interface> to any port 53 proto tcp
其中,<interface> 是您要允许流量通过的网络接口的名称。例如,如果您要允许通过 eth0 网络接口,则应将 <interface> 替换为 eth0。如果您想要允许通过所有网络接口,则可以将 <interface> 替换为 any。
请注意,为了使 DNS 转发正常工作,您还需要确保您的 DNS 服务器已正确配置,并且可以从您的 UFW 防火墙所在的网络中访问。
原文地址: https://www.cveoy.top/t/topic/dOoB 著作权归作者所有。请勿转载和采集!