如何禁用 Wine 中运行的程序的 Internet 访问?

如何禁用 Wine 中运行的程序的 Internet 访问?

如何禁用 Wine 中运行的程序的 Internet 访问?

答案1

如果您以独立用户身份运行 wine,则可以使用 iptables 所有者模块禁用互联网访问。例如,如果您创建用户“wine”,则可以使用以下命令:

iptables -A OUTPUT --uid-owner wine -m tcp -p tcp -j REJECT --reject-with tcp-reset#快,但只适用于 tcp

iptables -A OUTPUT --uid-owner wine -j REJECT #所有其他协议

答案2

您可以尝试使用火狱。 例如:

firejail --noprofile --net=none wine iexplore

在终端中查找错误消息以查看互联网是否正常工作。

0009:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0009:fixme:ieframe:handle_navigation_error Navigate to error page

答案3

Wine 使用与 Windows 注册表相同的工具,可通过 regedit 访问,就像使用普通 Windows 系统一样。我猜想其中某处隐藏着一个键,您可以使用它来禁用网络连接,或者至少将其设置为仅限本地连接。(我不是 Windows 注册表方面的专家,所以很遗憾我不能说在哪里)

或者,您可以尝试将 Wine 设置为使用代理访问互联网,如果您指定的代理不存在,此操作显然会失败。不过,这有点儿像 hack。

相关内容