14365 Commits

Author SHA1 Message Date
Maurice Walker
b33ed9e207 Interfaces Overview, merge DHCPv4 / DHCPv6 buttons
Having two sets of buttons implies that they only act on the respective protocol, but this is not the case.
2022-08-24 12:10:54 +02:00
Franco Fichtner
940e4962f3 system: fix lint warning on older PHP 2022-08-24 07:49:46 +02:00
Franco Fichtner
3819c7d118 system: style sweep 2022-08-23 17:03:50 +02:00
Stephan de Wit
2cbd7fc768
CRL: add support for phpseclib3 (#5986) 2022-08-23 14:27:56 +02:00
kulikov-a
88011ede02
CRL: decode stored crl data before display (#5965) 2022-08-23 11:11:00 +02:00
Franco Fichtner
840c465d2b interfaces: configure all hardware devices on bootup; closes #5985 2022-08-23 10:32:58 +02:00
Franco Fichtner
029f0c217e src: style sweep 2022-08-23 10:32:03 +02:00
Franco Fichtner
dd4edff0fd interface: only parse actual options, not nd6 options #5985 2022-08-23 10:16:06 +02:00
Franco Fichtner
a785c129a2 interfaces: web GUI locale sorts files differently #5862
Make suffix match explicit, give it lower priority and prevent
suffix match in plain inteface match afterwards to repair the
result return logic.
2022-08-23 09:31:18 +02:00
Franco Fichtner
041e92a320 system: resolv.conf search is FQDN #5862 2022-08-23 08:30:47 +02:00
Franco Fichtner
f3b51b36bb interfaces: fix wrong status #5974 2022-08-22 20:52:25 +02:00
Franco Fichtner
05922760bd interfaces: status page warnings and dhcp6link fix; closes #5974
The buttons shown do the same for IPv4 and IPv6 so that might be a bit
misleading, but let's go from here.
2022-08-22 08:55:23 +02:00
Maurice Walker
f782ccb8c4 Web GUI: fix IPv6 link-local HTTP_REFERER check
Allow accessing Web GUI via link-local IPv6 addresses by ignoring %scope suffix when performing HTTP_REFERER check.
2022-08-22 08:18:37 +02:00
Ad Schellevis
f609a9cbb1 Services: Intrusion Detection: Administration - rules, fix enable button and present active detail overwrite if present (for status and action) 2022-08-19 16:32:04 +02:00
Ad Schellevis
4a57a23c17 System: Gateways: Group - only offer valid options for pool configuration, missed a spot in previous 2022-08-19 16:26:17 +02:00
Ad Schellevis
a231696cfc System: Gateways: Group - only offer valid options for pool configuration, closes https://github.com/opnsense/core/issues/5934 2022-08-19 16:15:17 +02:00
Franco Fichtner
20a60050ee system: run monitor reload inside system_routing_configure() #5956
Some call flows require this, others don't and on 22.7 we seem to miss
one that did.  Instead of adding more monitor reloads in the possible
spots move the ones that are shared into the general routing reload since
the two are almost always clustered together.

Also use the $interface argument to figure out which monitors require
reloading.  This will avoid quite a few spurious reloads on larger
setups.

Boot is a little special, but easy enough to ensure we don't call monitor
reload twice.
2022-08-19 11:03:31 +02:00
Ad Schellevis
9f8906647e PHP 8.1 style - setcookies() doesn't like null as an option value. 2022-08-18 14:29:26 +02:00
Franco Fichtner
76a473d8ed interfaces: mock hidden wireless devices for assignment; closes #5939 2022-08-18 13:15:50 +02:00
Franco Fichtner
b3575e93e6 interfaces: it's complicated, use new function 2022-08-18 10:13:53 +02:00
Stephan
f3efe39f7b unbound: prevent dns rebinding check and DNSSEC validation on explicit forwarded domains
this is to adhere to the same logic as the domain overrides, since users may expect forwarded-to
servers to reply with a private address or in fact be a local controller, not setting this domain as either
private or insecure may break responses if either DNS rebinding checks (default) or DNSSEC are enabled.

ideally this should be seperate checks per entry in the future.
2022-08-18 09:25:25 +02:00
Franco Fichtner
1cd957bcdd firewall: revert additional safeguards, looks to be a false positive
This reverts commit fe52702a8b054e36265bcb28d41cc8c44b865529.
This reverts commit b5bda2bda48d0d85b3e4f66cddf4af80c6063031.
2022-08-18 09:16:11 +02:00
Franco Fichtner
5a5b1c9831 system: pretty print since we want users to inspect this 2022-08-18 09:04:22 +02:00
Franco Fichtner
d2e7cbade5 system: improve debugging capability of dns static routes
We are progressing steadly here, but now we need more visibility
of the sources of DNS routes to summarize servers and sources.

Also try not to deduplicate routes prematurely so that dynamic
hosts get priority over config-based ones like the override
setting actually implies as currently the last one won.
2022-08-18 08:44:44 +02:00
Franco Fichtner
eec0fbb96b firmware: improve previous a little more 2022-08-18 08:12:07 +02:00
Franco Fichtner
cf25dd91cb firmware: pkgs was still unknown 2022-08-17 15:37:49 +02:00
Franco Fichtner
98b65dd8a0 system: lighttpd 1.4.66 config removal
WARNING: unknown config-key: server.dir-listing (ignored)
2022-08-17 14:46:22 +02:00
kulikov-a
3c53058805
crl management small adjustments (#5943)
add some debug info
dont add cert to crl if cert_revoke() / crl_update() failed
check if CA can sign anything before CRL create
set "method" param to set Method select value
2022-08-17 11:32:15 +02:00
Ad Schellevis
fc7d892c3c jquery.bootgird.js - type cast issue, pull in 7b8da26bb8 2022-08-17 11:11:37 +02:00
Franco Fichtner
29e6e12d7c system: deal with ifctl internals for now #5933
Later we want ifctl to add the scope to the link-local gateway
by default which will remove a more code, but for now we are
bound to undo the internal magic.

Interface name stops with first ":" or last "_".  For the exclude
check use the correct array index, not the array itself.
2022-08-17 07:37:56 +02:00
Stephan de Wit
92a5a224dd
unbound: restrict creation of PTR records for both the system domain and host overrides (#5925)
In order to prevent the unpredictable behaviour of random PTR records being returned, which is not explicitly prohibited in RFC1035, it is best to restrict the creation of PTR records from every single host and alias (except for wildcard entries, no PTR records are created here), to only non-alias overrides (edit: the exception here is an alias whose parent does not create a PTR record, a wildcard entry). We also further restrict it to unique IP addresses so there can be no confusion in how to maintain the entries within the running Unbound instance.

Hopefully this can pave the way for adding PTR records as a separate type instead of generating them under the hood, as is done currently.

This change should at least address inconsistencies regarding random PTR records being returned as mentioned in https://github.com/opnsense/core/issues/5477

A slight refactor of the existing unbound code is also included here for code reduction purposes.
2022-08-16 13:51:58 +02:00
Franco Fichtner
76278022f8 interfaces: wait for DAD to complete #5933 2022-08-16 10:40:20 +02:00
Franco Fichtner
539ae27af0 interfaces: update link-local matching pattern
In some instances a suboptimal pattern was used missing several
networks included in the actual fe80::/10.  The reference is
is_linklocal() function nowadays.  Sync all patterns.
2022-08-16 08:03:50 +02:00
Franco Fichtner
c9bdc3d162 interfaces: wrong variable in scope addition
PR: https://forum.opnsense.org/index.php?topic=29862.0
2022-08-15 22:02:54 +02:00
Ad Schellevis
fcbdc44f63 Unbound - dhcp watcher : when the same fqdn is being reinjected on a different address, it would be removed previously. This commit aims to keep a consistent state when fqdn's move from one host to the other.
for https://github.com/opnsense/core/issues/5952

Test data:

lease 172.23.128.214 {
  starts 5 2022/08/12 18:17:31;
  ends 5 2022/12/12 18:27:31;
  tstp 5 2022/08/12 18:52:31;
  tsfp 5 2022/08/12 18:52:31;
  atsfp 5 2022/08/12 18:52:31;
  cltt 5 2022/08/12 18:17:31;
  binding state active;
  next binding state expired;
  hardware ethernet xx:xx:xx:xx:xx:xx;
  uid "\001h\327\232\206,\361";
  set vendor-class-identifier = "ubnt";
  client-hostname "MyDHCPClient";
}
lease 172.23.128.215 {
  starts 5 2022/08/12 18:17:31;
  ends 5 2022/08/12 18:47:31;
  tstp 5 2022/08/12 18:52:31;
  tsfp 5 2022/08/12 19:02:31;
  atsfp 5 2022/08/12 19:02:31;
  cltt 5 2022/08/12 18:17:31;
  binding state active;
  next binding state expired;
  hardware ethernet xx:xx:xx:xx:xx:xx;
  uid "\001h\327\232\206,\361";
  set vendor-class-identifier = "ubnt";
  client-hostname "MyDHCPClient";
}

When 172.23.128.215's end date surpasses "now", a removal after "end" will remove both 172.23.128.215 and 172.23.128.214
2022-08-15 14:48:00 +02:00
Franco Fichtner
45b8b1acbe interfaces: fix typo in previous 2022-08-15 14:01:15 +02:00
Franco Fichtner
489ae2f3c6 interfaces: DHCP is our problem child #5933 2022-08-15 13:20:41 +02:00
Franco Fichtner
e6ef454fa8 interfaces: signal address flush through rc.newwanip #5933 2022-08-15 12:14:48 +02:00
Franco Fichtner
b58b7fed26 interfaces: align rc.newwanip with rc.newwanipv6, step one
PR: #5956 #5933
2022-08-15 11:57:00 +02:00
Franco Fichtner
46ca0aff06 interfaces: static handling is the same as dynamic
Tiptoeing around interface_configure() when the resulting
work is the same is counter-intuitive and the static ARP
case probably has some more side effects since we do not
check for static ARP flag?!

filter_configure() can take a long time.  Skip alias stuff.
2022-08-15 11:49:02 +02:00
Franco Fichtner
e005e0371e interfaces: revert back to orginal state #5953
interface_bring_down() takes care of this now.
2022-08-15 11:45:30 +02:00
Franco Fichtner
8b35e96395 interfaces: only remove static addresses in interface_bring_down() #5953
Seems to be more aligned with the original idea behind the function.
interface_configure() does clear any stray addresses afterwards anyway.
2022-08-15 10:09:35 +02:00
Franco Fichtner
996e883836 interfaces: PPP is an exception, only created after interface configuration
PR: https://forum.opnsense.org/index.php?topic=29840.0
2022-08-15 10:01:58 +02:00
Ad Schellevis
7bbfd981ac Interfaces : tunnel types and assigments (https://github.com/opnsense/core/issues/5953), only de-configure when an address was previously set. 2022-08-14 13:56:14 +02:00
Ad Schellevis
c11df998cb Interfaces / Wireless - fix regression in 3ef64ab8ea
closes https://github.com/opnsense/core/issues/5955
2022-08-14 13:40:12 +02:00
Ad Schellevis
33d818f4cd Interfaces : tunnel types and assigments, suggestion for https://github.com/opnsense/core/issues/5953
When the interface exists and is either a ipv4  or ipv6 tunnel, prevent address removal on apply in "Interfaces: [XXX]"
2022-08-13 11:29:02 +02:00
Ad Schellevis
bc392461da LDAP - PHP 8 issue when ldap_get_entries() returns false, for https://github.com/opnsense/core/issues/5949 2022-08-12 15:42:34 +02:00
Franco Fichtner
1c322498c9 dhcp: emulate configuration generation using JS #5923 2022-08-12 13:58:33 +02:00
Franco Fichtner
cc6a7947fe system: cleanup 2022-08-12 13:18:49 +02:00
Franco Fichtner
6b8cfcb142 rc: _var_script support to be removed in favour of _setup 2022-08-12 13:11:29 +02:00