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

Add support for checking IPv6 addresses #8

Open
mlandauer opened this issue Sep 16, 2020 · 3 comments
Open

Add support for checking IPv6 addresses #8

mlandauer opened this issue Sep 16, 2020 · 3 comments

Comments

@mlandauer
Copy link
Contributor

I've just discovered an interesting situation where our IPv4 address isn't listed on any lists but our IPv6 address is.

So, it would be good to add support to this gem to be able to check IPv6 addresses.

@chrislee35 is this of interest to you? Is this something you would like to do or would you be happy to look at a PR if I was to work on the feature?

@chrislee35
Copy link
Owner

I wonder which lists support ipv6 and how they encode them ips. Sure, I'd be interested in adding support on IPv6. I'll start researching this and putting my notes here.

@chrislee35
Copy link
Owner

Looks like if I put an ipv6 address into IPAddr.new then call reverse on the address, it'll do any decompression of the ipv6 notation and reverse the octets for me. Now to do some testing.
a = "2607:f8b0:4004:805::2004"
b = IPAddr.new(a)
b.reverse.gsub('.ip6.arpa', '')
=> "4.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.5.0.8.0.4.0.0.4.0.b.8.f.7.0.6.2"

@chrislee35
Copy link
Owner

So my test client is sending well-formed queries, but without a test vector, I cannot guarantee that I would interpret the return codes correctly. Is there an RFC describing DNSBLs and test vectors?

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

2 participants