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
In DNS.J library comments there is this setting (2):
0: No decoding, minimal processing required to strip packet from HTTP wrapper (fastest)
1: Parse DNS Header and Question. We can log the Question, Class, Type, and Result Code 2: As 1, but also parse answers. We can log the answers, and also cache responses in HTTP Content-Cache
3: Very Verbose, log everything as above, but also write packet data to error log (slowest)
Can you give me an example of getting a this answer? To write in access_log not only $dns_qname but also the answer.
Something like this: www.baidu.com IN A DNS Answer: www.baidu.com 782 IN CNAME www.a.shifen.com; www.a.shifen.com 103 IN A 61.135.169.125; www.a.shifen.com 103 IN A 61.135.169.121;
And second question about nginx javascript.
Is there any way to make a shell command call from the nginx.conf file?
There is a need to transfer DNS answer IP to my router via SSH channel. The script itself is there and it works. Selected IP addresses are immediately added to the corresponding Address Lists of my Mikrotik with control commands. The only question is how to pass IP itself from nginx.conf and make SSH call. On the forums mostly suggest Lua for this purpose.
At the moment I can selectively log the domains I want. In the Address Lists of my Mikrotik, I can either forward IPs or domains. But IP is more preferable for me.
log_format dns '$dns_qname';
access_log /var/log/nginx/dns-access.log dns if=$logme;
Hi,
Thank you so much for such a great library.
In DNS.J library comments there is this setting (2):
0: No decoding, minimal processing required to strip packet from HTTP wrapper (fastest)
1: Parse DNS Header and Question. We can log the Question, Class, Type, and Result Code
2: As 1, but also parse answers. We can log the answers, and also cache responses in HTTP Content-Cache
3: Very Verbose, log everything as above, but also write packet data to error log (slowest)
Can you give me an example of getting a this answer? To write in access_log not only $dns_qname but also the answer.
Something like this:
www.baidu.com IN A DNS Answer: www.baidu.com 782 IN CNAME www.a.shifen.com; www.a.shifen.com 103 IN A 61.135.169.125; www.a.shifen.com 103 IN A 61.135.169.121;
And second question about nginx javascript.
Is there any way to make a shell command call from the nginx.conf file?
There is a need to transfer DNS answer IP to my router via SSH channel. The script itself is there and it works. Selected IP addresses are immediately added to the corresponding Address Lists of my Mikrotik with control commands. The only question is how to pass IP itself from nginx.conf and make SSH call. On the forums mostly suggest Lua for this purpose.
At the moment I can selectively log the domains I want. In the Address Lists of my Mikrotik, I can either forward IPs or domains. But IP is more preferable for me.
log_format dns '$dns_qname';
access_log /var/log/nginx/dns-access.log dns if=$logme;
map $dns_qname $logme {
hostnames;
*.cdninstagram.com 1;
default 0;
}
And I can create some daemon to track changes in the log file with further SSH call. But I want a more elegant solution.
Thanx!
The text was updated successfully, but these errors were encountered: