v0.42.2_fix1
This commit is contained in:
1 parent
f38a2b9e5e
commit
15c7f9ff9e
24 files changed
+464
-77
No files matched your search
@@ -13,6 +13,21 @@ Global restrictions add to per-vhost and path rules. Rate-limit requests are cou
|
||||
|
||||
- **IP/CIDR ACL:** allow or deny IPv4/IPv6 networks. Use reusable ACL profiles for settings shared by several domains. Both ordinary and Docker Vhosts use a searchable multi-select with selected badges and a preview of IP/CIDR rules, country restrictions and the default policy; the selection changes presentation only, not ACL evaluation. A Vhost can select up to eight profiles (`acl_profile_ids`, or one legacy `acl_profile_id`); Docker assignments can override or inherit the agent's profile selection.
|
||||
- **DNS/DDNS:** an ACL `allow` rule may use a hostname, such as `allow office.example.ddns.net`; `deny` with DNS is not supported. Records are refreshed periodically; unknown, failed or expired resolutions authorize nobody under the allow rule. This is appropriate for a trusted, controlled DDNS record, not a replacement for login.
|
||||
|
||||
### Diagnose dynamic DNS access
|
||||
|
||||
Open **ACL profiles -> DNS/DDNS ACL resolver status -> Refresh DNS status** or request authenticated `GET /api/acl/dns-status`. The view includes every DNS rule (global, profile, Vhost and location), not just the currently selected profile. It returns the normalized hostname, `pending` / `resolved` / `failed` / `expired`, the **currently permitted A/AAAA addresses**, time of last lookup, remaining validity and the most recent failure reason. The API is restricted to the admin session or a read-scoped administrative API token.
|
||||
|
||||
Resolution starts when the server starts, updates after configuration changes and refreshes every 60 seconds. A successful answer is valid for up to 180 seconds, provided it remains in the active cache. Every failed refresh **immediately removes the permission** for that hostname. `resolved` does not mean that a particular visitor is allowed: the source IP seen by RustProxy must be one of the returned addresses, and all other attached ACL/country/access policies still apply. Verify whether traffic arrives through a reverse proxy, NAT or IPv6 before blaming DNS.
|
||||
|
||||
Resolution uses the operating system's resolver (the server running RustProxy, or the container's resolver). Check on that host:
|
||||
|
||||
```bash
|
||||
getent ahosts office.example.ddns.net
|
||||
journalctl -u rustproxy --since '10 minutes ago' | grep 'ACL DDNS'
|
||||
```
|
||||
|
||||
Look for `ACL DDNS resolver inventory updated` and `ACL DDNS resolved` at info level in the journal. Failed lookups emit a **warning** with the hostname and actual system resolver error or timeout; if error-file logging is enabled, these warnings are written to the configured error file. The access log contains HTTP requests, not DNS refresh results. No warning after the first refresh is **not proof of a failure**; a successful lookup that resolves to the wrong address also denies access without generating a DNS error. If the status remains `pending` for more than one refresh interval while the rule exists in the active configuration, investigate whether the DNS worker started or crashed. Avoid changing the ACL default to `allow` as a workaround.
|
||||
- **Country access:** allow-only or blocking based on the configured GeoIP database. Allow-only mode fails closed when a country cannot be determined. Keep the GeoIP database updated in **Settings → GeoIP updates**.
|
||||
- **Cloudflare client IP:** enable the integration only when traffic really arrives through a controlled Cloudflare/trusted-proxy boundary. Never trust arbitrary client-supplied forwarding headers as an identity proof.
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ The current bundled `src/admin/openapi.json` declares these operations (among ot
|
||||
| `POST /api/config/geoip/update` | Run a GeoIP download/check/reload immediately using already-saved GeoIP settings; does not change revision. |
|
||||
| `GET /api/config/history` · `POST /api/config/history/restore` | Review/restore retained configuration snapshots. |
|
||||
| `GET /api/status` · `GET /api/backends` | Operational status and backend observations. |
|
||||
| `GET /api/acl/dns-status` | Read-only status for configured DNS/DDNS ACL names: currently allowed A/AAAA addresses, lookup time, TTL and last error. Protected by admin session or RO/RW API token. |
|
||||
| `GET /api/cache` · `POST /api/cache/purge` · `POST /api/cache/invalidate` | Cache observations and authenticated invalidation. `GET` supports the lightweight `view=live` polling view. |
|
||||
| `GET /api/cache/rules/stats` · `GET /api/cache/rules/targets` · `POST /api/cache/rules/test` · `POST /api/cache/rules/import-vcl` | Cache rule match counters, the vhosts a rule can target (ordinary and generated Docker vhosts), simulation of saved or draft rules for a test request/response (also for Docker vhosts), and conversion of a VCL subset into rules (nothing is saved). See [Cache rules](CACHE.md#cache-rules-vcl-style) and the [supported VCL import matrix](VCL.md). |
|
||||
| `POST /api/policy/import-haproxy` · `POST /api/policy/test` | Convert a strictly supported HAProxy snippet into a policy draft, or evaluate policy rules against a supplied fixture with a trace. Neither endpoint saves configuration. See [HTTP policy rules](POLICY.md). |
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ RustProxy is a single service that combines a reverse proxy, a static/PHP web se
|
||||
|
||||
- Static sites and downloads served from reusable **Web Services** shared by several Vhosts.
|
||||
- Index files, optional directory listing, MIME mapping and attachment extensions.
|
||||
- `try_files`, regex rewrites and a safe subset of Apache `.htaccess` rules.
|
||||
- `try_files`, regex rewrites and a safe subset of Apache `.htaccess` rules, including status-only `RedirectMatch 404` / `410` rules without `Location`.
|
||||
- Conditional requests (`ETag`, `Last-Modified`), byte ranges, precompressed `.br`/`.gz` sidecars and optional Linux `sendfile`.
|
||||
- Symlink policy, attack-probe blocking and header hardening presets.
|
||||
- External FastCGI: PHP-FPM pools, CGI scripts via fcgiwrap, and generic FastCGI responders; Unix or loopback TCP endpoints, script allowlists, SCRIPT_NAME mount prefixes, PATH_INFO, bounded request/resource limits, Vhost location routing and shared profiles.
|
||||
@@ -52,7 +52,7 @@ RustProxy is a single service that combines a reverse proxy, a static/PHP web se
|
||||
|
||||
## Access and security
|
||||
|
||||
- IP/CIDR and DNS/DDNS allow/deny rules, reusable ACL profiles (up to eight per Vhost).
|
||||
- IP/CIDR and DNS/DDNS allow-only names with periodic A/AAAA refresh, a fail-closed resolver, diagnostics in ACL profiles and a read-only status API; reusable ACL profiles (up to eight per Vhost).
|
||||
- Country allow/deny lists with automatic GeoIP database updates and a searchable country picker in global and Vhost security settings.
|
||||
- Request rate limiting per Vhost and globally, with burst and `Retry-After`.
|
||||
- HTTP method policy, request Content-Type denylist and User-Agent blocking.
|
||||
|
||||
@@ -74,6 +74,8 @@ Plain words search stored values; quotes allow spaces, `!` negates a clause, `*`
|
||||
|
||||
RustProxy can persist warnings/errors and selected protocol failures separately from access traffic. Set output level, sink and optional retention/rotation under **Settings → Logging** and related error-log controls. Access logs may use the global structured file or per-Vhost locations. Log paths must be writable by the service identity, including when running inside a container/systemd sandbox.
|
||||
|
||||
**DNS/DDNS ACL diagnostics:** a failed DNS refresh logs `ACL DDNS resolution failed` with `hostname` and `reason` (timeout, OS resolver failure, empty or invalid A/AAAA answer). The error-file sink records this warning when enabled. Successful DNS refreshes and changes to the resolver inventory are informational events normally found via `journalctl -u rustproxy`, not warning/error records. For both successful and failed lookups, use **ACL profiles → DNS/DDNS ACL resolver status** or authenticated `GET /api/acl/dns-status` to see the last query result, permitted addresses and refresh time. A resolved name with the wrong client IP is an ACL mismatch, not a DNS error; see [Access](ACCESS.md#diagnose-dynamic-dns-access).
|
||||
|
||||
The installed Linux deployment may configure `logrotate` for durable logs; check the installed policy rather than assuming all platforms rotate automatically. Logging is bounded/asynchronous where practical, and some records can be dropped under saturation; inspect sink drop/error counters in monitoring.
|
||||
|
||||
## Privacy and investigation
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
Start with a reproducible request, its hostname/path and the exact listener. Compare **Vhost**, **Backend**, **Cache**, **Logs** and the service journal before changing multiple settings at once.
|
||||
|
||||
## DNS/DDNS ACL name resolves but a client is blocked
|
||||
|
||||
Open **ACL profiles -> DNS/DDNS ACL resolver status** (or authenticated `GET /api/acl/dns-status`). Check that the hostname appears and that its state is `resolved`; compare its A/AAAA address list to the actual incoming client IP as seen by the proxy. `pending` means no completed attempt, `failed` includes the OS resolver error, and `expired` means the previous addresses are no longer usable. A `resolved` entry that does not contain the actual IP grants no access. A missing hostname means the active configuration does not contain that DNS rule. The error log records failed refreshes, not successful lookups or IP mismatches. Test `getent ahosts <hostname>` on the RustProxy host/container, verify DNS reachability, and inspect the ACL profile, Vhost, global rules and trusted proxy IP handling. Do not set default access to `allow` to bypass a failed DNS rule.
|
||||
|
||||
## Quick symptoms
|
||||
|
||||
| Symptom | First checks |
|
||||
|
||||
@@ -59,6 +59,8 @@ An optional bounded Apache-style `.htaccess` compatibility layer supports a **su
|
||||
|
||||
With **Strict unsupported-directive mode disabled**, harmless unimplemented directives (such as `ErrorDocument` and unsupported `Options` tokens) are skipped and logged as warnings during Web Service validation/apply; inspect the server logs or expand **Skipped .htaccess directives** on the Web Service card for file/line locations. They do **not** become active Apache functionality. Unsupported security/handler syntax is still rejected to avoid unintentionally exposing protected content.
|
||||
|
||||
`RedirectMatch 404 /\.` is accepted as a **status-only rule**: a matching request returns HTTP 404 without a `Location` header. `Redirect gone /old` and `RedirectMatch 410 <regex>` similarly return HTTP 410, while ordinary `Redirect 301 /old /new` and `RedirectMatch 302 <regex> /replacement` retain redirect behavior. This works without `RewriteEngine`. Safety filters for protected paths still run before rewrites and can return 403 for a hidden or otherwise forbidden file. `ErrorDocument`, unsupported `Options` values and `AcceptPathInfo` are still skipped with warnings when Strict is off; they do **not** enable their Apache semantics. If your application needs PHP `PATH_INFO`, enable it in the FastCGI Web Service settings instead; see [FastCGI](FASTCGI.md).
|
||||
|
||||
For common Apache 2.2 migrations, `Order deny,allow`, `Order allow,deny`, `Order mutual-failure`, `Allow from all` / `Deny from all`, and `Allow from` / `Deny from` explicit IP addresses or CIDR networks (IPv4/IPv6) are supported and **enforced** using the actual client IP. For instance, `Deny from all` blocks the affected directory, returning HTTP 403; it is not silently ignored. `Order allow,deny` denies unmatched clients by default, while `Order deny,allow` allows them by default. Hostname-based ACLs and other unsupported access/authentication constructs fail validation even with Strict disabled. Test allow/deny cases after migrating; legacy access rules are not a general Apache authorization emulator.
|
||||
|
||||
## Admin editor layout
|
||||
|
||||
Reference in new issue
Block a user