Merge pull request #21273 from jefferyto/python-hatchling-1.17.1
[feed/packages.git] / net / banip / files / README.md
1 <!-- markdownlint-disable -->
2
3 # banIP - ban incoming and outgoing IP addresses/subnets via Sets in nftables
4
5 ## Description
6 IP address blocking is commonly used to protect against brute force attacks, prevent disruptive or unauthorized address(es) from access or it can be used to restrict access to or from a particular geographic area — for example. Further more banIP scans the log file via logread and bans IPs that make too many password failures, e.g. via ssh.
7
8 ## Main Features
9 * banIP supports the following fully pre-configured domain blocklist feeds (free for private usage, for commercial use please check their individual licenses).
10 **Please note:** By default every feed blocks all supported chains. The columns "WAN-INP", "WAN-FWD" and "LAN-FWD" show for which chains the feeds are suitable in common scenarios, e.g. the first entry should be limited to the LAN forward chain - see the config options 'ban\_blockpolicy', 'ban\_blockinput', 'ban\_blockforwardwan' and 'ban\_blockforwardlan' below.
11
12 | Feed | Focus | WAN-INP | WAN-FWD | LAN-FWD | Information |
13 | :------------------ | :----------------------------- | :-----: | :-----: | :-----: | :----------------------------------------------------------- |
14 | adaway | adaway IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
15 | adguard | adguard IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
16 | adguardtrackers | adguardtracker IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
17 | antipopads | antipopads IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
18 | asn | ASN IPs | | | x | [Link](https://asn.ipinfo.app) |
19 | backscatterer | backscatterer IPs | x | x | | [Link](https://www.uceprotect.net/en/index.php) |
20 | bogon | bogon prefixes | x | x | | [Link](https://team-cymru.com) |
21 | country | country blocks | x | x | | [Link](https://www.ipdeny.com/ipblocks) |
22 | cinsscore | suspicious attacker IPs | x | x | | [Link](https://cinsscore.com/#list) |
23 | darklist | blocks suspicious attacker IPs | x | x | | [Link](https://darklist.de) |
24 | debl | fail2ban IP blacklist | x | x | | [Link](https://www.blocklist.de) |
25 | doh | public DoH-Provider | | | x | [Link](https://github.com/dibdot/DoH-IP-blocklists) |
26 | drop | spamhaus drop compilation | x | x | | [Link](https://www.spamhaus.org) |
27 | dshield | dshield IP blocklist | x | x | | [Link](https://www.dshield.org) |
28 | edrop | spamhaus edrop compilation | x | x | | [Link](https://www.spamhaus.org) |
29 | feodo | feodo tracker | x | x | x | [Link](https://feodotracker.abuse.ch) |
30 | firehol1 | firehol level 1 compilation | x | x | | [Link](https://iplists.firehol.org/?ipset=firehol_level1) |
31 | firehol2 | firehol level 2 compilation | x | x | | [Link](https://iplists.firehol.org/?ipset=firehol_level2) |
32 | firehol3 | firehol level 3 compilation | x | x | | [Link](https://iplists.firehol.org/?ipset=firehol_level3) |
33 | firehol4 | firehol level 4 compilation | x | x | | [Link](https://iplists.firehol.org/?ipset=firehol_level4) |
34 | greensnow | suspicious server IPs | x | x | | [Link](https://greensnow.co) |
35 | iblockads | Advertising IPs | | | x | [Link](https://www.iblocklist.com) |
36 | iblockspy | Malicious spyware IPs | x | x | | [Link](https://www.iblocklist.com) |
37 | ipthreat | hacker and botnet TPs | x | x | | [Link](https://ipthreat.net) |
38 | myip | real-time IP blocklist | x | x | | [Link](https://myip.ms) |
39 | nixspam | iX spam protection | x | x | | [Link](http://www.nixspam.org) |
40 | oisdbig | OISD-big IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
41 | oisdnsfw | OISD-nsfw IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
42 | oisdsmall | OISD-small IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
43 | proxy | open proxies | x | | | [Link](https://iplists.firehol.org/?ipset=proxylists) |
44 | ssbl | SSL botnet IPs | x | x | | [Link](https://sslbl.abuse.ch) |
45 | stevenblack | stevenblack IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
46 | talos | talos IPs | x | x | | [Link](https://talosintelligence.com/reputation_center) |
47 | threat | emerging threats | x | x | | [Link](https://rules.emergingthreats.net) |
48 | threatview | malicious IPs | x | x | | [Link](https://threatview.io) |
49 | tor | tor exit nodes | x | x | | [Link](https://github.com/SecOps-Institute/Tor-IP-Addresses) |
50 | uceprotect1 | spam protection level 1 | x | x | | [Link](http://www.uceprotect.net/en/index.php) |
51 | uceprotect2 | spam protection level 2 | x | x | | [Link](http://www.uceprotect.net/en/index.php) |
52 | uceprotect3 | spam protection level 3 | x | x | | [Link](http://www.uceprotect.net/en/index.php) |
53 | urlhaus | urlhaus IDS IPs | x | x | | [Link](https://urlhaus.abuse.ch) |
54 | urlvir | malware related IPs | x | x | | [Link](https://iplists.firehol.org/?ipset=urlvir) |
55 | webclient | malware related IPs | x | x | | [Link](https://iplists.firehol.org/?ipset=firehol_webclient) |
56 | voip | VoIP fraud blocklist | x | x | | [Link](https://voipbl.org) |
57 | yoyo | yoyo IPs | | | x | [Link](https://github.com/dibdot/banIP-IP-blocklists) |
58
59 * Zero-conf like automatic installation & setup, usually no manual changes needed
60 * All Sets are handled in a separate nft table/namespace 'banIP'
61 * Full IPv4 and IPv6 support
62 * Supports nft atomic Set loading
63 * Supports blocking by ASN numbers and by iso country codes
64 * Supports local allow- and blocklist (IPv4, IPv6, CIDR notation or domain names)
65 * Auto-add the uplink subnet or uplink IP to the local allowlist
66 * Provides a small background log monitor to ban unsuccessful login attempts in real-time
67 * Auto-add unsuccessful LuCI, nginx, Asterisk or ssh login attempts to the local blocklist
68 * Auto-add entire subnets to the blocklist Sets based on an additional RDAP request with the monitored suspicious IP
69 * Fast feed processing as they are handled in parallel as background jobs
70 * Per feed it can be defined whether the wan-input chain, the wan-forward chain or the lan-forward chain should be blocked (default: all chains)
71 * Automatic blocklist backup & restore, the backups will be used in case of download errors or during startup
72 * Automatically selects one of the following download utilities with ssl support: aria2c, curl, uclient-fetch or full wget
73 * Supports an 'allowlist only' mode, this option restricts internet access from/to a small number of secure websites/IPs
74 * Deduplicate IPs accross all Sets (single IPs only, no intervals)
75 * Provides comprehensive runtime information
76 * Provides a detailed Set report
77 * Provides a Set search engine for certain IPs
78 * Feed parsing by fast & flexible regex rulesets
79 * Minimal status & error logging to syslog, enable debug logging to receive more output
80 * Procd based init system support (start/stop/restart/reload/status/report/search/survey/lookup)
81 * Procd network interface trigger support
82 * Add new or edit existing banIP feeds on your own with the LuCI integrated custom feed editor
83 * Supports external allowlist URLs to reference additional IPv4/IPv6 feeds
84
85 ## Prerequisites
86 * **[OpenWrt](https://openwrt.org)**, latest stable release or a snapshot with nft/firewall 4 and logd/logread support
87 * A download utility with SSL support: 'aria2c', 'curl', full 'wget' or 'uclient-fetch' with one of the 'libustream-*' SSL libraries
88 * A certificate store like 'ca-bundle', as banIP checks the validity of the SSL certificates of all download sites by default
89 * For E-Mail notifications you need to install and setup the additional 'msmtp' package
90
91 **Please note the following:**
92 * Devices with less than 256Mb of RAM are **_not_** supported
93 * Any previous installation of ancient banIP 0.7.x must be uninstalled, and the /etc/banip folder and the /etc/config/banip configuration file must be deleted (they are recreated when this version is installed)
94
95 ## Installation & Usage
96 * Update your local opkg repository (_opkg update_)
97 * Install banIP (_opkg install banip_) - the banIP service is disabled by default
98 * Install the LuCI companion package 'luci-app-banip' (opkg install luci-app-banip)
99 * It's strongly recommended to use the LuCI frontend to easily configure all aspects of banIP, the application is located in LuCI under the 'Services' menu
100 * If you're going to configure banIP via CLI, edit the config file '/etc/config/banip' and enable the service (set ban\_enabled to '1'), then add pre-configured feeds via 'ban\_feed' (see the feed list above) and add/change other options to your needs (see the options reference below)
101 * Start the service with '/etc/init.d/banip start' and check everything is working by running '/etc/init.d/banip status'
102
103 ## banIP CLI interface
104 * All important banIP functions are accessible via CLI.
105 ```
106 ~# /etc/init.d/banip
107 Syntax: /etc/init.d/banip [command]
108
109 Available commands:
110 start Start the service
111 stop Stop the service
112 restart Restart the service
113 reload Reload configuration files (or restart if service does not implement reload)
114 enable Enable service autostart
115 disable Disable service autostart
116 enabled Check if service is started on boot
117 report [text|json|mail] Print banIP related Set statistics
118 search [<IPv4 address>|<IPv6 address>] Check if an element exists in a banIP Set
119 survey [<Set name>] List all elements of a given banIP Set
120 lookup Lookup the IPs of domain names in the local lists and update them
121 running Check if service is running
122 status Service status
123 trace Start with syscall trace
124 info Dump procd service info
125 ```
126
127 ## banIP config options
128
129 | Option | Type | Default | Description |
130 | :---------------------- | :----- | :---------------------------- | :----------------------------------------------------------------------------------------------------------- |
131 | ban_enabled | option | 0 | enable the banIP service |
132 | ban_nicelimit | option | 0 | ulimit nice level of the banIP service (range 0-19) |
133 | ban_filelimit | option | 1024 | ulimit max open/number of files (range 1024-4096) |
134 | ban_loglimit | option | 100 | scan only the last n log entries permanently. A value of '0' disables the monitor |
135 | ban_logcount | option | 1 | how many times the IP must appear in the log to be considered as suspicious |
136 | ban_logterm | list | regex | various regex for logfile parsing (default: dropbear, sshd, luci, nginx, asterisk) |
137 | ban_autodetect | option | 1 | auto-detect wan interfaces, devices and subnets |
138 | ban_debug | option | 0 | enable banIP related debug logging |
139 | ban_loginput | option | 1 | log drops in the wan-input chain |
140 | ban_logforwardwan | option | 1 | log drops in the wan-forward chain |
141 | ban_logforwardlan | option | 0 | log rejects in the lan-forward chain |
142 | ban_autoallowlist | option | 1 | add wan IPs/subnets and resolved domains automatically to the local allowlist (not only to the Sets) |
143 | ban_autoblocklist | option | 1 | add suspicious attacker IPs and resolved domains automatically to the local blocklist (not only to the Sets) |
144 | ban_autoblocksubnet | option | 0 | add entire subnets to the blocklist Sets based on an additional RDAP request with the suspicious IP |
145 | ban_autoallowuplink | option | subnet | limit the uplink autoallow function to: 'subnet', 'ip' or 'disable' it at all |
146 | ban_allowlistonly | option | 0 | restrict the internet access from/to a small number of secure websites/IPs |
147 | ban_basedir | option | /tmp | base working directory while banIP processing |
148 | ban_reportdir | option | /tmp/banIP-report | directory where banIP stores the report files |
149 | ban_backupdir | option | /tmp/banIP-backup | directory where banIP stores the compressed backup files |
150 | ban_protov4 | option | - / autodetect | enable IPv4 support |
151 | ban_protov6 | option | - / autodetect | enable IPv4 support |
152 | ban_ifv4 | list | - / autodetect | logical wan IPv4 interfaces, e.g. 'wan' |
153 | ban_ifv6 | list | - / autodetect | logical wan IPv6 interfaces, e.g. 'wan6' |
154 | ban_dev | list | - / autodetect | wan device(s), e.g. 'eth2' |
155 | ban_trigger | list | - | logical startup trigger interface(s), e.g. 'wan' |
156 | ban_triggerdelay | option | 10 | trigger timeout before banIP processing begins |
157 | ban_triggeraction | option | start | trigger action on ifup events, e.g. start, restart or reload |
158 | ban_deduplicate | option | 1 | deduplicate IP addresses across all active Sets |
159 | ban_splitsize | option | 0 | split ext. Sets after every n lines/members (saves RAM) |
160 | ban_cores | option | - / autodetect | limit the cpu cores used by banIP (saves RAM) |
161 | ban_nftloglevel | option | warn | nft loglevel, values: emerg, alert, crit, err, warn, notice, info, debug |
162 | ban_nftpriority | option | -200 | nft priority for the banIP table (default is the prerouting table priority) |
163 | ban_nftpolicy | option | memory | nft policy for banIP-related Sets, values: memory, performance |
164 | ban_nftexpiry | option | - | expiry time for auto added blocklist members, e.g. '5m', '2h' or '1d' |
165 | ban_feed | list | - | external download feeds, e.g. 'yoyo', 'doh', 'country' or 'talos' (see feed table) |
166 | ban_asn | list | - | ASNs for the 'asn' feed, e.g.'32934' |
167 | ban_country | list | - | country iso codes for the 'country' feed, e.g. 'ru' |
168 | ban_blockpolicy | option | - | limit the default block policy to a certain chain, e.g. 'input', 'forwardwan' or 'forwardlan' |
169 | ban_blockinput | list | - | limit a feed to the wan-input chain, e.g. 'country' |
170 | ban_blockforwardwan | list | - | limit a feed to the wan-forward chain, e.g. 'debl' |
171 | ban_blockforwardlan | list | - | limit a feed to the lan-forward chain, e.g. 'doh' |
172 | ban_fetchcmd | option | - / autodetect | 'uclient-fetch', 'wget', 'curl' or 'aria2c' |
173 | ban_fetchparm | option | - / autodetect | set the config options for the selected download utility |
174 | ban_fetchretry | option | 5 | number of download attempts in case of an error (not supported by uclient-fetch) |
175 | ban_fetchinsecure | option | 0 | don't check SSL server certificates during download |
176 | ban_mailreceiver | option | - | receiver address for banIP related notification E-Mails |
177 | ban_mailsender | option | no-reply@banIP | sender address for banIP related notification E-Mails |
178 | ban_mailtopic | option | banIP notification | topic for banIP related notification E-Mails |
179 | ban_mailprofile | option | ban_notify | mail profile used in 'msmtp' for banIP related notification E-Mails |
180 | ban_mailnotification | option | 0 | receive E-Mail notifications with every banIP run |
181 | ban_reportelements | option | 1 | count Set elements in the report, disable this option to speed up the report significantly |
182 | ban_resolver | option | - | external resolver used for DNS lookups |
183
184 ## Examples
185 **banIP report information**
186 ```
187 ~# /etc/init.d/banip report
188 :::
189 ::: banIP Set Statistics
190 :::
191 Timestamp: 2023-02-25 08:35:37
192 ------------------------------
193 auto-added to allowlist: 0
194 auto-added to blocklist: 4
195
196 Set | Elements | WAN-Input (packets) | WAN-Forward (packets) | LAN-Forward (packets)
197 ---------------------+--------------+-----------------------+-----------------------+------------------------
198 allowlistvMAC | 0 | - | - | OK: 0
199 allowlistv4 | 15 | OK: 0 | OK: 0 | OK: 0
200 allowlistv6 | 1 | OK: 0 | OK: 0 | OK: 0
201 torv4 | 800 | OK: 0 | OK: 0 | OK: 0
202 torv6 | 432 | OK: 0 | OK: 0 | OK: 0
203 countryv6 | 34282 | OK: 0 | OK: 1 | -
204 countryv4 | 35508 | OK: 1872 | OK: 0 | -
205 dohv6 | 343 | - | - | OK: 0
206 dohv4 | 540 | - | - | OK: 3
207 firehol1v4 | 1670 | OK: 296 | OK: 0 | OK: 16
208 deblv4 | 12402 | OK: 4 | OK: 0 | OK: 0
209 deblv6 | 41 | OK: 0 | OK: 0 | OK: 0
210 adguardv6 | 12742 | - | - | OK: 161
211 adguardv4 | 23183 | - | - | OK: 212
212 adguardtrackersv6 | 169 | - | - | OK: 0
213 adguardtrackersv4 | 633 | - | - | OK: 0
214 adawayv6 | 2737 | - | - | OK: 15
215 adawayv4 | 6542 | - | - | OK: 137
216 oisdsmallv6 | 10569 | - | - | OK: 0
217 oisdsmallv4 | 18800 | - | - | OK: 74
218 stevenblackv6 | 11901 | - | - | OK: 4
219 stevenblackv4 | 16776 | - | - | OK: 139
220 yoyov6 | 215 | - | - | OK: 0
221 yoyov4 | 309 | - | - | OK: 0
222 antipopadsv4 | 1872 | - | - | OK: 0
223 urlhausv4 | 7431 | OK: 0 | OK: 0 | OK: 0
224 antipopadsv6 | 2081 | - | - | OK: 2
225 blocklistvMAC | 0 | - | - | OK: 0
226 blocklistv4 | 1174 | OK: 1 | OK: 0 | OK: 0
227 blocklistv6 | 40 | OK: 0 | OK: 0 | OK: 0
228 ---------------------+--------------+-----------------------+-----------------------+------------------------
229 30 | 203208 | 12 (2173) | 12 (1) | 28 (763)
230 ```
231
232 **banIP runtime information**
233 ```
234 ~# /etc/init.d/banip status
235 ::: banIP runtime information
236 + status : active (nft: ✔, monitor: ✔)
237 + version : 0.8.6-2
238 + element_count : 172309
239 + active_feeds : allowlistvMAC, allowlistv6, allowlistv4, adawayv4, adguardtrackersv4, adawayv6, adguardv6, adguardv4, urlvirv4, adguardtrackersv6, oisdbigv6, oisdbigv4, blocklistvMAC, blocklistv4, blocklistv6
240 + active_devices : br-wan ::: wan, wan6
241 + active_uplink : 91.64.173.145, 2a12:610c:0:80:848b:3ad0:4e05:abb
242 + nft_info : priority: -200, policy: performance, loglevel: warn, expiry: -
243 + run_info : base: /mnt/data/banIP, backup: /mnt/data/banIP/backup, report: /mnt/data/banIP/report, custom feed: ✘
244 + run_flags : auto: ✔, proto (4/6): ✔/✔, log (wan-inp/wan-fwd/lan-fwd): ✔/✔/✔, dedup: ✔, split: ✘, allowed only: ✘
245 + last_run : action: restart, duration: 0m 22s, date: 2023-05-15 22:39:15
246 + system_info : cores: 4, memory: 1798, device: Bananapi BPI-R3, OpenWrt SNAPSHOT r22784-1645c34d56
247 ```
248
249 **banIP search information**
250 ```
251 ~# /etc/init.d/banip search 221.228.105.173
252 :::
253 ::: banIP Search
254 :::
255 Looking for IP '221.228.105.173' on 2023-02-08 22:12:48
256 ---
257 IP found in Set 'oisdbasicv4'
258 ```
259
260 **banIP survey information**
261 ```
262 ~# /etc/init.d/banip survey cinsscorev4
263 :::
264 ::: banIP Survey
265 :::
266 List of elements in the Set 'cinsscorev4' on 2023-03-06 14:07:58
267 ---
268 1.10.187.179
269 1.10.203.30
270 1.10.255.58
271 1.11.67.53
272 1.11.114.211
273 1.11.208.29
274 1.12.75.87
275 1.12.231.227
276 1.12.247.134
277 1.12.251.141
278 1.14.96.156
279 1.14.250.37
280 1.15.40.79
281 1.15.71.140
282 1.15.77.237
283 [...]
284 ```
285 **default regex for logfile parsing**
286 ```
287 list ban_logterm 'Exit before auth from'
288 list ban_logterm 'luci: failed login'
289 list ban_logterm 'error: maximum authentication attempts exceeded'
290 list ban_logterm 'sshd.*Connection closed by.*\[preauth\]'
291 list ban_logterm 'SecurityEvent=\"InvalidAccountID\".*RemoteAddress='
292 ```
293
294 **allow-/blocklist handling**
295 banIP supports local allow and block lists (IPv4, IPv6, CIDR notation or domain names), located in /etc/banip/banip.allowlist and /etc/banip/banip.blocklist.
296 Unsuccessful login attempts or suspicious requests will be tracked and added to the local blocklist (see the 'ban_autoblocklist' option). The blocklist behaviour can be further tweaked with the 'ban_nftexpiry' option.
297 Depending on the options 'ban_autoallowlist' and 'ban_autoallowuplink' the uplink subnet or the uplink IP will be added automatically to local allowlist.
298 Furthermore, you can reference external Allowlist URLs with additional IPv4 and IPv6 feeds (see 'ban_allowurl').
299 Both local lists also accept domain names as input to allow IP filtering based on these names. The corresponding IPs (IPv4 & IPv6) will be extracted and added to the Sets. You can also start the domain lookup separately via /etc/init.d/banip lookup at any time.
300
301 **allowlist-only mode**
302 banIP supports an "allowlist only" mode. This option restricts the internet access from/to a small number of secure websites/IPs, and block access from/to the rest of the internet. All IPs and Domains which are _not_ listed in the allowlist are blocked.
303
304 **redirect Asterisk security logs to lodg/logread**
305 banIP only supports logfile scanning via logread, so to monitor attacks on Asterisk, its security log must be available via logread. To do this, edit '/etc/asterisk/logger.conf' and add the line 'syslog.local0 = security', then run 'asterisk -rx reload logger' to update the running Asterisk configuration.
306
307 **send status E-Mails and update the banIP lists via cron job**
308 For a regular, automatic status mailing and update of the used lists on a daily basis set up a cron job, e.g.
309 ```
310 55 03 * * * /etc/init.d/banip report mail
311 00 04 * * * /etc/init.d/banip reload
312 ```
313
314 **tweaks for low memory systems**
315 nftables supports the atomic loading of firewall rules (incl. elements), which is cool but unfortunately is also very memory intensive. To reduce the memory pressure on low memory systems (i.e. those with 256-512Mb RAM), you should optimize your configuration with the following options:
316
317 * point 'ban_basedir', 'ban_reportdir' and 'ban_backupdir' to an external usb drive
318 * set 'ban_cores' to '1' (only useful on a multicore system) to force sequential feed processing
319 * set 'ban_splitsize' e.g. to '1000' to split the load of an external Set after every 1000 lines/members
320 * set 'ban_reportelements' to '0' to disable the CPU intensive counting of Set elements
321
322 **tweak the download options**
323 By default banIP uses the following pre-configured download options:
324 ```
325 * aria2c: --timeout=20 --retry-wait=10 --max-tries=5 --max-file-not-found=5 --allow-overwrite=true --auto-file-renaming=false --log-level=warn --dir=/ -o
326 * curl: --connect-timeout 20 --retry-delay 10 --retry 5 --retry-all-errors --fail --silent --show-error --location -o
327 * wget: --no-cache --no-cookies --timeout=20 --waitretry=10 --tries=5 --retry-connrefused --max-redirect=0 -O
328 * uclient-fetch: --timeout=20 -O
329 ```
330 To override the default set 'ban_fetchretry', 'ban_fetchinsecure' or globally 'ban_fetchparm' to your needs.
331
332 **send E-Mail notifications via 'msmtp'**
333 To use the email notification you must install & configure the package 'msmtp'.
334 Modify the file '/etc/msmtprc', e.g.:
335 ```
336 [...]
337 defaults
338 auth on
339 tls on
340 tls_certcheck off
341 timeout 5
342 syslog LOG_MAIL
343 [...]
344 account ban_notify
345 host smtp.gmail.com
346 port 587
347 from <address>@gmail.com
348 user <gmail-user>
349 password <password>
350 ```
351 Finally add a valid E-Mail receiver address.
352
353 **change existing banIP feeds or add a new one**
354 The banIP default blocklist feeds are stored in an external JSON file '/etc/banip/banip.feeds'. All custom changes should be stored in an external JSON file '/etc/banip/banip.custom.feeds' (empty by default). It's recommended to use the LuCI based Custom Feed Editor to make changes to this file.
355 A valid JSON source object contains the following information, e.g.:
356 ```
357 [...]
358 "tor":{
359 "url_4": "https://raw.githubusercontent.com/SecOps-Institute/Tor-IP-Addresses/master/tor-exit-nodes.lst",
360 "url_6": "https://raw.githubusercontent.com/SecOps-Institute/Tor-IP-Addresses/master/tor-exit-nodes.lst",
361 "rule_4": "/^(([0-9]{1,3}\\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(\\/(1?[0-9]|2?[0-9]|3?[0-2]))?)$/{printf \"%s,\\n\",$1}",
362 "rule_6": "/^(([0-9A-f]{0,4}:){1,7}[0-9A-f]{0,4}:?(\\/(1?[0-2][0-8]|[0-9][0-9]))?)$/{printf \"%s,\\n\",$1}",
363 "descr": "tor exit nodes",
364 "flag": ""
365 },
366 [...]
367 ```
368 Add an unique feed name (no spaces, no special chars) and make the required changes: adapt at least the URL, the regex and the description for a new feed. The flag is optional, currently only 'gz' is supported to process archive downloads.
369
370 ## Support
371 Please join the banIP discussion in this [forum thread](https://forum.openwrt.org/t/banip-support-thread/16985) or contact me by mail <dev@brenken.org>
372
373 ## Removal
374 * stop all banIP related services with _/etc/init.d/banip stop_
375 * remove the banip package (_opkg remove banip_)
376
377 Have fun!
378 Dirk