Skip to content

Commit 03ba2be

Browse files
authored
feat: adjustments to netifyd bypasses documentation (#279)
* feat(uci): added documentation on how to handle lists * feat(netifyd): added netifyd new bypass methods
1 parent be856bc commit 03ba2be

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

dpi_filter.rst

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,35 +60,20 @@ You can include a description explaining the reason for the exclusion.
6060

6161
Each exception can be enabled or disabled as desired.
6262

63-
Netify interface exclusion
64-
--------------------------
63+
Netify traffic bypass
64+
---------------------
6565

66-
By default, Netifyd monitors all interfaces. To exclude specific interfaces, you can define an exclusion list. Below are commands to add, modify, or remove excluded interfaces.
67-
The exclusion list is configured using the ``ns_exclude`` option that takes a list of patterns. Each entry is a shel glob pattern.
66+
By default, Netifyd processes all traffic passing from, to and out of the firewall. In some cases it may be desiderable to completely ignore traffic analysis on some specific hosts or subnets. The exclusions is configured using the `bypassv4` and `bypassv6` options that take a list of IP addresses or CIDR subnets. Bypasses can have a description to explain the reason for the bypass, separated by a `|` pipe character after the IP.
6867

69-
- Add interfaces to exclusion list. The system will exclude the `eth1` interface and all OpenVPN and WireGuard interfaces: ::
68+
To add a new bypass entry, use the following command: ::
7069

71-
uci add_list netifyd.@netifyd[0].ns_exclude='eth1'
72-
uci add_list netifyd.@netifyd[0].ns_exclude='tun*'
73-
uci add_list netifyd.@netifyd[0].ns_exclude='wg*'
70+
uci add_list netifyd.config.bypassv4='10.45.23.0/24|Remote network'
71+
uci add_list netifyd.config.bypassv4='192.168.5.164|Critical host'
7472
uci commit netifyd
75-
echo '{"changes": {"network": {}}}' | /usr/libexec/rpcd/ns.commit call commit
73+
reload_config
7674

77-
In this case the system will exclude interface ``eth1``, all WireGuard ``wgX`` interfaces and all OpenVPN routed interfaces.
78-
79-
- Modify exclusion list: ::
75+
To edit and manage uci entries, refer to the :ref:`UCI list management <uci-lists>` section.
8076

81-
uci delete netifyd.@netifyd[0].ns_exclude='eth1'
82-
uci add_list netifyd.@netifyd[0].ns_exclude='eth2'
83-
uci commit netifyd
84-
echo '{"changes": {"network": {}}}' | /usr/libexec/rpcd/ns.commit call commit
85-
86-
- Clear exclusion list: ::
87-
88-
uci delete netifyd.@netifyd[0].ns_exclude
89-
uci commit netifyd
90-
echo '{"changes": {"network": {}}}' | /usr/libexec/rpcd/ns.commit call commit
91-
92-
- Return the exclusion list: ::
77+
You can visualize the applied bypass entries and netifyd capture configuration using the following command: ::
9378

94-
uci show netifyd.@netifyd[0].ns_exclude
79+
nft list table inet netifyd

uci.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,33 @@ Delete operations
174174
# Delete an entire section
175175
uci delete <service>.<section>
176176
177+
.. _uci-lists:
178+
179+
LISTS - Editing List Options
180+
============================
181+
182+
Lists are a special type of option that can contain multiple values.
183+
184+
Add a value to a list
185+
---------------------
186+
187+
Use the ``uci add_list`` command to add values to a list, the command creates the list if it does not already exist.
188+
189+
.. code-block:: bash
190+
191+
uci add_list <service>.<section>.<list_option>='<value>'
192+
193+
Remove a value from a list
194+
--------------------------
195+
196+
To remove the last value from a list, use the ``uci del_list``, you must specify the value to be removed.
197+
198+
.. code-block:: bash
199+
200+
uci del_list <service>.<section>.<list_option>='<value>'
201+
202+
To remove all values from a list, use the ``uci delete`` command as explained in the previous section.
203+
177204
COMMIT - Saving Changes
178205
=======================
179206

0 commit comments

Comments
 (0)