-
-
Notifications
You must be signed in to change notification settings - Fork 219
[feature] Base setup for WHOIS model #1032 #1033 #1037 #1045 #1054
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
Merged
+1,376
−11
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
2d18e68
[feature] Base setup for WHOIS model #1032 #1033
DragnEmperor c78239f
[tests] Added tests for WHOIS creation #1045
DragnEmperor d1169d4
[change] Added Org Config for WhoIs feature #1037
DragnEmperor 667f9e4
[change] Altered address field to JSONField
DragnEmperor 3949a2e
[change] Migrate to ip mapping instead of device
DragnEmperor 01b6dec
[change] Added abstraction to WhoIs related functions
DragnEmperor 17af187
[change] Refactored WhoIsService, tasks, test cases
DragnEmperor 45ec982
[change] Added cache for org config, refactoring
DragnEmperor 810ee7b
[change] Migrate signal receivers to WhoIs model
DragnEmperor 9f8de4d
[change] Restructured imports
DragnEmperor 1168721
[fix] Return from task if WhoIs exists
DragnEmperor da6b790
[change] Simplified checks
DragnEmperor 520d601
[fix] Replace country name with iso_code
DragnEmperor 97b5303
[change] Add new test case, format address
DragnEmperor 093d3ca
[change] Modify WhoIs handling as a feature
DragnEmperor 592eb3a
[change] Remove WhoIs field if not configured
DragnEmperor 6cb4ba6
[qa] Minor formatting
DragnEmperor dff447c
[chores] Cleanup redundant lines, checks reordered
DragnEmperor c13e6e4
[change] Rename who_is files/directories
DragnEmperor bced848
[docs] Revised whois docs
nemesifier a8a6930
[chores] Update docs, refactoring, update sample app
DragnEmperor 95e84fc
[chores] Original order of fields in Organization admin
DragnEmperor 2e0f812
[chores] Remove outdated registration condition in admin
DragnEmperor 1c0028b
[docs] Improvements and simplifications
nemesifier f253ceb
[docs] Updated WHOIS Admin image in settings
DragnEmperor d277659
[tests] Added test case for no WHOIS record
DragnEmperor 81b83be
[tests] Added test case for asserting handlers
DragnEmperor 7b9179c
[tests] Added test for org settings cache
DragnEmperor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
WHOIS Lookup | ||
============ | ||
|
||
.. important:: | ||
|
||
The **WHOIS Lookup** feature is **disabled by default**. | ||
|
||
To enable it, follow the `setup steps | ||
<controller_setup_whois_lookup_>`_ below. | ||
|
||
.. contents:: **Table of contents**: | ||
:depth: 1 | ||
:local: | ||
|
||
Overview | ||
-------- | ||
|
||
The WHOIS Lookup feature displays information about the public IP address | ||
used by devices to communicate with OpenWISP (via the ``last_ip`` field). | ||
It helps identify the geographic location and ISP associated with the IP | ||
address, which can be useful for troubleshooting network issues. | ||
|
||
The retrieved information pertains to the Autonomous System (ASN) | ||
associated with the device's public IP address and includes: | ||
|
||
- ASN (Autonomous System Number) | ||
- Organization name that owns the ASN | ||
- CIDR block assigned to the ASN | ||
- Physical address registered to the ASN | ||
- Timezone of the ASN's registered location | ||
|
||
Trigger Conditions | ||
------------------ | ||
|
||
A WHOIS lookup is triggered automatically when: | ||
|
||
- A new device is registered. | ||
- A device fetches its checksum. | ||
|
||
However, the lookup will only run if **all** the following conditions are | ||
met: | ||
|
||
- The device's last IP address is **public**. | ||
- There is **no existing WHOIS record** for that IP. | ||
- WHOIS lookup is **enabled** for the device's organization. | ||
|
||
Behavior with Shared IP Addresses | ||
--------------------------------- | ||
|
||
If multiple devices share the same public IP address and one of them | ||
switches to a different IP, the following occurs: | ||
|
||
- A lookup is triggered for the **new IP**. | ||
- The WHOIS record for the **old IP** is deleted. | ||
- The next time a device still using the old IP fetches its checksum, a | ||
new lookup is triggered, ensuring up-to-date data. | ||
|
||
.. note:: | ||
|
||
When a device with an associated WHOIS record is deleted, its WHOIS | ||
record is automatically removed. | ||
|
||
.. _controller_setup_whois_lookup: | ||
|
||
Setup Instructions | ||
------------------ | ||
|
||
1. Create a MaxMind account: `Sign up here | ||
<https://www.maxmind.com/en/geolite2/signup>`_. | ||
|
||
If you already have an account, just **Sign In**. | ||
|
||
2. Go to **Manage License Keys** in your MaxMind dashboard. | ||
3. Generate a new license key and name it as you prefer. | ||
4. Copy both the **Account ID** and **License Key**. | ||
5. Set the following settings accordingly: | ||
|
||
- Set :ref:`OPENWISP_CONTROLLER_WHOIS_ENABLED` to ``True``. | ||
- Set :ref:`OPENWISP_CONTROLLER_WHOIS_GEOIP_ACCOUNT` to **Account ID**. | ||
- Set :ref:`OPENWISP_CONTROLLER_WHOIS_GEOIP_KEY` to **License Key**. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.