Skip to content

Commit cf10524

Browse files
authored
Update README.md instructions - missing config
The example dbip.conf configuration should include: Setting lan-IPs and loading ISO country codes to avoid [emerg] errors Signed-off-by: pgherkin <[email protected]>
1 parent 2215a49 commit cf10524

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Follow these steps to enable the dbip mod:
1818
4. Edit `/config/nginx/dbip.conf` and add countries to the blocklist / whitelist according to the comments, for example:
1919

2020
```nginx
21+
geoip2 /config/geoip2db/dbip-country-lite.mmdb {
22+
auto_reload 1w;
23+
$geoip2_data_country_iso_code country iso_code;
24+
}
25+
2126
map $geoip2_data_country_iso_code $geo-whitelist {
2227
default no;
2328
UK yes;
@@ -27,6 +32,12 @@ Follow these steps to enable the dbip mod:
2732
default yes;
2833
US no;
2934
}
35+
36+
geo $lan-ip {
37+
default no;
38+
192.168.0.0/24 yes;
39+
172.20.0.0/16 yes;
40+
}
3041
```
3142
5. Use the definitions in the following way:
3243
```nginx

0 commit comments

Comments
 (0)