Do you have any antivirus recomendations for Linux.

You are viewing a single thread.
View all comments View context
5 points

Thank you for the advice!

Firewall on Linux is something I still don’t understand, and explanations found on Internet have always confused me. Do you happen to know some good tutorial to share? Or maybe one doesn’t need to do anything at all in distros like Ubuntu?

Regarding ssh: you only mean incoming ssh, right?

permalink
report
parent
reply
5 points
*

@bushvin@pathfinder.social @toikpi@feddit.uk @hevov@discuss.tchncs.de @ChonkaLoo@lemmy.world @HotBoxghost2743@lemmy.ml @c1177johuk@lemmy.world (I’m surely forgetting someone, sorry)

Thank you ALL for the great advice and guides! I’m writing from behind a laptop firewall now, and don’t notice anything :) It was smoother than I expected. In the end I used UFW because it was already installed, but I’ll take a look at firewalld too in some days! I don’t have any incoming ssh connections (not a server), so I didn’t need to worry about that :)

Really great people here at Lemmy :)

permalink
report
parent
reply
2 points

You’re welcome friend!

permalink
report
parent
reply
3 points

Yes, usually you configure your endpoint firewall to block incoming traffic, while allowing all outgoing.

Unless you’re in a very secure zone, like DMZ’s.

permalink
report
parent
reply
3 points

I don’t think you need to configure your firewall. Firewalls are usualy used to block incomming connectings. Usualy a Firewall that blocks all incomming connections is already active on your modem/router. Adding exception to the modem/router Firewall usualy happen through port forwords.

permalink
report
parent
reply
3 points

Firewall - While this tutorial is Ubuntu 16.04 it should work current versions of Ubuntu https://www.linuxbabe.com/desktop-linux/getting-started-gufw-ubuntu-16-04 It should work for other distributions once you change the package manager.

permalink
report
parent
reply
3 points

What don’t you completely understand about Linux firewall? I don’t mind helping you learn

permalink
report
parent
reply
5 points

Thank you everyone, also @bushvin@pathfinder.social @toikpi@feddit.uk.

For example, if I open my settings (I’m on Ubuntu+KDE) I don’t see any firewall settings to configure. So I expect this is automatically done by the OS, but maybe I’m wrong. A bit surprised that the system itself doesn’t recommend using a firewall, to be honest.

Many firewall tutorials start speaking about “your server”. Then I wonder: is this really for me? I don’t have a server. Or do I?

I now see that the tutorial from @toikpi@feddit.uk gives a better explanation, cheers! So I see it’s good to have a firewall simply because one connects to public wifis from time to time.

I see that both UFW and firewalld are recommended… is it basically OK whichever I choose?

permalink
report
parent
reply
2 points

I see that both UFW and firewalld are recommended… is it basically OK whichever I choose?

Yes. Whichever works for you should be fine. In the end you should be able to manage it

permalink
report
parent
reply
2 points
*

The main one everybody uses at least from my knowledge and from what I’ve used over the last 13 years is UFW. That is what you want to use.

A firewall is very important not just for being on public Wi-Fi connections. A firewall is your extra layer of protection

I don’t know what Distro you run. But it’s almost the same for each one

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-20-04

UFW is installed by default on Ubuntu. If it has been uninstalled for some reason, you can install it with sudo apt install ufw.

Using IPv6

sudo nano /etc/default/ufw

That command should come back with this

IPV6=yes

Save and close the file. Now, when UFW is enabled, it will be configured to write both IPv4 and IPv6 firewall rules. However, before enabling UFW, we will want to ensure that your firewall is configured to allow you to connect via SSH. Let’s start with setting the default policies.

Setting up default policies

sudo ufw default deny incoming sudo ufw default allow outgoing

These commands set the defaults to deny incoming and allow outgoing connections. These firewall defaults alone might suffice for a personal computer, but servers typically need to respond to incoming requests from outside users. We’ll look into that next.

To configure your server to allow incoming SSH connections, you can use this command:

sudo ufw allow ssh

This will create firewall rules that will allow all connections on port 22, which is the port that the SSH daemon listens on by default. UFW knows what port allow ssh means because it’s listed as a service in the /etc/services file.

However, we can actually write the equivalent rule by specifying the port instead of the service name. For example, this command works the same as the one above:

sudo ufw allow 22

If you configured your SSH daemon to use a different port, you will have to specify the appropriate port. For example, if your SSH server is listening on port 2222, you can use this command to allow connections on that port:

sudo ufw allow 2222

To enable UFW, use this command:

sudo ufw enable
permalink
report
parent
reply
2 points

ebtables and iptables can be very complex. And I failed my 1st RHCE exam because of them. But once you learn, you will never unlearn, as they are quite beautifully crafted. You just need to get into the mindset of the people who wrote the tools…

Look into firewalld It has a rather simplified cli interface: firewall-cmd

The manpages will tell you a lot.

firewall-cmd —add-service=ssh Will open the ports for your ssh daemon until you reload your firewall or reboot your system firewall-cmd —permanent —add-service=ssh Will open the ssh ports until you remove them

firewall-cmd —list-all Will show you the current firewall config

permalink
report
parent
reply
5 points

Try nftables directly, it’s simple and straightforward, scripting syntax is easy.

permalink
report
parent
reply
3 points

Another simpler frontend for iptables I think is well suited for desktop environemnts is ufw. It does what it’s supposed to do and is extremely simple to use

permalink
report
parent
reply
1 point

I personally do not know ufw, but if it does what it must, then you’re solid.

Linux is also about choices: do stuff the way you choose to, and makes you comfortable.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.5K

    Monthly active users

  • 6.6K

    Posts

  • 179K

    Comments