Linux Firewall

Alright boys, It's finally time to address the miserable firewall situation in linux.

Why is there no in-kernel way to make firewall rules on an application basis? We have to rely on external kernel modules to make that happen and that thing doesn't seem to be packaged for any distro.

What gives? I though servers especially would profit from per application rules instead of blanket port blocking for everyone.

How do I protect myself from programs phoning home though port 80 without sacrificing actually using a browser?

And why is a rewrite of iptables(BPF) actually hailed as the second coming of jesus christ even though it still doesn't allow per app rules and brings nothing new to the table?

I am beyond mad, seriously.

Attached: Douane.png (786x429, 167K)

Other urls found in this thread:

blogpirate.net/2017/08/08/how-to-block-those-nasty-ads-in-spotify-app-in-windows-linux-and-osx/
gitlab.com/apparmor/apparmor/wikis/home/
github.com/evilsocket/opensnitch
twitter.com/SFWRedditVideos

Wow

dude

nice

reddit

spacings

!!

Install crupix

Namespaces allow airtight application firewalling but they're a relatively recent development.

SubgraphOS' firewall uses them

AppArmor allows per-app rules and doesn't require external kernel modules

>SubgraphOS
Thanks for that. It even looks like we can build the firewall without the os. I will try that out.

Really? Isn't it ubuntu exclusive?

>>>> i just leave this here for OP blogpirate.net/2017/08/08/how-to-block-those-nasty-ads-in-spotify-app-in-windows-linux-and-osx/

> Really? Isn't it ubuntu exclusive?
Nothing is ubuntu exclusive.

>Really? Isn't it ubuntu exclusive?
AppArmor was included in the mainline Linux kernel since version 2.6.36
gitlab.com/apparmor/apparmor/wikis/home/

Thanks for the information. I will try this out too.

sudo ufw enable

Nah, that is port based. The gui is made to mimic windows firewalls but it doesn't do any per app rules.

There is in-kernel support. Just compile your kernel with SELinux and use iptables for per role rules

I was wondering why I do not always have an application firewall.
Linux guys always told me to use apparmor or selinux, but it was not convenient.
Windows Mac and even Android support, but SHIT Linux did not support.
Finally a new generation came.

>iptables and not nftables
I cant remember why it's better, but i remember it was better when I read about why it was better.

Too bad for you, now BPF is the new hotness in the block.

iptables -m owner --gid-owner


subgraph is pointless now that grsec is no longer available

kind of a hacky solution. I want to block all ports by default and only allow plasma to get widgets and firefox to browse the net. The former wouldn't be possible with this approach and the latter would work but would miss all integration from the main user account.

Nftables is the planned replacement for iptables. But as you probably know, adoption rates for that kind of stuff is really slow (it's been in the works for over 10 years now). Though it's part of the kernel as of version 3.1-something.

Use a fucking real firewall at the core or edge that does application filtering like a man's firewall: palo alto

Meanwhile, windows had this feature forever. Stuff like tinywall is a just a frontend to windows firewall.
I'm hoping systemd saves linux per app networking. Lennart already blogged about per service networking.

Linux used to have this too at some point, but it was unmaintained so it got removed

github.com/evilsocket/opensnitch
/thread

run apps in docker and disable networking. done.

Attached: images[1].png (211x239, 8K)

>ufw
>doesn't do any per app rules.
What did he mean by this?

Attached: 1496447823315.png (1280x720, 841K)

Selinux does all that

So it does? Please show me, senpai.

>running non-free software on your computer.
The reason most Linux distros and smartphones don't ship with firememes or anti-memes is because you shouldn't have to use one.

Attached: apple.png (96x96, 15K)

Use tails so anything that phones home will just get some random Tor IP. Or just disable networking whilst you want to be offline

Firewall per application is stupid trash invented by trolls to shill their personal firewalls on windows.

>be program x, have no internet access
>act like program y which has access
>lmao @ ur firewall

It's time to free yourself from windowsesque thinking about things.
You set up iptables rules and be done. Personal firewalls are scam.

Everything free as in freedom, friend.

How? You aren't actually thinking that such a firewall will only check for app name? Nobody can pretend to be /usr/bin/bash so long as root isn't compromised.

Even then it won't work with selinux as you will still be confined

>use GNU like windows
>install lots of potentially phoning home proprietary software
>feels unsafe
>demands better security for malicious applications in his system, installed by himself
Hehehe

Attached: 1506202904731.png (907x830, 559K)

>How do I protect myself from programs phoning home though port 80 without sacrificing actually using a browser?
You don't install shit, that is how you protect yourself from shit phoning home.

Do you read the source of every piece of software you use? Why should I trust software just because it's GPL? They do whatever the fuck they want and I want to prevent them from doing actual harm.

ufw allow ssh
means "allow TCP port 22", not "allow SSH"

>be program x, have no internet access
>act like program y which has access
>lmao @ ur firewall
Kernel namespaces prevent this.

Not on windows.

>Why is there no in-kernel way to make firewall rules on an application basis?
cgroups
now go fuck yourself you faggot

Attached: 1501274197171.png (350x729, 131K)

So, how does someone tie in cgroups into iptable rules and let a daemon present me with notifications that allow me to allow a connection or not? cgroups aren't meant to be used by endusers, you buffoon.

>cgroups aren't meant to be used by endusers
they are you retard
it was poettering who started that meme because he wanted systemd to be the only writer due to its shitty design

>how
what a fucking shame search engines haven't been invented yet

isnt iptables the kernel firewall? its included in the kernel source.

it must be garbage then. the javascript framework faggots shill their shit with similar words.

thats still an application firewall. shit just runs on another device instead.

almost every distro comes with iptables tho

Every Linux comes with an unconfigured IPTABLES

i tried opensuse once and it came with a preconfigured iptables.

no, the firewall is called netfilter, iptables is just the current userspace interface

no
Fedora and RHEL ship with configured firewalld and (Open)SUSE has YaST2-firewall configured by default

>Server distros

>fedora
>opensuse
>server

Attached: 1503809948780.jpg (570x500, 36K)

There is. Compile the would-be modules into the kernel retard.