Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get client ip #1289

Closed
Yannik opened this issue Jul 19, 2021 · 1 comment
Closed

get client ip #1289

Yannik opened this issue Jul 19, 2021 · 1 comment

Comments

@Yannik
Copy link

Yannik commented Jul 19, 2021

Hi Miek,

I'm a user of acme-dns, which attaches to miekg/dns using dns.handleFunc(). The handler function gets passed a dns.Responsewriter and dns.Msg.

There are multiple users which have issues with dns spammers.
Would it be possible to add the client IP to the dns.Msg to be able to filter/log malicious clients? As far as I could see there is no way to determine the client ip from a dns.Msg at the moment. (If there is, I'd be glad about a hint on how to do it!)

Best regards
Yannik

@Yannik
Copy link
Author

Yannik commented Jul 19, 2021

Looks like the IP can be accessed using dns.Responsewriter.RemoteAddr(), and I was simply looking in the wrong place.

@Yannik Yannik closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant