You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
A high-performance caching proxy server that sits in front of OWL reasoning services to dramatically speed up query responses. Built on NGINX Alpine with a 6-month cache TTL, stale-while-revalidate pattern, and 5-year disk retention so a cached response is always available.
6
6
7
+
The proxy also includes security guardrails to refuse common scanner/probing requests before they reach Owlery, with optional IP block and whitelist files under `/logs`.
8
+
7
9
## Usage Examples
8
10
9
11
### Basic Usage
@@ -29,6 +31,9 @@ services:
29
31
ports:
30
32
- "80:80"
31
33
- "8080:8080"
34
+
volumes:
35
+
- /cache:/var/cache/nginx
36
+
- /logs:/logs
32
37
environment:
33
38
- UPSTREAM_SERVER=owl:8080 # For production with owl service
34
39
- CACHE_MAX_SIZE=1t # 1TB cache size for high-traffic deployments
@@ -93,6 +98,35 @@ Example response:
93
98
-`STATUS_POLL_INTERVAL`: Seconds between `/status` refreshes (default: `5`)
94
99
-`HEALTH_LOG_INTERVAL`: Seconds between periodic upstream health log lines when state is unchanged (default: `300`)
95
100
101
+
### Security Filtering and Blocking
102
+
103
+
-**Probe filtering**: Requests matching common probing signatures (for example `*.php`, `wp-login.php`, `.env`, `phpmyadmin`, path traversal payloads) are immediately refused with HTTP `403` and are **not** forwarded upstream.
104
+
-**Probe log output**: Refused probe requests are logged to `/logs/hacks/probes.log`, including both raw `X-Forwarded-For` and the extracted left-most client IP.
105
+
-**Manual IP blocklist**: Add one IPv4/IPv6 address per line in `/logs/blocked.txt` (comments allowed with `#`).
106
+
-**Manual IP whitelist**: Add one IPv4/IPv6 address per line in `/logs/whitelist.txt` (comments allowed with `#`).
107
+
108
+
Example `/logs/blocked.txt`:
109
+
110
+
```txt
111
+
203.0.113.10
112
+
# office VPN egress
113
+
2001:db8::1234
114
+
```
115
+
116
+
Example `/logs/whitelist.txt`:
117
+
118
+
```txt
119
+
203.0.113.50
120
+
# trusted monitoring source
121
+
2001:db8::beef
122
+
```
123
+
124
+
Blocked IP requests return HTTP `403` and are logged to `/logs/hacks/blocked.log`.
125
+
126
+
Whitelist entries take precedence over both the blocklist and probe filter.
127
+
128
+
Blocklist/whitelist entries are loaded when the container starts. If you update `/logs/blocked.txt` or `/logs/whitelist.txt`, restart the container to apply changes.
0 commit comments