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
{{ message }}
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.
Add a new column showing the PTR record of the client's IP address.
Wich would be the lightest way of doing this avoiding to make a dns lookup each second?
The text was updated successfully, but these errors were encountered:
I'd rather add it in the same column as it's currently displaying the ip address. However this should not penalize the performance of the display... To do so I'd suggest to do the following:
Use some sort of dns cache and cache each entry once it's done. This cache does not need to be persistent and can be stored just in memory. I think there are some implementations already done in python but it should not be so difficult to implement a new one.
Each dns query should be asynchronous so it does not stop the main loop. If we still don't have the name resolved when the screen is updated, the ip address should be displayed instead.
It sounds wise.
The main challenge is to do the queries in an asynchronous way.
When you say "If we still don't have the name resolved when the screen is updated, the ip address should be displayed instead.", Do you mean the IP address should be replaced with the reverse once it is resolved?
I think it would be better to show both when possible (some IPs don't have a PTR record).
I don't think it makes sense to add a new column to show the same information. At the end what you want to know is the host who is doing the connection, so if you can resolve the fqdn then it should be printed. Otherwise just print the ip.
Also, a commandline parameter to disable this feature would be nice.
Add a new column showing the PTR record of the client's IP address.
Wich would be the lightest way of doing this avoiding to make a dns lookup each second?
The text was updated successfully, but these errors were encountered: