Hi,
I am not able to force knot-resolver to forward some queries.
I have real DNS zone and in internal network I have few 3rd level subzones.
For them I would like to make my kresd forward queries to our internal DNS
server (bind9).
My computer is not inside company nework - connected via openvpn.
System is ubuntu 18.04.1 (up-to-date) and knot-resolver 3.0.0.
Relevant part of kresd.conf is:
policy.add(policy.suffix(
policy.FORWARD('10.0.0.1'),{
todname('sub1.company.cz'),
todname('sub2.company.cz')
}
))
dig machine.sub1.company.cz @127.0.0.53 does NOT work,
dig machine.sub1.company.cz @10.0.0.1 DOES work
I have set verbose(true) but with no help.
kresd queries 10.0.0.1 for 'company.cz' only, but that's all.
I am just working on it on my ubuntu workstation,
but real target will be turris omnia with its kresd,
which connects via openvpn to company network.
--
Sincerely
Ivo Panacek
Dear Knot Resolver users,
Is it possible to create a view with more than one policie?
If I do for example something like this:
view:addr('192.168.1.0/24',
policy.suffix(
policy.PASS,
policy.todnames({'good.com','better.com','best.com'})
)
)
view:addr('192.168.1.0/24',
policy.suffix(
policy.REFUSE,{todname('bad.com')}
)
)
Knot resolver will obey only the first view and users will be able to resolve the bad.com domain ... obviously the first view is the match and no other views are considered afterwards ...
Without multiple policies views are pretty much useless so I believe that I must be doing something wrong here so could anybody help me on this ...
Best regards,
Bratislav ILIC
Dear Knot Resolver users,
Knot Resolver 3.0.0 has been released.
Incompatible changes
--------------------
- cache: fail lua operations if cache isn't open yet (!639)
By default cache is opened *after* reading the configuration,
and older versions were silently ignoring cache operations.
Valid configuration must open cache using `cache.open()` or
`cache.size =` before executing cache operations like `cache.clear()`.
- libknot >= 2.7.1 is required, which brings also larger API changes
- in case you wrote custom Lua modules, please consult
https://knot-resolver.readthedocs.io/en/latest/lib.html#incompatible-change…
- in case you wrote custom C modules, please see compile against
Knot DNS 2.7 and adjust your module according to messages from C
compiler
- DNS cookie module (RFC 7873) is not available in this release,
it will be later reworked to reflect development in IEFT dnsop working
group
- version module was permanently removed because it was not really used
by users; if you want to receive notifications about new releases
please subscribe to
https://lists.nic.cz/cgi-bin/mailman/listinfo/knot-resolver-announce
Bugfixes
--------
- fix multi-process race condition in trust anchor maintenance (!643)
- ta_sentinel: also consider static trust anchors not managed via
RFC 5011
Improvements
------------
- reorder_RR() implementation is brought back
- bring in performace improvements provided by libknot 2.7
- cache.clear() has a new, more powerful API
- cache documentation was improved
- old name "Knot DNS Resolver" is replaced by unambiguous "Knot
Resolver" to prevent confusion with "Knot DNS" authoritative server
Full changelog:
https://gitlab.labs.nic.cz/knot/knot-resolver/raw/v3.0.0/NEWS
Sources:
https://secure.nic.cz/files/knot-resolver/knot-resolver-3.0.0.tar.xz
GPG signature:
https://secure.nic.cz/files/knot-resolver/knot-resolver-3.0.0.tar.xz.asc
Documentation:
https://knot-resolver.readthedocs.io/en/v3.0.0/
--
Tomas Krizek
PGP: 4A8B A48C 2AED 933B D495 C509 A1FB A5F7 EF8C 4869
Hello,
I set config as below, but an error is output at some timing.
Although it is an error message related to policy.lua, reading the document does not know the cause.
"""
error: /usr/local/lib/kdns_modules/policy.lua:526: attempt to call local 'action' (a table value)
error: /usr/local/lib/kdns_modules/policy.lua:526: attempt to call local 'action' (a table value)
error: /usr/local/lib/kdns_modules/policy.lua:526: attempt to call local 'action' (a table value)
error: /usr/local/lib/kdns_modules/policy.lua:526: attempt to call local 'action' (a table value)
"""
"""
net.listen(net.eth0, 53, false)
-- Load Useful modules
modules = {
'policy', -- Block queries to local zones/bad sites
'view', -- Views for certain clients
'hints > iterate', -- Hints AFTER iterate
'priming', -- Initializing a DNS Resolver with Priming Queries implemented according.
'detect_time_skew', -- System time skew detector
'detect_time_jump', -- Detect discontinuous jumps in the system time
'daf',
predict = {
window = 180, -- 180 minutes sampling window
period = 24*(60/15) -- track last 24 hours
},
'bogus_log',
}
modules.list() -- Check module call order
-- stub forward
policy.add(policy.suffix(policy.PASS({'192.168.1.3@10053', '192.168.1.4@10053'}), {todname('kometch.private')}))
policy.add(policy.suffix(policy.PASS({'192.168.1.3@10053', '192.168.1.4@10053'}), {todname('168.192.in-addr.arpa') }))
--forward policy
policy.add(policy.all(policy.FORWARD({'1.1.1.1', '1.0.0.1'})))
policy.del(0)
"""
Would you please advise me?
Best regards.
Hello,
Since version 2.4.1, have the version module been deleted?
I confirmed NEWS, but I could not find a sentence to mention that the "version" module was deleted.
https://gitlab.labs.nic.cz/knot/knot-resolver/blob/master/NEWS
I have confirmed that it has been deleted from Gitlab.
Best regards.
Hi,
I'm trying to build knot-resolver with redis support. I was wondering
why the memcache and redis-stuff is commented out within the Makefile,
so I uncommented the redis-part, also in modules.mk.
Now it fails because it does not find it's own cache.h?
modules/redis/redis.c:24:10: fatal error: lib/cache.h: No such file or
directory
Regards
Bjoern
Hello Petr,
This a good news, that query source IP would be planned in the future module version.
I would like to answer your related notes like:
- How many 'most frequent' IP addresses you want to get? - It is better to do the list as variable items, someone needs to list top 10 and someone 1000.
- Should the number of addresses be configurable? yes
- Do you consider query from the same IP but different port as 'different client' or not? (E.g. clients behind NAT?) In my case, it is not a topic function.
- Should IP addresses be somehow tied to most frequent query names or not? yes, it will be better to know frequented queries to domain names.
- Do you need a way to flush the table on fly? An option to clear statistic list and count it since a specific time range sound as a good idea.
In the case when I´m not so familiar with Lua, where should be added your code part?
Best regards,
Milan Sýkora
-----Original Message-----
From: knot-resolver-users [mailto:knot-resolver-users-bounces@lists.nic.cz] On Behalf Of knot-resolver-users-request(a)lists.nic.cz
Sent: Tuesday, July 24, 2018 12:00 PM
To: knot-resolver-users(a)lists.nic.cz
Subject: knot-resolver-users Digest, Vol 31, Issue 1
Send knot-resolver-users mailing list submissions to
knot-resolver-users(a)lists.nic.cz
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nic.cz/cgi-bin/mailman/listinfo/knot-resolver-users
or, via email, send a message with subject or body 'help' to
knot-resolver-users-request(a)lists.nic.cz
You can reach the person managing the list at
knot-resolver-users-owner(a)lists.nic.cz
When replying, please edit your Subject line so it is more specific than "Re: Contents of knot-resolver-users digest..."
Today's Topics:
1. Knot resolver module stats - query source ip (Sýkora Milan)
2. Re: Knot resolver module stats - query source ip (Petr Špaček)
----------------------------------------------------------------------
Message: 1
Date: Tue, 24 Jul 2018 07:32:52 +0000
From: Sýkora Milan <milan.sykora(a)cetin.cz>
To: "knot-resolver-users(a)lists.nic.cz"
<knot-resolver-users(a)lists.nic.cz>
Subject: [knot-resolver-users] Knot resolver module stats - query
source ip
Message-ID: <365048c9e5ae48c699c079fee6343a5f(a)cewexch402.ad.cetin>
Content-Type: text/plain; charset="iso-8859-2"
Hello,
I have your cool DNS resolver in version 2.3.0, I know that was released newest version.
My question is - is it possible to explore the most frequented IP (queries source) in the module stats? Or exist any other way how to achieve it?
Many thanks for your answer in the future, Best regards.
Milan Sýkora
Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností Česká telekomunikační infrastruktura a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti Česká telekomunikační infrastruktura a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž Česká telekomunikační infrastruktura a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve>.
The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. Česká telekomunikační infrastruktura a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of Česká telekomunikační infrastruktura a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which Česká telekomunikační infrastruktura a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nic.cz/pipermail/knot-resolver-users/attachments/20180724/cc47…>
------------------------------
Message: 2
Date: Tue, 24 Jul 2018 11:05:51 +0200
From: Petr Špaček <petr.spacek(a)nic.cz>
To: knot-resolver-users(a)lists.nic.cz
Subject: Re: [knot-resolver-users] Knot resolver module stats - query
source ip
Message-ID: <2a769de2-3b70-7d6f-5476-4bc7bd48fa8b(a)nic.cz>
Content-Type: text/plain; charset=UTF-8
Hello,
at the moment there is no built-in module with this statistics but it can be hacked around (see below).
BTW we plan to to rework stats so it would be very valuable to get your requirements!
To make sure future version contains what you need, can you specify what kind of data + what configuration you want to get? For example:
- How many 'most frequent' IP addresses you want to get?
- Should the number of addresses be configurable?
- Do you consider query from the same IP but different port as 'different client' or not? (E.g. clients behind NAT?)
- Should IP addresses be somehow tied to most frequent query names or not?
- Do you need a way to flush the table on fly?
For now you can use the following Lua config snippet to log client IP addresses.
-- start of config snippet
function LOG_IP(state, req)
req = kres.request_t(req)
if req.qsource == nil or req.qsource.addr == nil then
-- internal request, no source
return state end
print('query from IP ' .. tostring(req.qsource.addr))
return -- continue with other policy rules end
policy.add(policy.all(LOG_IP))
-- end of config snipper
Output looks like this:
"query from IP ::1#56927"
This can be further processed by your log processing system to get aggregate numbers over all resolvers or alternativelly it can be extended using LRU library in Lua to get stats for single resolver.
I hope it helps.
Petr Špaček @ CZ.NIC
On 24.7.2018 09:32, Sýkora Milan wrote:
> Hello,
>
>
>
> I have your cool DNS resolver in version 2.3.0, I know that was
> released newest version.
>
>
>
> My question is – is it possible to explore the most frequented IP
> (queries source) in the module stats? Or exist any other way how to
> achieve it?
>
>
>
>
>
> Many thanks for your answer in the future,
>
> Best regards.
>
> *Milan Sýkora***
------------------------------
Subject: Digest Footer
--
https://lists.nic.cz/cgi-bin/mailman/listinfo/knot-resolver-users
Please change Subject line before before you reply to a digest message!
------------------------------
End of knot-resolver-users Digest, Vol 31, Issue 1
**************************************************
Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností Česká telekomunikační infrastruktura a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti Česká telekomunikační infrastruktura a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž Česká telekomunikační infrastruktura a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve>.
The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. Česká telekomunikační infrastruktura a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of Česká telekomunikační infrastruktura a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which Česká telekomunikační infrastruktura a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve>.
Hello,
I have your cool DNS resolver in version 2.3.0, I know that was released newest version.
My question is - is it possible to explore the most frequented IP (queries source) in the module stats? Or exist any other way how to achieve it?
Many thanks for your answer in the future,
Best regards.
Milan Sýkora
Obsah této zprávy má výlučně komunikační charakter. Nepředstavuje návrh na uzavření smlouvy či na její změnu ani přijetí případného návrhu. Smlouvy či jejich změny jsou společností Česká telekomunikační infrastruktura a.s. uzavírány v písemné formě nebo v podobě a postupem podle příslušných všeobecných podmínek společnosti Česká telekomunikační infrastruktura a.s., a pokud jsou dohodnuty všechny náležitosti. Smlouvy jsou uzavírány oprávněnou osobou na základě písemného pověření. Smlouvy o smlouvě budoucí jsou uzavírány výhradně v písemné formě, vlastnoručně podepsané nebo s uznávaným elektronickým podpisem. Podmínky, za nichž Česká telekomunikační infrastruktura a.s. přistupuje k jednání o smlouvě a jakými se řídí, jsou dostupné zde<https://www.cetin.cz/cs/jak-cetin-vyjednava-o-smlouve>.
The content of this message is intended for communication purposes only. It does neither represent any contract proposal, nor its amendment or acceptance of any potential contract proposal. Česká telekomunikační infrastruktura a.s. concludes contracts or amendments thereto in a written form or in the form and the procedure in accordance with relevant general terms and conditions of Česká telekomunikační infrastruktura a.s., if all requirements are agreed. Contracts are concluded by an authorized person entitled on the basis of a written authorization. Contracts on a future contract are concluded solely in a written form, self-signed or signed by means of an advanced electronic signature. The conditions under which Česká telekomunikační infrastruktura a.s. negotiates contracts and under which it proceeds are available here<https://www.cetin.cz/en/jak-cetin-vyjednava-o-smlouve>.