Commit graph

1436 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
f7eec83367
sys fw: allow to add icmp types by commas
- Previously we only supported multiple ICMP types on the same rule
by adding multiple keys:
 Key: type
 Value: echo-request
 Key: type
 Value: echo-reply

Now it's possible to specify them using ',':
 Key: type
 Value: echo-request,echo-reply

- Validate ICMP types before adding them.
2023-06-20 01:14:57 +02:00
Gustavo Iñiguez Goia
01069d363b
ui,fw: added help button to open the fw rules wiki 2023-06-17 12:01:26 +02:00
Gustavo Iñiguez Goia
06f333c281
ui,prefs: increased default timeout widget size 2023-06-17 11:41:21 +02:00
Gustavo Iñiguez Goia
370a978b24
changed systray warning help url 2023-06-16 11:48:47 +02:00
Gustavo Iñiguez Goia
0e6f9995e8
Bump rpm versions to 1.6.0.1 2023-06-16 11:42:22 +02:00
Gustavo Iñiguez Goia
5f5cf11c67
updated systray warning help url 2023-06-16 01:59:09 +02:00
Gustavo Iñiguez Goia
01dc1d2e9b
Bumped debian packages versions to 1.6.0.1
1.6.0-rc.5-1 is newer than 1.6.0-1 unfortunately.
2023-06-15 23:52:56 +02:00
Gustavo Iñiguez Goia
c42232d92e
ui,events: fixed behaviour jumping to the rules view
* There was a situation where the details of an app rule was not being
displayed correctly:
 - on the tab rules select any system fw rule.
 - go to the Events tab
 - double click on the Rule column to view the details.
 - instead of the app rules details, the list of system fw rules was
   displayed.

* On the other hand, when going back from the details view, the list of
  rules was not being refreshed correctly.

  In this situation now we select the Application rules view.
2023-06-15 19:18:58 +02:00
Gustavo Iñiguez Goia
a897dd9dc3
ui: updated url with fw config upgrade instructions
Some users coming from v1.5.x version may end up with an incompatible fw
configuration, so point them to a url with instructions to solve it.
2023-06-15 17:05:54 +02:00
Gustavo Iñiguez Goia
7905bf4477
ui: make some label texts selectable by mouse 2023-06-15 16:15:34 +02:00
Gustavo Iñiguez Goia
64a5222950
ui:don't allow duplicated values when adding fw rules
When adding fw rules, don't allow duplicated values. For example:

 "Name": "meta",
 "Values": [
   {
     "Key": "mark",
     "Value": "2"
   },
   {
     "Key": "mark",
     "Value": "2"
   }
2023-06-15 13:01:53 +02:00
Gustavo Iñiguez Goia
6402031f54
ui,fw: beautify rules parameters,organized imports 2023-06-15 01:46:47 +02:00
Gustavo Iñiguez Goia
cf3205b209
ui, prefs: set pop-ups tab as the default tab 2023-06-15 01:26:13 +02:00
Gustavo Iñiguez Goia
682e6d667b
ui, prefs: reorganized Nodes options 2023-06-15 01:24:21 +02:00
Gustavo Iñiguez Goia
aa71b7d9f6
ui, prefs: fixed exception loading outdated config
Be sure that users with outdated default-config.json files can load and
save the configuration (those without LogUTC).
2023-06-15 01:07:20 +02:00
Gustavo Iñiguez Goia
000a2f1848
avoid notifications errors when saving config
- fsnotify notifies 2 WRITE events sometimes (known bug), which leads to
read 0 bytes one of the times.

As now we send these errors to the GUI, on some systems we were
displaying an error reading the config, which was not really the case.

- Only parse the config before writing it to disk, instead of call the
  load() method.
2023-06-15 00:50:07 +02:00
Gustavo Iñiguez Goia
77c3cf4512
fw rules: beautify rules escription
make it more nftables style:
 ip daddr 127.0.0.1 tcp dport 53 accept
instead of:
 ip daddr == 127.0.0.1 tcp dport == 53 accept

It'll be easier to translate our rules to nftables rules in this way.
2023-06-14 17:31:12 +02:00
Gustavo Iñiguez Goia
9bad34bb16
changed default config permissions on saving
- Changed default permissions of default-config.json, system-fw.json
 - Changed bool values by constants.
2023-06-14 12:10:19 +02:00
Gustavo Iñiguez Goia
cc2b4f5824
ui,fw: don't allow empty rules 2023-06-14 01:27:40 +02:00
Gustavo Iñiguez Goia
d4bdfed1d1
ui,fw: fixed loading ct, quota, limit and meta statements 2023-06-14 01:16:06 +02:00
Gustavo Iñiguez Goia
e60b443c60
ui,fw: fixed setting dport/sport statement title 2023-06-13 15:10:28 +02:00
Gustavo Iñiguez Goia
1c90a51dbb
ui,fw: fixed adding dpotr/sport rule
When changing between dport and sport, the rule was not being added.
2023-06-13 14:02:19 +02:00
Gustavo Iñiguez Goia
5b7d2a2cbc
ui,fw: new rules creation fixes
- Fixed setting the protocol of a dport/sport statement.
- Fixed translating ports to service name, and back (/etc/service).
- Enable Save button when modifying the description of a rule.
2023-06-13 12:29:33 +02:00
Gustavo Iñiguez Goia
1dd74b9573
sponsors list updated 2023-06-12 20:01:55 +02:00
Gustavo Iñiguez Goia
62dcfb0f53
addded donations section 2023-06-12 16:19:10 +02:00
Gustavo Iñiguez Goia
53c7850c17
adding new sponsor link
See #967
2023-06-12 14:14:39 +02:00
Gustavo Iñiguez Goia
173e61b65a
ui: fixed displaying flatpak icons
Closes: #956
2023-06-12 00:14:40 +02:00
Gustavo Iñiguez Goia
e1afd24dbf
log: fixed logging service
A default value was preventing from writing logs to the configured file.

+ Changed a couple of locks by rlocks.
2023-06-09 17:43:32 +02:00
Gustavo Iñiguez Goia
2ad38fbf05
ui: set default rules editor button to Save
Closes #963
2023-06-09 13:16:55 +02:00
Gustavo Iñiguez Goia
a7e64b0374
new script to restart the daemon after suspend
There's a bug when coming back from suspend state, that causes eBPF proc
monitor method stop working.

The only solution to this problem for now, is restart the daemon every
time the computer wakes up.

See: https://github.com/evilsocket/opensnitch/discussions/834#discussioncomment-5712431).
2023-06-08 17:25:29 +02:00
Gustavo Iñiguez Goia
06816816a1
Merge pull request #959 from lainedfles/daemon_log_flags
Introduce 2 new daemon logging options: LogUTC & LogMicro.
2023-06-06 11:33:27 +02:00
selfdenial
52c23ffd5d Introduce 2 new daemon logging options: LogUTC & LogMicro. 2023-06-05 20:46:42 -06:00
Gustavo Iñiguez Goia
d0ca706de8
Merge pull request #958 from lainedfles/max_message_length
Add non-gui setting for gRPC server max_message_length.
2023-06-05 23:13:43 +02:00
selfdenial
9a89ad98b9 Use if statements instead of match/case to set max_message_length. 2023-06-05 10:21:08 -06:00
selfdenial
f6623fad95 Add non-gui setting for gRPC server max_message_length. 2023-06-03 23:29:40 -06:00
Gustavo Iñiguez Goia
102b65e6c3
added new generic remote logger and new formats
- Added new generic remote logger to send events to remote servers.
- Added new formats RFC3164 and JSON.

Configuration example to send events to logstash using the tcp input
plugin, in json format:
 "Loggers": [
    {
        "Name": "remote",
        "Server": "127.0.0.1:3333",
        "Protocol": "tcp",
        "Workers": 5,
        "Format": "json",
        "Tag": "opensnitch"
    },
 ]

logstash configuration, saving events under document.*:
 input {
    tcp {
        port => 3333
        codec => json_lines {
            target => "[document]"
        }
    }
 }

You can also use the syslog input plugin:
 "Loggers": [
    {
        "Name": "remote",
        "Server": "127.0.0.1:5140",
        "Protocol": "tcp",
        "Workers": 5,
        "Format": "rfc3164",
        "Tag": "opensnitch"
    },
 ]

logstash's syslog input plugin configuration:
 input {
    syslog {
        port => 5140
    }
}

Note: you'll need a grok filter to parse and extract the fields.

See: #947
2023-05-29 13:49:38 +02:00
Gustavo Iñiguez Goia
89dc6abbcd
loggers: remote syslog, rfc5424 format improvements
- Allow to configure remote logger's write timeout and workers.
- Improved syslog RFC5424 formatting.
2023-05-28 23:19:56 +02:00
Gustavo Iñiguez Goia
463378c214
misc: changed the level of some messages
Also added [DNS] to some messages.

Related: #954
2023-05-28 16:23:39 +02:00
munix9
11baad083d
ebpf modules compilation fixes
- don't import hardcoded architecture.
- use generic cpu (-mcpu=generic)
- removed linux/version.h from modules.

related #954
2023-05-28 15:24:33 +02:00
Gustavo Iñiguez Goia
9c483b1a59
sys,fw: allow to create multiprotocol rules
Now you can add rules to allow multiple protocols.
For example you can add a rule to allow dport/sport for both TCP
and UDP.

There're two options to allow a port:

Statement {
 Name: tcp
 Values:
   Key: dport
   Value: 1234
}

Statement {
 Name: meta
 Values:
   Key: l4proto
   Value: tcp,udp

   Key: dport
   Value: 1234
}

Closes #951.
2023-05-27 22:02:14 +02:00
Gustavo Iñiguez Goia
3432c6a694
ui,fw: fixed allowing inbound services
The helper dialog to allow inbound connections to a port was adding a
rule to source port, instead of destination port.

The source port is needed to allow the traffic of a *local service"
when the inbound policy is set to Deny.
2023-05-25 17:39:17 +02:00
Gustavo Iñiguez Goia
810b785b3a
sys,fw: put dns rule always at the top of the chain
The DNS rule to intercept DNS responses must always be at the top of
the (input-filter) rules, otherwise we won't receive DNS resolutions.

Adding, removing or changing system fw rules was removing the rule from 1st
position.

Another approach to this problem could be to remove&&add only the dns rule,
instead of disable-enable interception+rules monitor.
2023-05-25 01:20:53 +02:00
Gustavo Iñiguez Goia
9f71c15e57
sys,fw: fixed race condition creating system rules
Hard to reproduce, but not impossible
2023-05-24 14:26:58 +02:00
Gustavo Iñiguez Goia
631f27ee24
loggers: fixed race condition on remote loggers
- Fixed race condition when a remote logger can't open a connection with
  the server.
2023-05-24 01:19:07 +02:00
Gustavo Iñiguez Goia
500f5fe256
i18n: removed .qm from the repo 2023-05-23 18:01:00 +02:00
Toni Lähdekorpi
6afa7a3d0e
i18n: add Finnish translations (#948)
* i18n: initial support for Finnish

* i18n: add Finnish translations for rules

* i18n: add Finnish translations for rules

* i18n: translated using Weblate (Finnish)

Currently translated at 99.6% (516 of 518 strings)

Translation: Open Source/opensnitch

* i18n: finalize Finnish translations

* i18n: run Finnish translations through lrelease

---------

Co-authored-by: Toni Lähdekorpi <toni.lahdekorpi@neuvo.ai>
2023-05-23 17:58:18 +02:00
Gustavo Iñiguez Goia
9079323bed
sys,fw: better fw rules monitor
- Fixed race conditio monitoring interception rules.
2023-05-22 18:10:12 +02:00
Gustavo Iñiguez Goia
0402bb1555
i18n: updated translations definitions 2023-05-19 18:31:26 +02:00
Gustavo Iñiguez Goia
3d99eae3ae
i18n: updated translations 2023-05-19 18:26:07 +02:00
Gustavo Iñiguez Goia
d18a2946e5
Merge pull request #945 from ovari/master
Update README.md
2023-05-19 13:06:26 +02:00