Piwik not showing exact ip address - matomo

I am running Piwik for users in a LAN subnet of 192.168.x.x . All visitors' IP address is logged as 192.168.0.0 instead of an exact IP address.
How can I get Piwik to track the exact IP address?

This is a Piwik privacy setting. Go to Settins -> System -> Privacy. You have the options to mask IPs or collect full IPs.
More Info: https://piwik.org/docs/privacy/#step-1-automatically-anonymize-visitor-ips

Related

what does "On Your Network" in React mean

What does "On Your Network" mean when I run npm start in a React Project
see image
what does On Your Network: http://192.168.56.1:3000 mean
"On your network" in this context means from another computer that's connected to the same network (eg. the same Wifi network). You could browse your locally-hosted React app from your phone, for example. That IP address is your computer's local IP address (which is different from your public IP address).
"on your network" means that on your local network like your wifi you can access your web page in your local network (that can be your phone or any computer or internet enabled device on your wifi) with that ip address. just type http://192.168.56.1:3000 in your browser.

Google Cloud Instance External Ip not responding /

My Instance was working fine with domain and everything but then i made a change in php.ini to upload file size and restarted the instance. Since then i am not able to access my site. I am able to ping to external ip from commandline but when i try to visit the domain or the ip I get the error .
This site can’t be reached . site.com took too long to respond.
Whats strange is that when i access site.com/anyrandomstring . I get page not found error 404, just html no css or anything else loaded. These are my firewall configs.
default-allow-http
http-server
IP ranges: 0.0.0.0/0
tcp:80
Allow
1000
default
default-allow-https
https-server
IP ranges: 0.0.0.0/0
tcp:443
Allow
1000
default
wordpress-1-tcp-443
wordpress-1-tcp-443
IP ranges: 0.0.0.0/0
tcp:443
Allow
1000
default
wordpress-1-tcp-80
wordpress-1-tcp-80
IP ranges: 0.0.0.0/0
tcp:80
Allow
1000
default
default-allow-icmp
Apply to all
IP ranges: 0.0.0.0/0
icmp
Allow
65534
default
default-allow-internal
Apply to all
IP ranges: 10.128.0.0/9
tcp:0-65535, udp:0-65535, 1 more
Allow
65534
default
default-allow-rdp
Apply to all
IP ranges: 0.0.0.0/0
tcp:3389
Allow
65534
default
default-allow-ssh
Apply to all
IP ranges: 0.0.0.0/0
tcp:22
Allow
65534
default
Any idea what is the issue? I have a wordpress website running on that installation.

External IPs not assigned within VM

I have a couple of Centos 6 VMs that I am trying to setup. I assigned static IPs to them but when running ifconfig, I do not see the external IPs, just the internal IPs. Does Google not allow this capability?
In addition to what Anderson said, this is the command to query for the external IP from the instance itself:
curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" -H "Metadata-Flavor: Google"
DHCP only supports requesting a single address. Google Compute Engine returns the internal IP address via DHCP, and maps the external assigned IP addresses to the VM using NAT.
If you want to fetch the assigned IP address from inside the VM, you could query the metadata server for that information.

Piwik Localhost Tracking

On piwik, I use localhost as a test website. When I type in localhost from my computer, piwik updates its statistics correctly but when another person (co-worker) in the same LAN types in my IP address, it shows the webpage but piwik doesn't update the visits/pageview count. I would like to know why is that? Any help would be appreciated.
You need to add your IP to the trusted_hosts[] configuration. If you installed Piwik under localhost, it will only accept tracking requests if called under that name.
In config.ini.php add:
[General]
trusted_hosts[] = localhost
trusted_hosts[] = 192.168.1.12
Where 192.168.1.12 is your IP address within your LAN:
This config
[General]
trusted_hosts[] = localhost
says on which address you can access Piwik, its admin panel. If you want to track LAN page you have to modify its Tracking code. To get right for you tracking code (it will not work if you have dynamic IP in your network):
add to trusted_hosts IP address you have in LAN
enter Piwik Admin Panel not by localhost but by your LAN address eg. 192.168.1.12
Now all tracking codes will have your IP as server address and will fire requests to your computer where Piwik is installed.
Explaination:
This all happens because when you enter Piwik Admin Panel from your localhost all tracking codes will have localhost as you Piwik address. So if somebody enters webpage with tracking code, browser will try to communicate with user localhost which is: His Computer. and probably he doesn't have your Piwik.
I added these into config.ini.php as #halfdan said.
[General]
trusted_hosts[] = localhost
trusted_hosts[] = 192.168.1.12
Also change (localhost) website URL mapping.
Click on Setting Icon -> Websites -> Manage
Click on desire website Edit Icon (in my case its localhost)
Change URLs fields from localhost to 192.168.1.12

Mobile IP Addresses

I know that when you hit a page on a site your IP gets logged and the owner can view it.
I've seen it with computers.
There can't possibly be enough IPs to cover all computers and cellphones...
So, since mobiles access by 2G, 3G, 4G, what is the IP that gets registered? Is it like PC accessing?
Do they even generate an IP?
I guess that for Wi-Fi connection they do get an IP, so what about the other signals?
With a 3g service provider you are on their network, so the IP Address will go through a NAT firewall/router and the ip of your device will be their public address such as AT&T.
Much like your home router works. Any computer on your home network will share the IP address of the router.

Resources