Comments (9)
There's a special case where the IP (or IP range) to be excluded falls within these reserved ranges:
* 10.0.0.0 - 10.255.255.255
* 172.16.0.0 - 172.31.255.255
* 192.168.0.0 - 192.168.255.255
I'm going to roll the requirements in from #567. Visitors with HTTP_CLIENT_IP or HTTP_X_FORWARDED_FOR, IP addresses in the private IP address ranges should instead use the first public address in the list, falling back to $_SERVER!['REMOTE_ADDR'].
Also, it looks like there are a couple of unreachable codepaths in the current implementation of getIp() which should be reviewed.
from matomo.
In http://forum.piwik.org/index.php?showtopic=1540 there's a mod to Provider to map local IP addresses to internal "provider" names, eg "net1", "net2", ...
from matomo.
this has become by far the most requested feature - receiving messages twice a day asking for this feature. We should push it in the product.
from matomo.
(In [1970]) Fixes #5463
- modify websites admin UI, API to add a column Exclude IPs
- IPs contain wildcards, unlimited IPs per website
- below the website table, added a "Global IP exclude" list. Ips there are excluded from all websites automatically.
- IPs are stored in the tracker cache file for fast access at Tracking time.
- added new field in website table "excluded_ips"
- refactored the ajax loading/error display to allow multiple loading/error div per page
from matomo.
Known limitations
- does not work with IPv6 addresses
- I haven't researched the getIpString() function as explained by Anthon in [#comment:10] - feel free to pick it up from there
from matomo.
I see the code uses ip2long() and <= => for comparisons. This smells like a latent bug. Since longs are signed, we have to make sure IPs in the range of 128.0.0.0-255.255.255.255 are handled correctly. Re-opening so we can add isVisitorIpExcluded() testable via unit tests.
re: #comment:10, I've re-opened #567.
from matomo.
ouch you're right, thanks for the review!
from matomo.
(In [1972]) Fixes #5463
Adding tests that prove that the code was working as expected (I got lucky :)
the IP 255.255.255.* is stored in the config file as:
array (
0 => -256,
1 => -1,
),
which passes the test >= && <= as expected
from matomo.
(In [1977]) refs #5463 - getIp() returns a stringified, unsigned number; changed unit test to match getIp()'s behaviour; SitesManager converts min/max to non-negative numbers
from matomo.
Related Issues (20)
- Export a report as a pdf
- Add the possibility to zoom on the map without clicking HOT 1
- Goal restrictions: make them available for some users only HOT 1
- Goal type: give the possibility for end users to categorize their goals
- Search/filter feature on the visit log page HOT 1
- Let the metrics/statistics window open
- Give the possibility to categorize/label segments
- Real time visit log updated when using HeartBeatTimer HOT 1
- [Bug] Discrepancy in Matomo Statistics for Confluence Pages HOT 1
- [Bug] Updating scheduled email report fails if goal has been deleted
- [Bug] Redirect issue when editing a goal
- Add possibility to customize icon of events per event category
- Optional Order ID
- [Bug] Plugin on activated does not load `configs.php` and results in \DI\NotFoundException
- [Bug] Segments: Filtering by country results in inconsistent data HOT 4
- how to track network status ? HOT 1
- [Bug] double metric _paq.push(['trackSiteSearch', false, false]) HOT 2
- [Bug]: Expand βOthersβ section for Pages not working
- [Bug] URL decoding should not be used when saving regular expressions
- Cross-visit Reports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo.