Commit graph

1,961 commits

Author SHA1 Message Date
munix9
6bbed9dd67
check whether dist_path exists
"dist_path" seems to be a debian thing, in openSUSE for example the path does not exist.
2025-06-05 11:31:44 +02:00
Gustavo Iñiguez Goia
856c83f84b
Merge pull request #1355 from tioguda/master
i18n: updated Brazilian Portuguese translation
2025-06-04 02:13:03 +02:00
tioguda
222fce1e93
i18n: updated Brazilian Portuguese translation 2025-06-03 20:18:53 -03:00
Gustavo Iñiguez Goia
a3826c50c9
improved remote logger
- Added MaxConnectAttempts configuration option:
   If not specified, it defaults to 0, which means that we'll try to connect
   indefinitely to the remote server.

 - Improved connection retry behaviour:
   We were not reconnecting to the server if we failed to connect on the
   first attempt. Now we'll try to connect until MaxConnectAttempts, or
   indefinitely if not specified (default value 0).

 - If the logger is not connected to the remote server, don't send
   messages to the queue.

Closes #1350.
2025-06-02 23:25:43 +02:00
Gustavo Iñiguez Goia
dc83aa62f0
Updated pkgs versions
Some checks failed
CI - build eBPF modules / build (6.0, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (6.0, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
v1.7.0.0
2025-05-30 11:02:36 +02:00
Gustavo Iñiguez Goia
54a8efb32f
i18n: renamed ukranian translation file 2025-05-29 00:34:56 +02:00
Gustavo Iñiguez Goia
7a3ad173e1
i18n: added ukranian translation 2025-05-29 00:24:50 +02:00
Gustavo Iñiguez Goia
9b0cf5a85f
pkgs: fixed locales
We were distributing locales twice, under opensnitch/i18n/ and
opensnitch/i18n/locales/.

This also caused to display an empty language in the Preferences
languages combo box.
2025-05-28 23:54:09 +02:00
Gustavo Iñiguez Goia
2fbbf12e0a
ui: translations updated 2025-05-28 22:35:00 +02:00
Gustavo Iñiguez Goia
9009eef635
ui: added HighContrast theme icons
The HighContrast theme is part of the gnome-themes-standard [0] package
, which is not always available.

Instead of just setting the theme by code, now we distribute the icons.
This ensures that the icons are always clearly visible when using a
qt-material dark theme.

For qt-material light themes and system themes, we'll use the system
icons.

[0] https://download.gnome.org/sources/gnome-themes-standard/
2025-05-23 22:30:19 +02:00
Gustavo Iñiguez Goia
ef926050c2
fixed listening for link changes (#1343)
netlink.AddrSubscribeWithOptions() was causing systemd-resolved not to
obtain DNS servers, and therefore the system was unable to resolve
domain names.

This ssue started happening on Fedora 42, with systemd-resolved 257 and
kernels 6.14.x.

Using netlink.AddrSubscribe() solves this issue for now.

Closes #1343
2025-05-23 12:53:29 +02:00
Gustavo Iñiguez Goia
e0c659992a
fixed leak reconfiguring rules monitor task 2025-05-23 11:40:43 +02:00
Gustavo Iñiguez Goia
b20fd15335
changed ebpf log levels
Changed Error to Warning log level when failing to load hooks.

Except for udp_tunnel6_xmit_skb, which depends on the module
ip6_udp_tunnel to be loaded, which by default is not the case.
In order not to flood the logs with this error, log level changed to
Debug.
2025-05-21 21:49:15 +02:00
Gustavo Iñiguez Goia
3f5b6b45a7
ui: added default terminal icon for popups
By default we try to discover the icon of an app, but if we don't find
any, we'll use a default terminal icon (from HighContrast theme).
2025-05-21 19:10:43 +02:00
Gustavo Iñiguez Goia
913a88ccd6
ui: use HighContrast icons for dark qt-material themes
By default we use the system icons theme in the GUI.
The Desktop Environment usually is responsible of switching between
dark and light styles.

However if the user selected a qt-material dark theme from the
Preferences, the icons were not updated, and sometimes they were
practically invisible.

Now if the user selects a qt-material dark theme, we set the
HighContrast icon theme, which ensures that all icons are visible
against dark backgrounds.
2025-05-19 01:22:51 +02:00
Gustavo Iñiguez Goia
4ec3ac72f6
Merge pull request #1344 from ddogfoodd/unused-imports
ui: remove unused imports
2025-05-19 00:58:34 +02:00
Jost Alemann
f09ae22c61 ui: remove unused imports 2025-05-18 20:40:39 +02:00
Gustavo Iñiguez Goia
ce26feea4b Bump packages versions to v1.7.0 2025-05-17 11:58:24 +02:00
Gustavo Iñiguez Goia
582823d34a
ui: added English language to the preferences
Allow to select English language from the Preferences.

This is a static entry like "System default".

It will not load a QTranslator object, so the GUI will use the strings
defined in the code, which are in English.

Closes: #1342
2025-05-14 23:24:38 +02:00
Gustavo Iñiguez Goia
56b2d28b66
ebpf: added support for ipv6 tunnels
In order to intercept UDP tunnels traffic, we use iptunnel_xmit for IPv4
connections. The equivalent of IPv6 would be ip6tunnel_xmit, but
unfortunately it's not public.

So instead of ip6tunnel_xmit, we'll use udp_tunnel6_xmit_skb.

This function receives two parameters besides the struct sock*, in6_addr
*saddr and in6_addr *daddr. If these addresses are not set, usually the
connection is a localhost connection.

On the other hand, this function is defined in the module
ip6_udp_tunnel. If this module is not loaded when the daemon starts,
we'll fail to intercept the connections.

Closes: #1250
2025-05-05 00:34:25 +02:00
Gustavo Iñiguez Goia
02da9b7a09
Merge pull request #1339 from Dandan336/master
Add loongarch64 support
2025-05-01 00:21:06 +02:00
Dandan Zhang
45c591bbc4 Add loongarch64 support 2025-04-30 02:39:27 +00:00
Gustavo Iñiguez Goia
568d69520f
fixed reporting connection UID
When getting a connection from the cache, use the UID of the connection,
instead of the process UID.

more info: https://github.com/evilsocket/opensnitch/issues/1315#issuecomment-2829072245

Closes: #1315
2025-04-27 23:54:52 +02:00
Gustavo Iñiguez Goia
94913683e0
Merge pull request #1336 from petterreinholdtsen/ebpf-riscv64
Added ebpf build rule mapping for riscv64 to riscv.
2025-04-27 23:28:23 +02:00
Petter Reinholdtsen
94f950120f Added ebpf build rule mapping for riscv64 to riscv.
This ensure the kernel headers are found during compilation.
2025-04-27 06:35:22 +02:00
Gustavo Iñiguez Goia
0576c71d77
Merge pull request #1335 from petterreinholdtsen/ebpf-loongarch64
Added ebpf build rule mapping for loongarch64 to loongarch.
2025-04-27 01:09:51 +02:00
Petter Reinholdtsen
f680bbedd6 Added ebpf build rule mapping for loongarch64 to loongarch.
This ensure the kernel headers are found during compilation.
2025-04-26 22:35:21 +02:00
Gustavo Iñiguez Goia
8248c2e0ed ui: better app icon discovery
On some DEs like Xfce4 (Ubuntu 24) we were not displaying icons on the
popups.
2025-04-25 17:30:14 +02:00
Gustavo Iñiguez Goia
f077ac8f19
Merge pull request #1333 from petterreinholdtsen/ebpf-s390x
Added ebpf build rule mapping for s390x to s390.
2025-04-25 17:24:38 +02:00
Petter Reinholdtsen
25ea03a8e6 Added ebpf build rule mapping for s390x to s390.
This ensure the kernel headers are found during compilation.
2025-04-25 08:03:07 +02:00
Gustavo Iñiguez Goia
aeb2018d27
log the UID of exec events 2025-04-24 23:55:42 +02:00
Gustavo Iñiguez Goia
12c21c7a26
removed debug line 2025-04-24 23:53:50 +02:00
Gustavo Iñiguez Goia
82b09c3ac6
removed not needed log line 2025-04-24 18:00:31 +02:00
Gustavo Iñiguez Goia
7ca5c0905f
added network_aliases init file 2025-04-24 16:49:23 +02:00
Gustavo Iñiguez Goia
c8bec89d70
reorganized network aliases feature
- Moved to their own files/dirs.
 - Added Nolan Carouge as author and contributor.
2025-04-24 16:06:11 +02:00
Gustavo Iñiguez Goia
6649a4dffa
delete all generated protobuffers with make clean
Closes: #1322
2025-04-23 23:42:04 +02:00
Gustavo Iñiguez Goia
624d628641
Merge pull request #1331 from lainedfles/ipasn_db_sync
feat: Add bash script to sync OpenSnitch ASN data
2025-04-23 21:13:58 +02:00
Gustavo Iñiguez Goia
fb313adab4
Merge pull request #1332 from lainedfles/update-localhost-exclusion-example-rules
refactor: Update localhost rules and add IPv6
2025-04-23 20:58:45 +02:00
Self Denial
056e2ec2ee
refactor: Update localhost rules and add IPv6
- Changed the local host rule from using regexp to network operator
- Updated destination IP check from specific addresses to CIDR notation (127.0.0.0/8)
- Added new rule for IPv6 localhost connections (::1/128)
- Added nolog property to prevent logging of localhost traffic
2025-04-23 12:48:28 -06:00
Self Denial
4dd8c45eea
feat: Add bash script to sync OpenSnitch ASN data
This commit adds a new bash script that automates the synchronization of IP-to-ASN and AS names databases for OpenSnitch. The script:

1. Downloads pre-processed ASN data from a GitHub repository
2. Creates backups of existing files before updates
3. Updates ipasn_db.dat.gz and asnames.json files
4. Restores backups if downloads fail
5. Can be run via cron to keep the databases updated

The script is designed to be easily integrated into system automation tasks and includes error handling for common issues like missing dependencies (wget) or failed downloads.
2025-04-23 12:26:43 -06:00
Gustavo Iñiguez Goia
3ef922ef84
ui,fw: improved fw rule dialog buttons layout
Closes: #1330
2025-04-23 14:11:31 +02:00
Gustavo Iñiguez Goia
c8d96d030e
Merge pull request #1324 from petterreinholdtsen/duration-12-hours
Introduce new 12 hour duration option.
2025-04-23 13:13:50 +02:00
Gustavo Iñiguez Goia
0c2552b7f4
Merge pull request #1327 from petterreinholdtsen/installed-kernel-headers
Changed how ebpf build find kernel headers from running to installed version.
2025-04-23 11:31:25 +02:00
Gustavo Iñiguez Goia
030b849a8c
Merge pull request #1326 from petterreinholdtsen/ebpf-armv8l
Added ebpf build rule mapping for armv8l to work with more armhf machines.
2025-04-23 11:31:07 +02:00
Gustavo Iñiguez Goia
56b456a9b6
Merge pull request #1320 from lainedfles/gui_fix_reorder_system_rules
ui,stats: handle dict-wrapped notifs in callback
2025-04-22 23:42:12 +02:00
Petter Reinholdtsen
42119c5609 Changed how ebpf build find kernel headers from running to installed version.
This get the build working when building in a chroot or when the running
kernel is different from the kernel headers installed.
2025-04-20 09:48:17 +02:00
Petter Reinholdtsen
fd66bb6cc8 Added ebpf build rule mapping for armv8l to work with more armhf machines. 2025-04-20 09:44:55 +02:00
Petter Reinholdtsen
dc3d7c7eee Introduce new 12 hour duration option.
Fixes #1286
2025-04-19 00:25:24 +02:00
Gustavo Iñiguez Goia
2a8f13d439
process path parsing improvements
- Preprend the chroot of a process to the path:
   Even if a process is executed from a chroot (or a different mount
   namespace), the kernel reports the path as it were from the host.
   For chrooted processes, now we prepend the chroot to the path:
   Instead of /usr/bin/curl -> /var/cache/pbuilder/usr/bin/curl

   Note: if the process is emulated (with qemu for example), the
   checksum will be of the emulator.

 - For proceses launched from /proc, like /proc/self/exe or
   /proc/<pid>/fd/<number>, we were replacing in the cmdline "/proc/*"
   with the absolute path of the binary:

   Path: /usr/bin/curl
   Cmdline reported: /proc/<pid>/fd/<number> -L 1.1.1.1
   Cmdline "fixed": /usr/bin/curl -L 1.1.1.1

   Now we only do that for /proc/self/exe, and leave
   /proc/<pid>/fd/<number> as is, since Path is already the absolute
   path to the binary.

   Path: /usr/bin/spotify
   Cmdline reported: /proc/self/exe
   Cmdline "fixed": /usr/bin/spotify

   Path: /usr/bin/curl
   Cmdline reported: /proc/<pid>/fd/<number> -L 1.1.1.1
   Cmdline final: /proc/<pid>/fd/<number> -L 1.1.1.1
2025-04-18 13:30:51 +02:00
Gustavo Iñiguez Goia
fb16dada09 pkgs: add network-aliases.json
Needed to define net aliases in the rules.
2025-04-18 01:47:27 +02:00