Skip to content

Fix RFC 5737 IP filtering and explicit private network ranges (fixes #2) - #10

Open
KingUdo wants to merge 1 commit into
mainfrom
issue-2-rfc5737-ip-handling
Open

KingUdo wants to merge 1 commit into
mainfrom
issue-2-rfc5737-ip-handling

Conversation

@KingUdo

@KingUdo KingUdo commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Defined explicit private network ranges (PRIVATE_NETWORKS) covering RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), IPv4 loopback/link-local (127.0.0.0/8, 169.254.0.0/16), and IPv6 loopback/link-local/ULA (::1/128, fe80::/10, fc00::/7).
  • Replaced standard Python ip_obj.is_private in is_private_ip() to prevent documentation/test address blocks like RFC 5737 (203.0.113.0/24) from being incorrectly classified as private networks.
  • Added root .gitignore ignoring IDE and test artifact caches.
  • Fixes RFC 5737 documentation IP addresses treated as private causing dropped attacks and test failures #2.

Testing

Ran unit tests verifying RFC 1918 addresses are recognized as private and documentation/public IPs pass through:

pytest src/test_simple.py src/test_end2end.py::TestMonitorEndToEnd::test_attack_submission_structure src/test_integration.py::TestMonitorIntegration::test_private_ip_detection src/test_integration.py::TestMonitorIntegration::test_attack_submission_structure -v

All 6 tests passed.

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

Successfully merging this pull request may close these issues.

RFC 5737 documentation IP addresses treated as private causing dropped attacks and test failures

1 participant