Skip to content

Commit

Permalink
bugfix: check for Linux firewall install before use it
Browse files Browse the repository at this point in the history
  • Loading branch information
outspace committed Dec 30, 2024
1 parent 212e9b3 commit c0ea38d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipc/ipcserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ bool IpcServer::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterInd

#ifdef Q_OS_LINUX
// double-check + ensure our firewall is installed and enabled
if (!LinuxFirewall::isInstalled())
LinuxFirewall::install();
LinuxFirewall::setAnchorEnabled(LinuxFirewall::Both, QStringLiteral("000.allowLoopback"), true);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::Both, QStringLiteral("100.blockAll"), blockAll);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::IPv4, QStringLiteral("110.allowNets"), allowNets);
Expand Down

0 comments on commit c0ea38d

Please sign in to comment.