LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-12-2022, 04:48 PM   #1
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557
Interactive / prompting application firewall


I need an application firewall - i.e. interactive software that pauses connections and displays a prompt (for every connection without an existing rule), allowing the user to pick options such as (allow|deny) (port|process) (once|until logout|always), and then either drops or unpauses the connection in accordance with selection (creating a rule if appropriate).

I previously looked into this about a year ago and was disappointed by the results:
Quote:
Originally Posted by boughtonp View Post
Neither of those projects appears in Debian or Arch repos.

* Douane is at https://douaneapp.com/ and that page includes "Warning: unfortunately the project is suffering of a kernel freeze bug that can break your machine!"
* OpenSnitch is at https://github.com/evilsocket/opensnitch and checking a few recent issues, I'm not reassured about that project either.

Searching for alternatives...
* Leopard Flower personal firewall for Linux (LPFW) was abandoned Oct 2020;
* TuxGuardian hasn't been updated since 2006;
* Portmaster is Alpha software;
* LAF appears to be vapourware;
* Picosnitch does monitoring-only (no blocking).

Looking though the Portmaster website, there's plenty of points in its favour - when they ditch Electron I might give it a try.
It seems Douane still has that bug, Portmaster is still on Electron, I still don't trust OpenSnitch, and no matches in Debian's repos.

So, does anyone know any other interactive firewalls that allow adhoc rules via GUI prompts and which are worth considering?

 
Old 12-14-2022, 08:01 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Original Poster
Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557

Well after a bunch more depressing searches, I have come to the conclusion that to get what I want I'll need to write my own. :/

Yet another chore, but at least it shouldn't be too bad - both iptables and nftables have libnetfilter_queue, which queues packets and asks a userspace application to deliver an accept/drop verdict. There's a Python binding, which looks to be straight-forward...
Code:
iptables -A INPUT -j NFQUEUE --queue-num 1
iptables -A OUTPUT -j NFQUEUE --queue-num 1
Code:
from netfilterqueue import NetfilterQueue

def print_and_accept(pkt):
   print(pkt)
   pkt.accept()

queue_num = 1
nfqueue = NetfilterQueue()
nfqueue.bind( queue_num , print_and_accept )
try:
   nfqueue.run()
except KeyboardInterrupt:
   print('')

nfqueue.unbind()
So I should be able to plug a simple Tk interface to display the relevant information and choices and so on.
(Not sure if nfqueue will provide process names by default, but if not Picosnitch does do that part, so I can use its method.)


Probably unlikely to happen in the next few weeks, but if after a few months someone finds this thread and I haven't posted what I end up with, feel free to prod me.

And I'm still interested if anyone knows of any existing solutions that'll save me the effort - I have more interesting projects I'd rather be progressing.

 
Old 06-03-2023, 05:27 PM   #3
TeusLollo
LQ Newbie
 
Registered: Jun 2023
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by boughtonp View Post

Probably unlikely to happen in the next few weeks, but if after a few months someone finds this thread and I haven't posted what I end up with, feel free to prod me.
I'm interested, and it's been a few months. Did anything come out of it?
 
Old 06-04-2023, 05:05 AM   #4
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
i am interested also what you have come up with.
 
Old 06-04-2023, 08:31 AM   #5
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Original Poster
Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557

Unfortunately not - I've been tangled up in assorted other issues and haven't even managed to look at it yet. :(

 
Old 06-04-2023, 11:49 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Have you considered opensnitch ?
https://www.makeuseof.com/opensnitch...twork-threats/
https://github.com/evilsocket/opensnitch
 
1 members found this post helpful.
Old 06-08-2023, 04:02 PM   #7
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Quote:
Originally Posted by tredegar View Post
i started to play with it, it looks like a good program.
 
Old 08-22-2023, 10:43 PM   #8
jvz
LQ Newbie
 
Registered: Aug 2023
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by boughtonp View Post
I previously looked into this about a year ago and was disappointed by the results:

It seems Douane still has that bug, Portmaster is still on Electron, I still don't trust OpenSnitch, and no matches in Debian's repos.

So, does anyone know any other interactive firewalls that allow adhoc rules via GUI prompts and which are worth considering?
Douane doesn't work at all for me and I don't think it has been updated in years? I also found OpenSnitch and Portmaster both miss connections such as ICMP and from some appimages, or assigns the connection to the wrong program, and I'm not sure what OpenSnitch does to my iptables but there are a few programs it makes unbearably slow to launch, whether they were allowed or not.

I tried picosnitch and so far have settled on using it for monitoring and setting Firejail to be used by default for some programs to block network access.

It may not have GUI prompts, but so far this setup has been working really well for me so I thought I'd share, and was interested if you had gotten around to making any progress with your idea.
 
Old 08-24-2023, 05:48 AM   #9
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Original Poster
Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557

Thanks jvz, but still no progress; instead I seem to be accumulating blockers that are preventing me making progress with anything. :(

 
Old 09-22-2023, 04:52 PM   #10
jvz
LQ Newbie
 
Registered: Aug 2023
Posts: 2

Rep: Reputation: 0
Instead of blocking specific programs with firejail or using a userspace application for prompts, now I drop everything with iptables for my primary user, and created a secondary user with network access. Anything I want connecting to the internet I just run as the secondary user, and have Picosnitch running in the background to verify/alert me of any issues with my setup.

So far this gives me much better performance, and better privacy and usability. I'll report back on this after trying it for a few more weeks or if I change anything.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs lisp: naming convention for interactive/non-interactive function pairs hydraMax Programming 6 05-31-2013 12:01 AM
[SOLVED] Of interactive and non-interactive shells. stf92 Linux - Newbie 1 10-05-2011 12:37 PM
Interactive and non-interactive shells? Tim356 Linux - Newbie 7 11-05-2008 10:32 PM
BASH - How to open an interactive script from a non interactive script..... OldGaf Programming 4 06-29-2008 04:34 PM
interactive and non-interactive shell linuxjamil Programming 3 09-03-2006 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration