亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

目錄
What is OpenSnitch?
Key Features of OpenSnitch
Install OpenSnitch in Linux
Start OpenSnitch Service
Secure Linux System with OpenSnitch
Events Tab
Nodes Tab
Rules Tab
Hosts Tab
Applications Tab
Addresses Tab
Ports Tab
Users Tab
Uninstall OpenSnitch
Frequently Asked Questions
Conclusion
首頁 系統(tǒng)教程 Linux 使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Mar 23, 2025 am 10:27 AM

In the fast-changing field of online safety, tools like OpenSnitch have become very important for keeping your Linux system safe and secure. OpenSnitch, the GNU/Linux port of the renowned Little Snitch application firewall, provides an unparalleled layer of security to your Linux environment. This blog post aims to explore what is OpenSnitch, and its impressive features, how to install OpenSnitch in various Linux distributions, and finally how to use OpenSnitch to secure your Linux system.

Table of Contents

What is OpenSnitch?

OpenSnitch is an open-source application-level firewall for GNU/Linux systems. This advanced firewall takes a cue from its Mac OS counterpart, Little Snitch, and brings in a robust level of security and control to Linux systems.

It helps monitor and control outgoing traffic, allowing users to set policies on a per-application basis. Thus, OpenSnitch grants you the authority to dictate which applications can send data over the internet and which ones cannot.

To put this in simple terms, OpenSnitch is like a traffic cop for your system. It lets you control what information can leave your computer over the internet.

Key Features of OpenSnitch

OpenSnitch is packed with many useful features that make it stand out among other firewalls. It brings granular control to users, allowing them to block or allow outgoing connections based on different criteria such as destination, port, and protocol. Additionally, it provides detailed reports and visualizations of network traffic, allowing you to monitor what applications are making requests and where they are being sent. OpenSnitch is also highly configurable, permitting users to craft detailed rules according to their requirements.

Here's a list of OpenSnitch features:

  1. Outbound Connections Filtering: OpenSnitch allows you to monitor and control the information that your applications send over the internet.
  2. Ad, Tracker, and Malware Blocking: With OpenSnitch, you can stop ads, trackers, and malware domains from affecting your entire system.
  3. Firewall Configuration from GUI: OpenSnitch allows you to set up and manage your system's firewall easily from its Graphic User Interface (GUI). You can use it to configure your input policy and allow specific services to reach your system.
  4. Manage Multiple Nodes: You can control and manage multiple nodes or systems from a single OpenSnitch GUI. A node refers to a daemon or a background process running on a machine. When you install the OpenSnitch daemon on multiple machines, each one becomes a node that can be managed from a centralized location through the OpenSnitch GUI. This makes it easy to monitor and control several systems at once.
  5. Integration with SIEM: OpenSnitch can be integrated with Security Information and Event Management (SIEM) systems. This allows for improved monitoring and faster response to security incidents.

Install OpenSnitch in Linux

Starting from version v1.5.2 and onwards, OpenSnitch is now available in the default repositories of both Debian Bookworm 12 and Ubuntu 23.04. To install OpenSnitch Debian 12 and Ubuntu 23.04, simply run:

$ sudo apt update
$ sudo apt install opensnitch

On other versions of the Linux distributions, you can install OpenSnitch by directly downloading the installation files hosted in its official GitHub repository.

Step 1: Download the Packages

First, you need to download the necessary packages for your system. You can do this by going to https://github.com/evilsocket/opensnitch/releases. From here, download the deb/rpm packages suitable for your Linux distribution.

Step 2: Installation

For .deb Systems (like Ubuntu)

Open your terminal and navigate to the directory where you downloaded the .deb files. Then, enter the following command:

$ sudo apt install ./opensnitch*.deb ./python3-opensnitch-ui*.deb

For .rpm Systems (like AlmaLinux, CentOS, Fedora, and Rocky Linux)

Open your terminal and navigate to the directory where you downloaded the .rpm files. Then, enter the following commands:

$ sudo yum localinstall opensnitch-1*.rpm
$ sudo yum localinstall opensnitch-ui*.rpm

Step 3: Run OpenSnitch

After installing OpenSnitch, you can run it by entering the following command in the terminal:

$ opensnitch-ui

Alternatively, you can also launch OpenSnitch from the Applications menu on your system.

A note for Ubuntu 22.04 and Linux Mint 21.x users:

OpenSnitch UI may not work in Ubuntu 22.04 and LinuxMint 21.x due to the python3-grpcio version. To fix this follow the steps given below:

First, you need to check your Python version. Open the terminal and enter the following command:

$ python3 -V

You'll see an output like Python 3.10.9 which indicates your Python version.

Install Correct grpcio Version

The issue seems to be with the python3-grpcio version (1.30.2-3build6) that comes with Ubuntu 22. If the OpenSnitch UI is not working or is using 100% CPU, you need to install the correct version of grpcio from pip.

Use the following command, replacing "3.10" with your Python version number if different:

$ python3.10 -m pip install --ignore-installed grpcio==1.44.0

This command installs the grpcio version 1.44.0 which is compatible with OpenSnitch on Ubuntu 22.04 and LinuxMint 21.x.

After completing these steps, the OpenSnitch UI should function properly without consuming excessive CPU resources.

Start OpenSnitch Service

On Debian and Ubuntu, OpenSnitch daemon will start automatically after installation. Just in case, if it doesn't start, manually start OpenSnitch service.

Here's how you can manually start the OpenSnitch service if it doesn't start automatically after installation or reboot:

Step 1: Enable the OpenSnitch Service

First, enable the OpenSnitch service by running the following command in the terminal:

$ sudo systemctl enable --now opensnitch

This command ensures that the OpenSnitch service will automatically start each time you boot your system.

Step 2: Start the OpenSnitch Service

Next, manually start the OpenSnitch service with the following command:

$ sudo systemctl start opensnitch

This command starts the OpenSnitch service immediately.

If the above commands don't work with opensnitch, try replacing opensnitch with opensnitchd in both commands.

After these steps, the OpenSnitch service should be up and running on your system.

And that's it! You've successfully installed OpenSnitch on your Linux system and started its service. Now, you can start configuring it to monitor and control your outbound network traffic.

Secure Linux System with OpenSnitch

Once you've installed OpenSnitch, you'll see a new icon in your system tray. You can click this icon to open the OpenSnitch interface. Alternatively, you can find OpenSnitch in your system menu under the 'Internet' section. If you're using GNOME, you can find OpenSnitch by searching for it in the dash and then clicking on its icon.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

As soon as OpenSnitch is started, the background service starts to check your system's connections. It will then prompt you to either allow or deny these connections.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

If you don't take any action within 30 seconds (you can change this time interval), OpenSnitch will proceed with the default action. The default action is deny.

If you want to change the time interval or the default action, click on the Preferences icon and change the values accordingly.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Please note that the OpenSnitch prompts the user to either allow or block an application each time a new one is launched. While this might initially seem bothersome, it's a one-time process for each application. After you've chosen to allow or block all your applications, these prompts will stop. This means that after the initial setup, OpenSnitch will operate smoothly, enhancing your system's security without disrupting your workflow.

Within the OpenSnitch graphical user interface (GUI), you can observe all the connections and processes that have been intercepted by the daemon. By double-clicking on a specific row, you can view the information regarding a process, rule, host, or user.

Let us navigate to each tab and try to observe what is going on in there.

Events Tab

This is the first tab in OpenSnitch interface. In Events tab, you can view all the activity that the OpenSnitch service has recorded.

The following picture shows the "Events" section of OpenSnitch UI.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

As you can see, the 'Events Tab' displays a comprehensive log of all the network connections that the OpenSnitch service has registered. You can filter these connections by the action taken, a specific keyword, or limit the number of entries shown. Furthermore, you have the option to organize these connections based on the columns.

Certain columns are interactive and will display more details when clicked on. For instance, if you double-click on a 'Node', it will show you all the connections associated with that particular node.

Nodes Tab

You can view a list of all known nodes under the 'Nodes' tab. As I stated already, a node refers to a service (or daemon) running on a computer. This service can be installed across several computers and controlled from a central server, like a Graphical User Interface (GUI).

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Rules Tab

Within the 'Rules' tab, you can view the list of all defined rules. Double-clicking on a rule will provide more details about it. Moreover, by right-clicking on a rule, you can perform various operations individually or in groups.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

If you find any suspicious activity, you can immediately block them from the 'Rules' section. For example, to deny a connection, simply Right click on a rule and select Action -> Deny.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

If you look at the left pane of the Rules tab, the Application rules category link shows two more sub-categories named "Permanent" and "Temporary".

By default, all the rules are temporary that are saved under the "Temporary" sub-category. These rules will remain in effect only until the system is restarted. To make them permanent, Right click on the Rule, and select Duration -> Always.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

After you've made the rules permanent, they will be under "Permanent" sub-category.

Similarly, you can disable and delete a rule by choosing the respective option from the right click context menu.

Hosts Tab

This tab shows the list of remote hosts that are connected to your system.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

You can double click on any host to view the detailed information (E.g. Destination IP, protocol, port etc.) about that particular host.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Applications Tab

The Applications tab shows the list of applications (i.e. processes) that currently being monitored by OpenSnitch.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Click on any application to view more details about that particular application.

Addresses Tab

The Addresses tab lists all the IP addresses of the remote hosts connected to your local system. The remote hosts might be the software mirrors, DNS server (E.g. 8.8.8.8), and NTP server etc.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

If you want to view more details about a remote host, simply double click on the IP address.

Ports Tab

This tab shows the what ports are currently being used by applications to connect to the external world. It could be your DNS server port (E.g. 53).

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Users Tab

This tab shows all the list of system and local user accounts.

使用OpenSnitch防火牆將Linux安全性提升到一個新的水平

Uninstall OpenSnitch

Here are the steps to uninstall OpenSnitch from your system, which includes the removal of its rules and configuration:

Note: If you're planning to install a new version of OpenSnitch, there's no need to uninstall the old version first. Simply install the new version and it will automatically upgrade.

For deb packages:

To remove the package while keeping the configuration and rules, use the following command:

$ sudo apt remove opensnitch python3-opensnitch-ui

To completely remove the packages, including rules and configuration, use the following command:

$ sudo apt remove --purge opensnitch python3-opensnitch-ui

For rpm packages:

  • For Yum, use the command: sudo yum remove opensnitch opensnitch-ui
  • For Dnf, use the command: sudo dnf remove opensnitch opensnitch-ui
  • For Zypper, use the command: sudo zypper remove opensnitch opensnitch-ui

If you installed pip packages:

You can uninstall them using the following commands:

$ pip3 uninstall grpcio-tools unicode_slugify pyinotify
$ pip3 uninstall grpcio PyQt5 Unidecode

(Note: The latter are transient dependencies; you can check with pip show to validate how the original installation was done. If you find the installation location is not /usr/lib/, then these are not installed through apt.)

After following these steps, OpenSnitch should be completely removed from your system.

Frequently Asked Questions

Here's a list of commonly asked FAQ about OpenSnitch.

Q: What is OpenSnitch?

A: OpenSnitch is an open-source application level firewall that allows you to control outgoing connections from your computer.

Q: What are some key features of OpenSnitch?

A: OpenSnitch can filter outbound connections interactively, block ads, trackers or malware domains, manage multiple nodes from a GUI, configure system firewall from the GUI, and integrate with third-party SIEM solutions.

Q: How do I install OpenSnitch?

A: You can download the appropriate packages from the official GitHub page and install them using the package manager of your system. For Debian Bookworm 12 and Ubuntu 23.04, OpenSnitch is available in the official repositories and can be installed using the apt package manager.

Q: The OpenSnitch UI doesn't work in Ubuntu 22.04, how can I fix this?

A: The issue might be related to the python3-grpcio version. As a workaround, install the grpcio version from pip as your regular user, following the commands provided in the "Install OpenSnitch" section.

Q: What does the term 'node' refer to in OpenSnitch?

A: A 'node' refers to a service running on a computer. You can install the service across multiple computers and control them from a central server, like a GUI.

Q: What are the 'Events', 'Nodes' and 'Rules' tabs in the OpenSnitch GUI?

A: The 'Events' tab logs all network connections registered by the service. The 'Nodes' tab lists all recognized nodes. The 'Rules' tab displays all the defined rules.

Q: What happens if I don't respond to the connection prompts from OpenSnitch?

A: If you don't take any action within 30 seconds, OpenSnitch will proceed with the default action you have set up beforehand. You can change these later via Preferences window.

Q: Are OpenSnitch rules permanent?

A: By default, all the rules in OpenSnitch are temporary. These rules will remain in effect only until the system undergoes a restart.

Q: Can OpenSnitch help block ads and trackers?

A: Yes, OpenSnitch can be used to block ads, trackers, and even malware domains system-wide, giving you control over what your system connects to.

Q: Do I need to uninstall OpenSnitch before installing a new version?

A: No, if you're planning to install a new version of OpenSnitch, there's no need to uninstall the old version first. Simply install the new version and it will automatically upgrade.

Related Read: How To Effortlessly Monitor Your Internet Traffic Using Sniffnet Network Monitoring Tool In Linux And Unix

Conclusion

OpenSnitch is a robust, user-friendly application level firewall. Its ability to control outbound connections, block unwanted ads, and provide detailed insights makes it an invaluable tool for ensuring network security. Whether you're an individual user or managing multiple nodes, OpenSnitch offers a blend of power and simplicity that enhances system control and protection.

Let us know your thoughts on this firewall application via the comment section below.

Resource:

  • OpenSnitch GitHub Repository

以上是使用OpenSnitch防火牆將Linux安全性提升到一個新的水平的詳細內(nèi)容。更多資訊請關(guān)注PHP中文網(wǎng)其他相關(guān)文章!

本網(wǎng)站聲明
本文內(nèi)容由網(wǎng)友自願投稿,版權(quán)歸原作者所有。本站不承擔相應(yīng)的法律責任。如發(fā)現(xiàn)涉嫌抄襲或侵權(quán)的內(nèi)容,請聯(lián)絡(luò)admin@php.cn

熱AI工具

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅(qū)動的應(yīng)用程序,用於創(chuàng)建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發(fā)環(huán)境

Dreamweaver CS6

Dreamweaver CS6

視覺化網(wǎng)頁開發(fā)工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Laravel 教程
1597
29
PHP教程
1488
72
在RHEL,Rocky和Almalinux中安裝LXC(Linux容器) 在RHEL,Rocky和Almalinux中安裝LXC(Linux容器) Jul 05, 2025 am 09:25 AM

LXD被描述為下一代容器和虛擬機管理器,它為在容器內(nèi)部或虛擬機中運行的Linux系統(tǒng)提供了沉浸式的。 它為有支持的Linux分佈數(shù)量提供圖像

如何在Linux機器上解決DNS問題? 如何在Linux機器上解決DNS問題? Jul 07, 2025 am 12:35 AM

遇到DNS問題時首先要檢查/etc/resolv.conf文件,查看是否配置了正確的nameserver;其次可手動添加如8.8.8.8等公共DNS進行測試;接著使用nslookup和dig命令驗證DNS解析是否正常,若未安裝這些工具可先安裝dnsutils或bind-utils包;再檢查systemd-resolved服務(wù)狀態(tài)及其配置文件/etc/systemd/resolved.conf,並根據(jù)需要設(shè)置DNS和FallbackDNS後重啟服務(wù);最後排查網(wǎng)絡(luò)接口狀態(tài)與防火牆規(guī)則,確認53端口未

您將如何調(diào)試速度慢或使用高內(nèi)存使用量的服務(wù)器? 您將如何調(diào)試速度慢或使用高內(nèi)存使用量的服務(wù)器? Jul 06, 2025 am 12:02 AM

發(fā)現(xiàn)服務(wù)器運行緩慢或內(nèi)存佔用過高時,應(yīng)先排查原因再操作。首先要查看系統(tǒng)資源使用情況,用top、htop、free-h、iostat、ss-antp等命令檢查CPU、內(nèi)存、磁盤I/O和網(wǎng)絡(luò)連接;其次分析具體進程問題,通過ps、jstack、strace等工具追蹤高佔用進程的行為;接著檢查日誌和監(jiān)控數(shù)據(jù),查看OOM記錄、異常請求、慢查詢等線索;最後根據(jù)常見原因如內(nèi)存洩漏、連接池耗盡、緩存失效風暴、定時任務(wù)衝突進行針對性處理,優(yōu)化代碼邏輯,設(shè)置超時重試機制,加限流熔斷,並定期壓測評估資源。

在Ubuntu中安裝用於遠程Linux/Windows訪問的鱷梨調(diào)味醬 在Ubuntu中安裝用於遠程Linux/Windows訪問的鱷梨調(diào)味醬 Jul 08, 2025 am 09:58 AM

作為系統(tǒng)管理員,您可能會發(fā)現(xiàn)自己(今天或?qū)恚┰赪indows和Linux並存的環(huán)境中工作。 有些大公司更喜歡(或必須)在Windows Box上運行其一些生產(chǎn)服務(wù)已不是什麼秘密

如何使用Brasero在Linux中燃燒CD/DVD 如何使用Brasero在Linux中燃燒CD/DVD Jul 05, 2025 am 09:26 AM

坦率地說,我不記得上一次使用CD/DVD驅(qū)動器的PC。這要歸功於不斷發(fā)展的科技行業(yè),該行業(yè)已被USB驅(qū)動器和其他較小且緊湊的存儲媒體所取代,這些磁盤可提供更多存儲

如何在Linux中找到我的私人和公共IP地址? 如何在Linux中找到我的私人和公共IP地址? Jul 09, 2025 am 12:37 AM

在Linux系統(tǒng)中,1.使用ipa或hostname-I命令可查看私有IP;2.使用curlifconfig.me或curlipinfo.io/ip可獲取公網(wǎng)IP;3.桌面版可通過系統(tǒng)設(shè)置查看私有IP,瀏覽器訪問特定網(wǎng)站查看公網(wǎng)IP;4.可將常用命令設(shè)為別名以便快速調(diào)用。這些方法簡單實用,適合不同場景下的IP查看需求。

如何在Rocky Linux 8上安裝Nodejs 14/16&npm 如何在Rocky Linux 8上安裝Nodejs 14/16&npm Jul 13, 2025 am 09:09 AM

Node.js建立在Chrome的V8引擎上,是一種開源的,由事件驅(qū)動的JavaScript運行時環(huán)境,用於構(gòu)建可擴展應(yīng)用程序和後端API。 Nodejs因其非阻滯I/O模型而聞名輕巧有效,並且

如何在RHEL,Rocky和Almalinux中設(shè)置MySQL複製 如何在RHEL,Rocky和Almalinux中設(shè)置MySQL複製 Jul 05, 2025 am 09:27 AM

數(shù)據(jù)複製是將數(shù)據(jù)複製到多個服務(wù)器中以提高數(shù)據(jù)可用性並增強應(yīng)用程序的可靠性和性能的過程。在mySQL複製中,數(shù)據(jù)從主服務(wù)器的數(shù)據(jù)庫複製到OT

See all articles