Logging router IP instead of users external IP

I searched the FAQs, Documentation, and forums looking for an answer. I know I’m not the only one who has encountered this and I think it comes down to not using the proper keywords or something.

So I come here to ask for some guidance on this issue. Everything seems to be working including the detection of OS and browser. The only thing that seems to not work correctly is the IP address that belongs to the browser and operating system. My access long shows the IP address of the user as the correct external address. Hoever when I view the vistor in Piwik all i see is my routers internal IP address.

Where should I look to get the correct IP logged.

Thanks, Josh!

Maybe this helps you? How do I configure Piwik when the server is installed behind a proxy? - Analytics Platform - Matomo

[attachment 1616 Capture.PNG]

Sorry it took so long to get back to you. I just got home from work. I just tried the assume protcol secure line in the config but it does not seem to help. I do not have any form of proxy set up so I did not try that option. Any other ideas for making this work properly?

So you have an idea of what’s going on in case I explained it poorly I have attached a picture.

Thanks!

Do a file:

<? phpinfo(); then look which line in the output has your correct IP -> is it there? then look at; http://piwik.org/faq/how-to-install/faq_98/

I am slightly confused by your instructions…

None the less I did go through my php info like you said and I came across two IP’s through the whole thing. One IP was the local IP of my desktop that I access the page from. The other is the IP address of the server. All of my other components, MariaDB, memcached, php, all use sockets.

Niether IP is the one in the picture I showed you. The one in the picture is my routers IP.

Am I looking at this wrong? Let me know if you need more information or for me too describe soemthing better.

Appreciate your time!

Ok maybe you can post here the string written next to the correct IPs. What is this string ?

I’m sorry I am new to the whole Piwik thing if it wasn’t clear to begin with but what string are you talking about. So far I have yet to see any correct external IP’s for any vistor in Piwik.

Btw I created a FAQ for this use case, at:

http://piwik.org/faq/troubleshooting/faq_17710/

I feel terrible for asking all of these questions and I’m grateful that you keep coming back with more information ona possible solution. I read through the FAQ you created but judging by what you are saying I have two reasons why this is happening. In my case neither reason seems to apply.

  1. IP of Piwik server also IP of server it’s self - 172.16.0.3
  2. Proxy server - modem->firewall->switch->piwik/web server - 172.16.0.3
  3. The fix you offered which was number 2 on the FAQ was for PHP API I am currently using the javascript API
    In my visitor log the IP address is 172.16.0.1 which is the IP address of the firewall. I built the firewall and therefore know that it has no proxy server set up on it.

What is interesting is all internal IPs that access my server get logged correctly. Yesterday I seen 10.0.0.62 and 10.0.0.54. So I can tell it is tracking correctly but for some reason it is not logging correctly.

Thanks again for all your help!

My friend you are the best. I am terribly sorry for causing all of this grief.

The problem was strictly my fault which I kind of thought sense the begining. What happened was I had Piwik set up inside of a folder only allowed access from certain IPs/Local Network. Well everytime a request was made it wasn’t getting logged at all.

I don’t know how my first 6 or 7 requests worked from outside of the network but eventually what happened was all traffic to the Piwik folder was getting denied. I set up an exception to only the single file needed and now I am logging the correct IP!

All of your help is greatly appreciated. Thank you so much!

You’re welcome! I 'm not sure how I could update the FAQ to explain your use case as well and help others, but i’m glad you found solution!

I’m not sure either but hopefully I will be able to contribute a bit around here. Maybe I’ll be able to help catch such a simple mistake. Thanks.Josh