13415 Commits

Author SHA1 Message Date
Franco Fichtner
8802b0ced1 system: spacing in previous 2021-11-18 16:30:47 +01:00
Franco Fichtner
0b76f2a821 router advertisements: move static mode out of source address setting
This is incompatible but a little better in code flow.  It's still apparent
that the static mode clashes with CARP so maybe we should stop giving CARP
the benefit of the doubt and the the user decide if the setup should be
static or dyamic CARP or no CARP?
2021-11-18 14:06:05 +01:00
Franco Fichtner
a47949faaa router advertisements: support IP aliases with and without VHID; closes #5185
Deal with case (2) and (3) in the lightest way possible.  This requires
fixes and features for interface-related code, but it's a good field test.  ;)

The static mode isn't really a good construct and will be moved to a checkbox
in the next commit.
2021-11-18 13:37:50 +01:00
Franco Fichtner
65178b937c interfaces: separate the use cases of get_configured_carp_interface_list()
Pages only call these to get lists but get_interface_ip*() functions want
a specific one.  Handroll these cases and simplify the other end.

PR: https://github.com/opnsense/core/pull/5185
2021-11-18 11:41:46 +01:00
Franco Fichtner
d963858af6 dhcp: use friendly descriptions, unify print of CARP address; closes #5354 2021-11-18 11:39:54 +01:00
Franco Fichtner
731a69c6e6 system: add opnsense-log helper POC
Wanted to do this every now and then since people were not
familiar with clog but never got around to do it.  Now that
clog is gone it's easier to do so let's write a few lines
and extend as necessary.  :)

It looks like `tail -f' doesn't watch the symlink and instead
tails the target file which makes nightly rotation invisible
and the log starts stalling so it means for any readers of
latest.log it shouldn't be a persistent read.

PR: https://github.com/opnsense/core/issues/4993
2021-11-18 09:34:27 +01:00
Franco Fichtner
dd6a04a68a system: add "latest.log" symlink and make sure new log is created
We shuffle the cron jobs around a bit to let the script start at
minute 1 of every hour which is close enough.

We might consider a soft-update of the link instead of removing
it every hour depending on how tail -f and such work, but for now
use what PHP has to offer.

PR: https://github.com/opnsense/core/issues/4993
2021-11-18 09:14:25 +01:00
Franco Fichtner
a425eed175 xmlrpc: support authentication using API keys
authenticate_user() is not being called by anyone else so
move it to xmlrpc.php and extend it to allow for API keys
to work.

Since the authentication in this page is always bound to
local credentials it makes sense to extend the user-based
access with the API key-based access as they don't get in
the way of each other.

PR: https://github.com/travisghansen/hass-opnsense/discussions/6
2021-11-18 08:49:31 +01:00
Taneli Leppä
f83a74d496
Pass current IP address to static lease creation. (#5318) 2021-11-17 18:12:09 +01:00
Ad Schellevis
7b63d58820 Captive portal - missing tooltip in session window 2021-11-17 17:52:22 +01:00
Franco Fichtner
031b935e8c firmware: although not used in practice make sure we reset reboot flag correctly 2021-11-17 14:27:20 +01:00
Franco Fichtner
beb63ec5bc firmware: make sure to emit status_reboot when no reboot takes place #5358 2021-11-17 14:15:00 +01:00
Franco Fichtner
8654f68375 system: small whitespace cleanup 2021-11-17 14:15:00 +01:00
Franco Fichtner
aff5f593f7 firmware: add status_reboot which is the correct one for the offered status #5358
Should have seen sooner that the API already proposes the upgrade to take so we just
make sure the related flag is set and read.
2021-11-17 13:12:58 +01:00
Franco Fichtner
b4e7b65f13 firmware: a bit more complex to look up right condition #5358 2021-11-17 12:55:45 +01:00
Franco Fichtner
1d713525c1 firmware: add new flag for update-based reboot #5358
Keep old flag in place to not break any API consumers for a while.
2021-11-17 12:46:05 +01:00
Franco Fichtner
c2c1119a2e firmware: properly migrate cron actions
Cron jobs move from direct execution to random delay
2021-11-17 12:14:13 +01:00
Franco Fichtner
ff8e2fdc97 firmware: streamline -s/implied script a bit more 2021-11-17 12:04:05 +01:00
Ad Schellevis
bf048cc07c jquery.bootgrid - converters / datetime, ignore empty values from 857598b9d0 2021-11-17 11:34:29 +01:00
Franco Fichtner
d81b893ee3 interfaces: async this part as well using -dq 2021-11-17 09:40:59 +01:00
Franco Fichtner
88ba37ee97 backend: add -q option and shuffle errros to stderr 2021-11-17 09:32:31 +01:00
Franco Fichtner
3a6255c5ff openvpn: remove reload on disconnect
Discussed with: @adschellevis
2021-11-17 09:03:45 +01:00
Franco Fichtner
e52c256b62 interfaces: async calls for newip* actions 2021-11-17 09:02:33 +01:00
Franco Fichtner
6d14376da3 system: use more convenient configctl call
Most of the system already uses it and users are informed about
it too.  Might just be a good time to write a little manual page
for it...

While here some use of daemon -f suggests that configctl -d should
be used more widely than it is now.
2021-11-16 21:30:57 +01:00
Franco Fichtner
d319644859 system: unify mvc and legacy cron restart
So both sides don't miss the other.  Remove $defer since
we can simply start it later anyway.
2021-11-16 14:39:21 +01:00
Franco Fichtner
7fe7c460b0 system: reload cron template on legacy cron restart 2021-11-16 14:20:46 +01:00
Franco Fichtner
bf4325abd8 firmware: check for valid command first and exit if not found
Avoids a random sleep execution for no reachable command.
2021-11-16 14:13:09 +01:00
Franco Fichtner
769605aef6 system: use configctl -d for cron-based services
Avoids waiting for a response that is not necessary because it
won't be read and also spurious timeout messages in the backend
log.
2021-11-16 14:12:04 +01:00
Franco Fichtner
8a2aba56e1 backend: add detach option for long running actions 2021-11-16 14:03:48 +01:00
Franco Fichtner
d2f9efcd69 firmware: allow launcher to operate on a random sleep if requested
To make verbatim script passthrough work we also need to introduce
a scripting option to reach the random sleep option afterwards.

We add a random delay of up to 25 minutes to the cron based operations
in order to give the update servers more room to breathe.
2021-11-16 13:22:05 +01:00
Franco Fichtner
82d21d0775 firmware: hook up 'latest' script, use it in dashboard widget as well
Paired with a nightly cron job this can hint at updates on a daily basis
automatically now.
2021-11-16 11:00:40 +01:00
Franco Fichtner
cd77cec93a firmware: add a 'latest' script to derive update info from changelog 2021-11-16 10:14:10 +01:00
Franco Fichtner
edd17b5a33 firmware: make changelog.txz location permanent
Download only if necessary, but verify and unpack unconditionally.

Add a cron job for nightly poll to be used with upcoming pending
script to "skim" the changelog for potential updates.
2021-11-16 09:53:47 +01:00
Ad Schellevis
a68ed580d0 CaptivePortal - connected since misformatted due to datetime already being converted in bootgrid, 2e5d8ecf75/src/opnsense/www/js/jquery.bootgrid.js (L1219-L1226) 2021-11-15 20:00:32 +01:00
Franco Fichtner
ebfdeecdfe make: populate CORE_MAKE command with proper env on stepping stones
`make upgrade' could forget what version it was running in the first place.
2021-11-15 19:37:01 +01:00
kulikov-a
035dc45063
IDPS: handle empty metadata value (#5357) 2021-11-15 17:09:26 +01:00
Franco Fichtner
d29b652cc0 pkg: suricata is now the same as suricata-devel
We keep the port in order to test upcoming version 7 but for now
steer away from pulling it as a core dependency so we don't have
to update both.
2021-11-15 14:23:57 +01:00
Franco Fichtner
3585c06da6 firmware: only fetch changelogs if the server file changed 2021-11-15 14:18:47 +01:00
Franco Fichtner
2a4c3a4869 firmware: add a configuration file and fix prompt hint 2021-11-15 13:35:14 +01:00
Franco Fichtner
d446a5909f pkg: fix plist 2021-11-15 11:31:21 +01:00
Ad Schellevis
b567ddb1f1 Firewall / Rules - drop policy based routing validation on interface rules as discussed in https://github.com/opnsense/core/issues/5329#issuecomment-968704455 2021-11-15 10:58:19 +01:00
Ad Schellevis
c28567ec1d IDPS: support multiple policy property in metadata, closes https://github.com/opnsense/core/issues/5350
o allow repetitive metadata tags to be used, representing them as multiline options. Since \n can't exist in rules it should be rather save to concat repeating entries
o convert multiline items in the UI (rule info) (convert \n --> <br/>)
2021-11-14 18:59:43 +01:00
Ad Schellevis
012376323a logging / relayd - move syslog target to plugin where it belongs [1], for https://github.com/opnsense/plugins/issues/2643 2021-11-11 19:09:00 +01:00
Franco Fichtner
c9d4643066 ipsec: add copyright to new tunnels template 2021-11-11 08:10:24 +01:00
Franco Fichtner
1b0e30415e interfaces: add a comment to new block 2021-11-10 13:08:42 +01:00
Franco Fichtner
1d785d83eb firmware: also here of course 2021-11-09 13:38:45 +01:00
Franco Fichtner
f68816a8c2 src: fix a couple of stray whitespace issues 2021-11-09 13:33:11 +01:00
Franco Fichtner
9b7c35a630 interfaces: style 2021-11-09 13:15:30 +01:00
Franco Fichtner
6de63630ef system: do not embed link twice 2021-11-09 13:04:09 +01:00
Franco Fichtner
44d015f053 firmware: implement cross-ABI reinstall #5144 2021-11-09 09:46:58 +01:00