Commit graph

1,961 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
dd7476fe52
ui: fw rules improvements
- Fixed error validating some meta expressions.
- Added option to enable/disable fw rules.
- Limit fw rules deletion to 1 rule for now, until a bug is fixed.
2023-05-03 01:29:13 +02:00
Gustavo Iñiguez Goia
d88a253d9c
ui: refresh rules list after delete a rule
Related: #921
2023-05-02 20:59:38 +02:00
Gustavo Iñiguez Goia
c6decf1bad
ui: refresh rules list when adding/editing a rule
Related: #921
2023-05-02 00:25:13 +02:00
Gustavo Iñiguez Goia
4570491523
allow to filter connections by source port
- Allow to filter connections by source port.
2023-05-01 14:48:34 +02:00
Gustavo Iñiguez Goia
57739cc974
rules: allow to filter connections by source ip/net
- Allow to filter connections by source IP/Network.
  (it also may be useful filter by source port)
- Removed AlwaysOnTop Hint from rules editor dialog.

Closes #922
2023-04-29 18:47:44 +02:00
Gustavo Iñiguez Goia
79754860de
ui, fw: validate int values when adding fw rules 2023-04-29 01:52:35 +02:00
Gustavo Iñiguez Goia
45576fe9f3
ui, fw: validate IPs when adding fw rules 2023-04-29 01:34:48 +02:00
Gustavo Iñiguez Goia
bd9d4eb4c6
ui, fw: added target parameters column
Display target parameters (reject >>with tcp reset<<) on the firewall
table.
2023-04-27 00:30:39 +02:00
Gustavo Iñiguez Goia
0f443bbea8
ui, stats: added contextual menu to fw table
Added option to delete rules by right cliking on a row.
2023-04-27 00:25:20 +02:00
Gustavo Iñiguez Goia
2341b69fe7
added script to dump ebpf maps 2023-04-24 17:55:05 +02:00
Gustavo Iñiguez Goia
cbdb00b620
deb: remove autostart file on uninstall
Closes #916
2023-04-22 23:38:36 +02:00
Gustavo Iñiguez Goia
a1948e259a
Bump versions to 1.6.0 2023-04-22 12:32:53 +02:00
Gustavo Iñiguez Goia
5a0a0161d7
added how to launch the GUI after installation 2023-04-22 11:47:57 +02:00
Gustavo Iñiguez Goia
e8ff8349f2
ui: improved notifications behaviour
Up until now, clicking on a system notification caused several
behaviours depending on the Desktop Environment:
 - On Gnome it executed opensnitch_ui.desktop, which as of today kills
   the running opensnitch-ui process, and relaunches it.
 - On other DEs the notifications was just dismissed.

To improve the first behaviour, the Hint "desktop-entry" has been removed.
Now clicking on a notification on Gnome will bring the main window to the
front if it's opened.

On the other hand a new button has been added to the notifications, to
open the main window if it's not opened, or bring it to the front
otherwise.
2023-04-22 01:35:58 +02:00
Gustavo Iñiguez Goia
19890062ff
added more logs for better issues debugging
- Log packet mark, which may help debugging VPN connections for example.
- Log the nfqueue number when we fail to setup the queue.
  * Suggest to restart the computer on one particular case (#912).
2023-04-21 23:28:13 +02:00
Gustavo Iñiguez Goia
74b6bc2c29
ui: improved DefaultAction behaviour
- On the very first install, or if the GUI's settings.conf file was not
  created, GUI's DefaultAction item was not configured properly.
- Now when the daemon is not connected to the GUI, it'll use the
  DefaultAction configured in /etc/opensnitchd/default-config.json
- When the daemon is connected to the GUI, the GUI will reconfigure
  daemon's DefaultAction value when the one defined by the GUI.
  In this case the value defined in default-config.json is not modified,
  it'll only be valid while it's connected to the GUI.

Now when opening Preferences->Nodes, it'll display daemon's
DefaultAction defined in the file default-config.json file, which is the
default action applied when the daemon is not connected to the GUI.

Related: #884 , #896
2023-04-16 00:49:51 +02:00
Gustavo Iñiguez Goia
fb27e4cbb1
ui,fw: allow to use CIDR notation to add IPs
When adding firewall rules with IPs ranges, allow to use CIDR notation
(1.2.3.4/56).
Previously only 2.2.2.3-2.2.2.100 was supported.
2023-04-15 00:41:22 +02:00
Gustavo Iñiguez Goia
fe88841640
sys fw: support ports range operators
Allow to use operators (==, !=) when adding firewall rules with port
ranges (444-555).
2023-04-15 00:33:47 +02:00
Gustavo Iñiguez Goia
e32881c03f
sys fw: allow to apply operators on Meta and Ct expressions
Allow to apply operators (==, !=) on Meta (mark, skuid, skgid, etc) and
Conntrack Mark expressions.
2023-04-13 01:36:59 +02:00
Gustavo Iñiguez Goia
05bb37e862
ui, fw: added more checks for rules creation
- Don't allow a 0 or empty statement value, except for Meta.
- snat, dnat and redirect parameters must contain ":" to specify a port
  or ip+port (192.168.1.1:8080, :8080).
- queue verdict parameter must be an integer.
2023-04-13 00:07:08 +02:00
Gustavo Iñiguez Goia
31f9f904f3
ui, fw: allow to configure verdicts parameters
- Allow to configure DNAT, SNAT, REDIRECT and QUEUE verdicts' parameters.
- Allow to add rules to FORWARD, PREROUTING and POSTROUTING chains.
2023-04-12 22:45:17 +02:00
Gustavo Iñiguez Goia
d374b4df02
ui, views: allow to copy cells' value
Allow to copy cells values when on a detailed view, by double clicking
on a cell.
2023-04-09 13:05:52 +02:00
Gustavo Iñiguez Goia
762503a5f0
Merge pull request #900 from 154pinkchairs/openrc-support
feat(daemon): add OpenRC script
2023-04-08 15:29:13 +02:00
Marcelina Hołub
327df0c0ee feat(daemon): add OpenRC script 2023-04-02 02:33:40 +02:00
Gustavo Iñiguez Goia
75cacf3530
ui, prefs: fixed loading nodes if no langs available
Don't fail loading nodes if there're no languages available.
2023-03-23 23:49:13 +01:00
Gustavo Iñiguez Goia
816496ae72
dns monitor: ignore some dns answers
Ignore those DNS answers that we don't need or use.
2023-03-12 21:37:11 +01:00
Gustavo Iñiguez Goia
5f532e5011
logging: better connections logging
- in DEBUG level log dst_host(dst_ip), instead of only dst_host.
2023-03-10 22:02:02 +01:00
Gustavo Iñiguez Goia
e58ade4365
dns/logs minor improvements
- Fixed adding CNAME domains to cache.
- Better connection logging in DEBUG.
- Exclude from dns cache local IPs, equal IPs/domains.
2023-03-10 21:30:28 +01:00
Gustavo Iñiguez Goia
b560ad6967
Added systemd-resolved DNS monitor
Up until now we intercepted query and DNS answers using these methods:
 - Intercepting DNS queries to port 53.
 - Intercepting DNS answers from port 53
 - Intercepting glibc DNS functions.

Unfortunately there are scenarios where these methods are not enough:
 - When using DNSSEC, DoT, DoH, etc.
 - When resolvers return DNS answers from cache
 - When resolvers don't use glibc functions to resolve domains.
 - When applications use D-BUS to query for domain names instead of
   using UDP/TCP (VPNs, flatpaks, electron based apps, etc.).

With this new DNS monitor now we're able to intercept DNS answers when
systemd-resolved is used to resolve domains.
This includes queries from flatpaks and others containerized
applications, as well as cyphered DNS queries.

Closes #874
2023-03-10 15:04:42 +01:00
Gustavo Iñiguez Goia
c2352d0934
ui, pop-ups: increased default timeout to 30s
Although the timeout is configurable from the Preferences dialog,
there's a consensus that the default timeout should be increased.
2023-03-05 22:05:32 +01:00
Gustavo Iñiguez Goia
f0fdc02910
i18n: added new Dutch translation
Thanks to @Vistaus
2023-03-02 11:23:23 +01:00
Gustavo Iñiguez Goia
0ced786eae
ui, i18n,prefs: capitalize languages, minor refactoring 2023-02-28 22:42:22 +01:00
NRGLine4Sec
7273f73e59
make version consistent with github tags (#870)
* make version consistent with github tags
2023-02-28 22:21:55 +01:00
Gustavo Iñiguez Goia
a22cacf748
Merge pull request #869 from psydbernz/text_cleanup-01
fixed typo, made tooltip text more conventional
2023-02-28 21:01:11 +01:00
Bernz Pallek
63f6ff6e3b fixed typo, made tooltip text more conventional 2023-02-28 11:23:54 -05:00
Gustavo Iñiguez Goia
e786bf5c50
ui, i18n: allow to change language from the GUI
Restarting the GUI is required for now.

Closes #709 #803
2023-02-28 01:59:10 +01:00
Gustavo Iñiguez Goia
df5fe3b373
ui: fixed exception colorizing cells
Some checks failed
CI - build eBPF modules / build (5.19, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (5.19, master) (push) Has been cancelled
CI - build eBPF modules / build (5.8, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (5.8, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
v1.6.0-rc.5
On some distros (Fedora 37), on the very 1st launch of the GUI, it
crashed with the error:
 "object of type QCommonStyle has been deleted"

The only way I've found of getting rid of this error is by obtaining this
object on every paint() call.
2023-02-26 17:40:50 +01:00
Gustavo Iñiguez Goia
303c7f7e82
ui, preferences: better DB selection 2023-02-26 15:58:57 +01:00
Gustavo Iñiguez Goia
a586e0d276
ui, preferences: improved wigdets enabling/disabling
By default disable DB options to delete old events.
If DB type is in-memory, disable DB options to delete old events.
2023-02-26 15:24:04 +01:00
Gustavo Iñiguez Goia
9a751026eb
ui: reverting in-memory DB cached file URI
In 5b5e2714ae we added support for
in-memory cached DB, to allow delete old events from memory (#844).

Unfortunately, on some systems this URI (file::memory:?cache=shared)
creates a file on disk on user's home.

This file is in the end a DB, so if users want to delete old events,
they'll have to save events to disk.

On the other hand, when in-memory DB is selected, we now disable the
option to delete old events from memory.

Closes #857
2023-02-26 12:23:11 +01:00
Gustavo Iñiguez Goia
ea5adfb05a
ui: improved events window icons
Fallback to -symbolic icons if default icon theme is not found
(mainly on Fedora+GNOME).
2023-02-26 01:57:10 +01:00
Gustavo Iñiguez Goia
2f0d21f9cc
ui: removed label from rules editor dialog
Make a little more room for widgets.
2023-02-25 13:04:59 +01:00
Gustavo Iñiguez Goia
71c734c0d6
ui: fixed icons on rules editor dialog 2023-02-25 12:40:23 +01:00
Gustavo Iñiguez Goia
0114185d9b
i18n: updated Hungarian translation 2023-02-24 23:57:44 +01:00
Gustavo Iñiguez Goia
dc8ac1cd7c
ui: fixed 64x64 icon 2023-02-24 22:05:02 +01:00
Gustavo Iñiguez Goia
dbb7d6a198
ui: fixed exception painting events rows 2023-02-23 23:39:28 +01:00
Gustavo Iñiguez Goia
5237a2df60
lower error message to debug 2023-02-22 23:07:11 +01:00
Gustavo Iñiguez Goia
c4a9a98944
ui: updated appstream Summary,Description fields 2023-02-22 21:03:13 +01:00
Gustavo Iñiguez Goia
da4d834c15
tests: disable netlink sockets tests by default
It causes random failures on restricted environments.
Use NETLINK_TESTS=1 to launch them.
2023-02-21 00:23:16 +01:00
Gustavo Iñiguez Goia
475ae98702
ui: fixed utils
rel: #847
2023-02-20 23:04:03 +01:00