小编ryo*_*a74的帖子

Ubuntu 上用于 OpenVPN 的 UFW 或 IPTables?

我是网络和 Linux 的新手,在将 Internet 连接限制为仅使用 VPN 时,我总是对应该使用 UFW 还是 IP 表感到困惑。环顾四周,我发现有人说 ip 表更好,有人说 UFW 就足够了。

我在网上找到了这个:

ufw enable
ufw default reject outgoing
ufw allow out 53/udp ## comment this line if your VPN routes DNS through tunnel
ufw allow out 1194/udp
ufw allow out on tun0
Run Code Online (Sandbox Code Playgroud)

另外,我发现了一些脚本,它们以一种我仍在尝试理解的更复杂的方式来设置 ip 表。

你们有什么建议:使用 ip 表或简单地使用 UFW 来杀死我的互联网,以防我的 vpn 连接断开?

提前致谢!

iptables firewall vpn networking openvpn

15
推荐指数
1
解决办法
4万
查看次数

标签 统计

firewall ×1

iptables ×1

networking ×1

openvpn ×1

vpn ×1