Commit graph

7664 commits

Author SHA1 Message Date
Peter Stadler
f62599d27e nginx-util: use UCI for server configuration
**tl;dr:** The functions `{add,del}_ssl` modify a server
section of the UCI config if there is no `.conf` file with
the same name in `/etc/nginx/conf.d/`.

Then `init_lan` creates `/var/lib/nginx/uci.conf` files by
copying the `/etc/nginx/uci.conf.template` and standard
options from the UCI config; additionally the special path
`logd` can be used in `{access,error}_log`.

The init does not change the configuration beside
re-creating self-signed certificates when needed. This is
also the only purpose of the new `check_ssl`, which is
installed as yearly cron job.

**Initialization:**

Invoking `nginx-util init_lan` parses the UCI configuration
for package `nginx`. It creates a server part in
`/var/lib/nginx/uci.conf` for each `section server '$name'`
by copying all UCI options but the following:

* `option uci_manage_ssl` is skipped. It is set to
'self-signed' by `nginx-util add_ssl $name`, removed by
`nginx-util del_ssl $name` and used by
`nginx-util check_ssl` (see below).

* `logd` as path in `error_log` or `access_log` writes them
to STDERR respective STDOUT, which are fowarded by Nginx's
init to the log daemon. Specifically:
`option error_log 'logd'` becomes `error_log stderr;` and
`option access_log 'logd openwrt'` becomes
`access_log /proc/self/fd/1 openwrt;`

Other `[option|list] key 'value'` entries just become
`key value;` directives.

The init.d calls internally also `check_ssl` for rebuilding
self-signed SSL certificates if needed (see below). And it
still sets up `/var/lib/nginx/lan{,_ssl}.listen` files as
it is doing in the current version (so they stay available).

**Defaults:**

The package installs the file `/etc/nginx/restrict_locally`
containing allow/deny directives for restricting the access
to LAN addresses by including it into a server part. The
default server '_lan' includes this file and listens on all
IPs (instead of only the local IPs as it did before; other
servers do not need to listen explicitly on the local IPs
anymore). The default server is contained together with a
server that redirects HTTP requests for inexistent URLs to
HTTPS in the UCI configuration file `/etc/config/nginx`.
Furthermore, the packages installs a
`/etc/nginx/uci.conf.template` containing the current setup
and a marker, which will be replaced by the created UCI
servers when calling `init_lan`.

**Other:**

If there is a file named `/etc/nginx/conf.d/$name.conf` the
functions `init_lan`, `add_ssl $name` and `del_ssl $name`
will use that file instead of a UCI server section (this is
similar to the current version).

Else it selects the UCI `section server $name`, or, when
there is no such section, it searches for the first one
having `option server_name '… $name …'`. For this section:

* `nginx-util add_ssl $name` will add to it:
`option uci_manage_ssl 'self-signed'`
`option ssl_certificate '/etc/nginx/conf.d/$name.crt'`
`option ssl_certificate_key '/etc/nginx/conf.d/$name.key'`
`option ssl_session_cache 'shared:SSL:32k'`
`option ssl_session_timeout '64m'`
If these options are already present, they will stay the
same; just the first option `uci_manage_ssl` will always be
changed to 'self-signed'. The command also changes all
`listen` list items to use port 443 and ssl instead of port
80 (without ssl). If they stated another port than 80
before, they are kept the same. Furthermore, it creates a
self-signed SSL certificate if necessary, i.e., if there is
no *valid* certificate and key at the locations given by
the options `ssl_certificate` and `ssl_certificate_key`.

* `nginx-util del_ssl $name` checks if `uci_manage_ssl` is
set 'self-signed' in the corresponding UCI section. Only
then it removes all of the above options regardless of the
value looking just at the key name. Then, it also changes
all `listen` list items to use port 80 (without ssl)
instead of port 443 with ssl. If stating another port than
443, they are kept the same. Furthermore, it removes the
SSL certificate and key that were indicated by
`ssl_certificate{,_key}`.

* `nginx-util check_ssl` looks through all server sections
of the UCI config for `uci_manage_ssl 'self-signed'`. On
every hit it checks if the SSL certificate-key-pair
indicated by the options `ssl_certificate{,_key}` is
expired. Then it re-creates a self-signed certificate.
If there exists at least one `section server` with
`uci_manage_ssl 'self-signed'`, it will try to install
itself as cron job. If there are no such sections, it
removes that cron job if possible.

For installing a ssl certificate and key managed by
another app, you can call:
`nginx-util add_ssl $name $manager $crtpath $keypath`
Hereby `$name` is as above, `$manager` is an arbitrary
string, and the the ssl certificate and its key are
indicated by their absolute path. If you want to remove
the directives again, then you can use:
`nginx-util del_ssl $name $manager`

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
2020-11-28 18:34:39 +01:00
Oleg Derevenetz
9cf0efc4f6 bwping: update to version 2.2
Signed-off-by: Oleg Derevenetz <oleg-derevenetz@yandex.ru>
2020-11-27 23:12:14 +03:00
Dirk Brenken
84f20951b3
travelmate: fix possible race condition
* prevent possible duplicate script execution due to
  multiple ntp events in parallel

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-11-26 22:39:15 +01:00
Rosen Penev
6dc567270e
Merge pull request #14031 from ptpt52/ext_ip_reserved_ignore
net/miniupnpd: ext_ip_reserved_ignore support
2020-11-26 10:28:23 -08:00
Chen Minqiang
b76aa99194 net/miniupnpd: ext_ip_reserved_ignore support
This add an option to ignore ext_ip reserved
Enable this option in config by default.

Fixes: #13773

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-11-26 15:56:20 +08:00
DENG Qingfang
2f68b75a67 curl: fix build against OpenSSL
Ref: https://curl.se/mail/lib-2020-10/0037.html
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-11-26 14:47:55 +08:00
Philip Prindeville
9781ef95cb xtables-addons: include xt_geoip_fetch utility
It's useful to be able to dump sections of the database by country
for scripting or just plain sanity checking.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-11-25 17:45:28 -07:00
Rosen Penev
925275cad2
Merge pull request #13377 from micmac1/apa-faker
apache: use fakeroot instead of postinst script
2020-11-25 15:05:52 -08:00
Rosen Penev
7c491c37be
Merge pull request #13960 from neheb/miniu
miniupnpd: update to 2.2.0
2020-11-25 14:28:51 -08:00
Rosen Penev
e0b388b078
Merge pull request #13926 from ja-pa/tor-0.4.4.6
tor: update to version 0.4.4.6 (security fix)
2020-11-25 14:27:57 -08:00
Rosen Penev
1fc7e49adc
Merge pull request #13990 from neheb/mtr
mtr: update to 0.94
2020-11-25 14:22:29 -08:00
Marco Martins
773b87977e
miniupnpd: Added chain rule to filter table so udp stun incoming connections rules works
Signed-off-by: Marco Martins <marcomartins86@gmail.com>
2020-11-25 14:12:18 -08:00
Rosen Penev
4d824243e6
miniupnpd: update to 2.2.0
Replace daemon patch with upstream solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-25 14:10:41 -08:00
Rosen Penev
e9a695b3b5
mtr: update to 0.94
Switch to normal HTTP mirron.

Don't use jansson.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-24 22:43:14 -08:00
Rosen Penev
613688a555
curl: update to 7.73.0
Remove upstream patch.

Refresh other one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-24 22:30:29 -08:00
Dobroslaw Kijowski
0d3176abe0 adguardhome: upstream upgrade to v0.104.1
* Full changelog available at:
  * https://github.com/AdguardTeam/AdGuardHome/releases/tag/v0.104.0
  * https://github.com/AdguardTeam/AdGuardHome/releases/tag/v0.104.1

* Change path to packr resources as some of source files were moved.

Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
2020-11-24 21:24:47 +02:00
Rosen Penev
e6f2cd7950
Merge pull request #13989 from neheb/ola3
ola: update to 0.10.8
2020-11-24 00:48:16 -08:00
Rosen Penev
ddfda41b70
ola: update to 0.10.8
Removed upstreamed patches.

Refreshed other ones.

Removed Makefile hacks.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-23 19:31:35 -08:00
Olivier Poitrey
3e27b2c181 nextdns: Update to version 1.9.4
Signed-off-by: Olivier Poitrey <rs@nextdns.io>
2020-11-23 22:15:05 +00:00
Rosen Penev
a0e3e64ce0
Merge pull request #13977 from ja-pa/ooniprobe-3.0.11
ooniprobe: udpate to version 3.0.11
2020-11-23 13:50:41 -08:00
Olivier Poitrey
e35483a908 nextdns: Update to version 1.9.3
Signed-off-by: Olivier Poitrey <rs@nextdns.io>
2020-11-23 17:01:54 +00:00
Jan Pavlinec
450ba898fd
ooniprobe: udpate to version 3.0.11
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
2020-11-23 12:18:05 +01:00
Xiaoli Chan
d1ccd52cf3 xtables-addons: update to 3.13
Signed-off-by: Xiaoli Chan <2209553467@qq.com>
2020-11-23 17:28:07 +08:00
Rosen Penev
2d536f9c54
Merge pull request #13975 from flyn-org/nfdump
nfdump: update to 1.6.22
2020-11-22 18:29:09 -08:00
Rosen Penev
5aebd255ad
Merge pull request #13968 from flyn-org/daq
Provide both libdaq 2.2.2 and 3.0.0-beta1 to satisfy Snort 2 and 3.
2020-11-22 18:28:40 -08:00
W. Michael Petullo
4faf40c8f9 nfdump: update to 1.6.22
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-22 18:47:49 -06:00
W. Michael Petullo
0fe75c1d80 snort3: require new libdaq3 package
Snort 3.0.3-1 requires libdaq 3.0.0-beta1, but this version is no longer
compatible with Snort 2. Thus OpenWrt now provides both a libdaq and
libdaq3 package. This modifies the snort3 package to require the latter.

Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-22 18:14:33 -06:00
Daniel Golle
0caf990380 gnunet-secushare: remove package
It stopped building against current gnunet a while ago.
Drop it for now.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-11-22 01:11:02 +00:00
Dirk Brenken
ae138431b4
travelmate: handle invalid wireless sections
* ignore invalid wireless sections

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-11-21 18:17:51 +01:00
Rosen Penev
eb1462676d
Merge pull request #13962 from neheb/muc
miniupnpc: update to 2.2.0
2020-11-20 22:07:23 -08:00
Rosen Penev
70e4e85788
Merge pull request #13939 from ja-pa/chrony-nts-variant
chrony: add package variant with NTS
2020-11-19 17:07:24 -08:00
Rosen Penev
5f18221739
Merge pull request #13856 from peter-stadler/nginx
nginx: update to version 1.19.4
2020-11-19 17:06:30 -08:00
Rosen Penev
884ed82b88
Merge pull request #13961 from neheb/sshfs2
sshfs: update to 3.7.1
2020-11-19 16:44:48 -08:00
Rosen Penev
85e2775989
Merge pull request #13963 from neheb/memcached2
memcached: update to 1.6.8
2020-11-19 16:40:42 -08:00
Rosen Penev
155ba290ff
Merge pull request #13958 from flyn-org/snort
snort: update to 2.9.16.1
2020-11-19 16:23:48 -08:00
Rosen Penev
9a7efa6808
Merge pull request #13959 from flyn-org/snort3
Snort3 updates
2020-11-19 16:22:56 -08:00
Rosen Penev
c1fe3ecdc2
memcached: update to 1.6.8
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-19 16:15:48 -08:00
Rosen Penev
ef388ff1f3
miniupnpc: update to 2.2.0
Remove CMAKE_INSTALL. No need for it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-19 16:15:00 -08:00
Rosen Penev
dd14c769eb
sshfs: update to 3.7.1
Remove unnecessary patch. The issue was with fuse3.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-19 16:14:05 -08:00
W. Michael Petullo
a896d5db15 snort3: update to 3.0.3-1
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-19 17:04:54 -06:00
Karl Palsson
bc5d02e242 pagekitec: update to latest
Fixes for status files not being written, seen on OpenWrt
Fixes for compiler warnings, seen on OpenWrt

Full changelog: https://github.com/pagekite/libpagekite/compare/v0.91.200718...v0.91.201110

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2020-11-19 22:12:18 +00:00
Rosen Penev
bcca53519e
Merge pull request #13956 from flyn-org/nfdump
nfdump: update to 1.6.21
2020-11-19 12:57:56 -08:00
Rosen Penev
c173480b75
Merge pull request #13950 from flyn-org/dmapd
dmapd: update 0.0.86
2020-11-19 12:56:54 -08:00
W. Michael Petullo
f1a67441dc snort: update to 2.9.16.1
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-19 14:53:24 -06:00
W. Michael Petullo
3ab163df36 nfdump: update to 1.6.21
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-19 13:38:31 -06:00
W. Michael Petullo
9689533481 krb5: update to 1.18.3
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-19 13:24:26 -06:00
W. Michael Petullo
1379e452bc dmapd: update 0.0.86
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-11-19 13:05:39 -06:00
Jan Pavlinec
f16d79f5f1
tor: update to version 0.4.4.6 (security fix)
Fixes TROVE-2020- 005

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
2020-11-18 12:47:09 +01:00
Jan Pavlinec
f1a30746f9
chrony: add package variant with NTS
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
2020-11-18 12:01:35 +01:00
Florian Eckert
78dd3e05a8
Merge pull request #13908 from aaronjg/mwan3-rpcd
mwan3: remove dependency on rpcd & fix iputils-ping check
2020-11-18 08:30:36 +01:00