<div style="font-family: Arial, sans-serif; font-size: 14px;"><span style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">Hello,</span><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">I am a new user in bind9.</div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">I have setup my DNS server with port 53, port 443 (DoH), and port 853 (DoT). And now, in my logging file of <span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">`queries` category, one query example shows as below:</span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> <span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">26-Nov-2024 03:55:41.524 queries: info: client @0x7f21ba9b3000 111.11.11.109#61713 (<a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="text-decoration:underline;cursor:pointer;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">ust.hk</a>): query:<span> </span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="text-decoration:underline;cursor:pointer;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">ust.hk</a><span> </span>IN A +E(0)TK (111.111.111.999)</span><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></span></span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)">For the<span> </span><code style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 1em; white-space: pre-wrap; line-height: 1; scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);">queries</code> log like this, how can I print the service port number used by the client? For example, for this<span> </span><code style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 1em; white-space: pre-wrap; line-height: 1; scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);">queries</code> log, what I want to get is with the service port number as below:</div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> <span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">26-Nov-2024 03:55:41.524 queries: info: client @0x7f21ba9b3000 111.11.11.109#61713 (</span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="text-decoration: underline; cursor: pointer; scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); color: blue; background-color: rgb(255, 255, 255);">ust.hk</a><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">): query:<span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> </span></span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="text-decoration: underline; cursor: pointer; scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); color: blue; background-color: rgb(255, 255, 255);">ust.hk</a><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> </span>IN A +E(0)TK (<span style="display: inline !important; background-color: rgb(255, 255, 255);">111.111.111.999</span></span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; color: rgb(237, 65, 57); background-color: rgb(255, 255, 255);">#443</span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">)</span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"> <span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">26-Nov-2024 03:55:41.524 queries: info: client @0x7f21ba9b3000 111.11.11.109#61713 (</span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); text-decoration: underline; cursor: pointer; color: blue; background-color: rgb(255, 255, 255);">ust.hk</a><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">): query:<span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> </span></span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); text-decoration: underline; cursor: pointer; color: blue; background-color: rgb(255, 255, 255);">ust.hk</a><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> </span>IN A +E(0)TK (<span style="scrollbar-width: thin; display: inline !important; background-color: rgb(255, 255, 255);">111.111.111.999</span></span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; color: rgb(237, 65, 57); background-color: rgb(255, 255, 255);">#853</span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">)</span></span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><span style="display: inline !important; background-color: rgb(255, 255, 255);"> </span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">26-Nov-2024 03:55:41.524 queries: info: client @0x7f21ba9b3000 111.11.11.109#61713 (</span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); text-decoration: underline; cursor: pointer; color: blue; background-color: rgb(255, 255, 255);">ust.hk</a><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">): query:<span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> </span></span><a href="http://ust.hk/" rel="noreferrer nofollow noopener" target="_blank" style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); text-decoration: underline; cursor: pointer; color: blue; background-color: rgb(255, 255, 255);">ust.hk</a><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><span style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"> </span>IN A +E(0)K (<span style="scrollbar-width: thin; display: inline !important; background-color: rgb(255, 255, 255);">111.111.111.999</span></span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; color: rgb(237, 65, 57); background-color: rgb(255, 255, 255);">#53</span><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">)</span><br></span></span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">How should I set up the logging config options to log the service port number? </span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">I have searched for this question on Google, and asked ChatGPT, but I only got answers to use other tools, like tcpdump. Is it possible to just config bind9 named.conf.* for this?</span></div><div style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);"><br style="scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"></span></div><span style="line-height:1.5;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)"><span style="scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); display: inline !important; background-color: rgb(255, 255, 255);">Thanks. </span></span><br></div><div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;">
</div>