OpenSnitch: A Little Snitch-based firewall on Ubuntu

OpenSnitch Logo

Many of the users we are not used to using any Firewall application in our systems, this is due either because we do not know the available applications and oriented for this purpose or for the simple fact of having the thought that "Linux is immune".

Either of these is bad, well The use of Firewall in the system not only gives us greater protectionBut we can also know a little more about incoming and outgoing connections that are interacting with our system.

About OpenSnitch

That is why we are going to talk about an application that will facilitate this, the application we are going to talk about is OpenSnitch which is a free and open source Firewall application written in Python for GNU / Linux systems. It can be used to monitor applications, preventing or allowing them to connect to connected networks through advanced rules.

This firewall app is heavily inspired by the Little Snitch show Mac OS, so users who have been migrating from it, this application will be a bit familiar.

This firewall software can monitor the applications running on your system, blocking your access to the Internet until you allow or deny it.

When an application tries to access the Internet, it initially hangs and a dialog box is displayed asking if you want to allow its connection once, this session, or forever.

Something that we can highlight and that we must mention about OpenSnitch is that this application is still under development so it is not stable yet, this may result in it often having some bugs or crashing unexpectedly.

That is why The use of OpenSnitch is not recommended for business use or areas where they have data or important infrastructure. The use of OpenSnitch is recommended for the common user as it is polished.

How to install OpenSnitch on Ubuntu 18.04 and derivatives?

If you want to install this application on your system You should know that there is currently no repository or deb package Constructed of this for ease of installation.

So that it is necessary to build and compile the application on our own. For this, it is necessary to make some previous configurations to our system.

The first that We must have the backports repository enabled if you are not using the latest version of Ubuntu 18.04.

Now It is also necessary to have Go for the construction of the application:

echo "export GOPATH=\$HOME/.go" >> ~/.bashrc
echo "export PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin:\$HOME/.local/bin:\$HOME/.bin" >> ~/.bashrc
source ~/.bashrc

OpenSnitch

Done this now we are going to install the application dependencies with this command:

sudo apt install golang-go python3-pip python3-setuptools python3-slugify protobuf-compiler libpcap-dev libnetfilter-queue-dev python-pyqt5 pyqt5-dev pyqt5-dev-tools git

Already with the dependencies installed now if we can start compiling the system with these commands:

go get github.com/golang/protobuf/protoc-gen-go
go get -u github.com/golang/dep/cmd/dep
pip3 install --user grpcio-tools
go get github.com/evilsocket/opensnitch
cd $GOPATH/src/github.com/evilsocket/opensnitch
make
sudo -H make install

Now It is necessary to add OpenSnitch at the beginning and start its services this we do with:

mkdir -p ~/.config/autostart
cd ui
cp opensnitch_ui.desktop ~/.config/autostart/
sudo systemctl enable opensnitchd
sudo service opensnitchd start

And with that, the application should start running and is ready to be used in our systems.

How to uninstall OpenSnitch from Ubuntu 18.04?

If you want to uninstall this application from your system, you must open a Ctrl + Alt + T terminal and execute the following commands.

The first thing we must do is stop and disable the opensnitchd service:

sudo service opensnitchd stop
sudo systemctl disable opensnitchd

And finally delete the application and application configuration folders from our system with:

rm ~/.config/autostart/opensnitch_ui.desktop
rm -rf ~/.go/src/github.com/evilsocket/opensnitch
sudo rm /usr/local/bin/opensnitch-ui
sudo rm /usr/local/bin/opensnitchd
sudo rm -r /etc/opensnitchd
sudo rm -r /usr/local/lib/python3.6/dist-packages/opensnitch_ui*
sudo rm -r /usr/local/lib/python3.6/dist-packages/opensnitch/
sudo rm /etc/systemd/system/opensnitchd.service
sudo rm /etc/systemd/system/multi-user.target.wants/opensnitchd.service
sudo rm /usr/share/applications/opensnitch_ui.desktop
sudo rm /usr/share/kservices5/kcm_opensnitch.desktop

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.