Comparing IPv4 with it's IPv6 equivalent
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to compare a req ip with a list of AWS ip ranges provided by Amazon here: http://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html#aws-ip-download
The problem i'm having, is the req ip seems to be in the format `:::ffff:111.222.33.44` and the list of ranges is simple IPv4 format.
Using `if (ip.cidrSubnet(ip_prefix).contains(clients))` always returns false.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cidrSubnet and contains calls described in the issue, then reproduce the comparison using the mapped IPv6 form :::ffff:111.222.33.44 and an AWS IPv4 range. Done means an equivalent IPv4 request address is compared correctly against the listed IPv4 ranges.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100