From e97c740d09775eafd96350368f3206a4740afd47 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Wed, 14 Dec 2022 13:45:05 +0530 Subject: [PATCH] GeoIP-DNS --- master/geo.conf | 19 +++++++++++++++++++ master/knot.conf | 18 +++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 master/geo.conf diff --git a/master/geo.conf b/master/geo.conf new file mode 100644 index 0000000..a263ab2 --- /dev/null +++ b/master/geo.conf @@ -0,0 +1,19 @@ +gcdn.vern.cc: + - geo: "*;*;*" + A: 5.161.108.85 + TXT: "Worldwide (US Server)" + - geo: "AS;*;*" + A: 192.46.210.187 + TXT: "Asia (India Server)" + - geo: "EU;*;*" + A: 192.46.210.187 + TXT: "Europe (India Server Currently)" + - geo: "EU;NO;*" + A: 5.161.108.85 + TXT: "New York (Norway speeds are better to our US Server than India one)" + - geo: "AF;*;*" + A: 192.46.210.187 + TXT: "Africa (India Server Currently)" + - geo: "OC;*;*" + A: 192.46.210.187 + TXT: "Oceania (India Server Currently)" diff --git a/master/knot.conf b/master/knot.conf index b72af5a..b11c6fc 100644 --- a/master/knot.conf +++ b/master/knot.conf @@ -1,8 +1,8 @@ -# This file must be placed in /etc/knot/knot.conf server: rundir: "/run/knot" user: knot:knot - listen: [ 127.0.0.1@53, ::1@53, 139.144.17.216@53 ] + listen: 0.0.0.0@53 + listen: ::@53 log: - target: syslog @@ -13,20 +13,27 @@ database: remote: - id: secondary - address: 167.114.67.70@53 + address: 192.46.210.187@53 acl: - id: acl_secondary - address: 167.114.67.70 + address: 192.46.210.187 action: transfer template: - id: default - storage: "/var/lib/knot/zones" + storage: "/etc/knot/zones" file: "%s.zone" dnssec-signing: on semantic-checks: on +mod-geoip: + - id: geo + config-file: "/etc/knot/geo.conf" + mode: geodb + geodb-file: "/var/lib/knot/GeoLite2-City.mmdb" + geodb-key: [ continent/code, country/iso_code, city/names/en ] + zone: - domain: vern0.me notify: secondary @@ -34,3 +41,4 @@ zone: - domain: vern.cc notify: secondary acl: acl_secondary + module: mod-geoip/geo