Live data from Hacker News

Douane personal firewall for GNU/Linux

douaneapp.com

31–40 of 46 posts

Re: Douane personal firewall for GNU/Linux

#31
post #22

Earlier quoted context omitted.

There is a murky gray zone between actively malicious and fully privacy respecting applications. Applications in this zone are more prevalent in closed source software, and Linux is increasingly being used to run such software.

I think this is what I'm not getting :-). To someone who's so sick of dealing with GTK3 and xdg and everythingd breakage that I'm contemplating getting a Mac more seriously than when I saw the PowerMac G5 specs, the idea that someone who needs to run this sort of applications would not rather run Windows or OS X is unthinkable. I mean, after every point release in GTK 3, I would rather run Windows...

I'm not entirely sure what GTK or GTK point releases have to do with it. Isn't it just a programming framework with a GUI?

Re: Douane personal firewall for GNU/Linux

#32

Earlier quoted context omitted.

I think this is what I'm not getting :-). To someone who's so sick of dealing with GTK3 and xdg and everythingd breakage that I'm contemplating getting a Mac more seriously than when I saw the PowerMac G5 specs, the idea that someone who needs to run this sort of applications would not rather run Windows or OS X is unthinkable. I mean, after every point release in GTK 3, I would rather run Windows...

I'm not entirely sure what GTK or GTK point releases have to do with it. Isn't it just a programming framework with a GUI?

It's a very popular one. However, for the last couple of years, minor releases of a supposedly stable branch included backwards-incompatible changes that broke applications and themes. Basically, upgrading from 3.8 to 3.10 resulted in applications looking funny and some of them crashing. Quite a few application and theme developers ended up calling quits -- stopped maintaining their applications, kept on using GTK 2 or switched to Qt.

This caused a lot of negativity in the open source community. It's a shame, because on a technical level, it's actually very good. Its developers have, more recently, attempted to address this problem and their plan looks like it should work. However, the proof of the pudding is in the eating, and we haven't had much time to eat it yet :-).

It's unfair to blame my frustration with Linux lately solely on GTK, too, I'm sorry if I gave that impression. A lot more factors are at work here. GTK has just been very representative of this mindframe lately.

Re: Douane personal firewall for GNU/Linux

#34

I remember using this sort of applications on Windows (a very long time ago; those were the days of Windows 98, whose famous stability drove me to Linux and BSD). Can some of its users help me shed some light on the use case of such a program on an open source system? I mean: - Signed packages from trusted repos should not need firewalling, at least not if you're using a serious distro rather than a hobby project. Th…

A personal firewall is also a great way to gain a better understanding of how applications communicate and networking in general.

Re: Douane personal firewall for GNU/Linux

#36

I would be careful, a critical buffer overflow vulnerability was just found in the Douane kernel module: https://github.com/Douane/douane-dkms/commit/61023b91fbafab8...

And it's still wrong, since strncpy() doesn't null terminate: it null pads. That means that if the string is longer than the buffer, it will not be correctly terminated.

Re: Douane personal firewall for GNU/Linux

#37
post #10

Nice project and makes you think why all programs are given all network access by default. This page lists nothing under Packages but the author has actually made AUR packages for Archlinux: https://github.com/Douane/Douane/wiki/Archlinux-Packaging Here's a directly link to the installation instructions for anyone who'd want to try it out https://github.com/Douane/Douane/wiki/Compilation

> Nice project and makes you think why all programs are given all network access by default. One trick I learned to negate that is to insert an iptables rule that blocks all out-of-LAN traffic except for specific secondary user-groups. Not primary groups, but ones which you have to manually grant to users. Then, those applications which you do wish to access the Internet can be run using sg e.g. sg bobs_internet_acce…

I had not heard of sg(1) before. The sg(1) manpage on Linux says:

>The sg command works similar to newgrp but accepts a command. The command will be executed with the /bin/sh shell. With most shells you may run sg from, you need to enclose multi-word commands in quotes. Another difference between newgrp and sg is that some shells treat newgrp specially, replacing themselves with a new instance of a shell that newgrp creates. This doesn't happen with sg, so upon exit from a sg command you are returned to your previous group ID.

I could not find sg(1) for FreeBSD, neither in base nor in ports, but FreeBSD does have newgrp(1) mentioned above. The FreeBSD manpage for newgrp(1) notes:

>For security reasons, the newgrp utility is normally installed without the setuid bit. To enable it, run the following command:

> chmod u+s /usr/bin/newgrp

The main source file of newgrp(1), /usr/src/usr.bin/newgrp/newgrp.c is 310 lines long so I think creating an sg(1) based on that one and maybe also by looking at doas(1) -- which is in ports, not in base -- should not be too difficult.

However, I think using sg(1) to protect against random malicious binaries and shell scripts having internet access equates roughly to security by obscurity in that it only protects you as long as the malicious code is unaware of sg(1).

Consider the following (which I wrote without testing it with a group limiting firewall but it should work like this):

  nw_access_group=
  while IFS= read -r curr_group ; do
    nw_access_group="$curr_group"
    sg "$nw_access_group" 'curl -s http://www.example.com/' >/dev/null
    if [[ $? -eq 0 ]] ; then
      break
    fi
  done 

Re: Douane personal firewall for GNU/Linux

#38
post #36

I would be careful, a critical buffer overflow vulnerability was just found in the Douane kernel module: https://github.com/Douane/douane-dkms/commit/61023b91fbafab8...

And it's still wrong, since strncpy() doesn't null terminate: it null pads. That means that if the string is longer than the buffer, it will not be correctly terminated.

They do check the string size before using strncpy though, so it should be fine

Re: Douane personal firewall for GNU/Linux

#39
The reason I like control like this is the reason I want a plastic shutter/window on all phone and laptop cameras I should trust ur software butttttttt I still want the extra piece of mind. Also I don't trust software since ...ya know...zero days.

Re: Douane personal firewall for GNU/Linux

#40
A centrally managed app permissions system would go a long way to improving Linux’s desktop experience. For example in Wayland, there's a huge tug-of-war going on between security minded people who don’t want keyloggers and screen capture vs average desktop users that want their old global shortcuts and screen capture/remote access apps to work.

I think a permission system like Douane’s would solve this divide.

Post reply on HN