See below - in any of the report pages, the IP address is always the same, despite unique visitors.
1 123 210.185.19.135 2010-12-06 16:49:14 /admin/reports/status
2 122 210.185.19.135 2010-12-03 14:39:22 /node/16
3 121 210.185.19.135 2010-12-03 14:38:41 /node/19
4 120 210.185.19.135 2010-12-03 14:37:53 /node/18
5 119 210.185.19.135 2010-12-03 14:37:00 /node/15
6 118 210.185.19.135 2010-12-03 14:36:22 /node/15
7 117 210.185.19.135 2010-12-03 00:36:54 /node/5
8 116 210.185.19.135 2010-12-03 00:36:07 /node/2/edit
9 115 210.185.19.135 2010-12-03 00:34:48 /node/7
10 114 210.185.19.135 2010-12-02 23:01:28 /catalog/1
11 113 210.185.19.135 2010-12-02 22:17:13 /node/5
12 112 210.185.19.135 2010-12-02 22:03:45 /node/2
13 111 210.185.19.135 2010-12-02 22:02:53 /node/7
14 110 210.185.19.135 2010-12-02 22:02:04 /node/8
15 109 210.185.19.135 2010-12-02 22:01:03 /node/6
16 108 210.185.19.135 2010-12-02 21:59:51 /node/4
17 107 210.185.19.135 2010-11-06 13:54:54 /node/7
18 106 210.185.19.135 2010-11-06 13:53:43 /node/7
19 105 210.185.19.135 2010-11-06 13:52:24 /node/7
20 104 210.185.19.135 2010-10-27 18:10:05 /admin/reports/status
21 103 210.185.19.135 2010-10-25 01:00:22 /admin/reports/status
22 102 210.185.19.135 2010-10-23 22:39:00 /admin/reports/status
23 101 210.185.19.135 2010-10-20 23:07:53 /admin/reports/status
24 100 210.185.19.135 2010-10-20 22:41:42 /admin/settings/counter
25 99 210.185.19.135 2010-10-15 22:35:59 /admin/reports/status
26 98 210.185.19.135 2010-10-15 22:35:06 /admin/settings/admin_menu
27 97 210.185.19.135 2010-10-15 22:34:47 /admin/settings/admin_menu
28 96 210.185.19.135 2010-10-15 22:33:53 /admin/user/permissions
29 95 210.185.19.135 2010-10-15 21:25:58 /admin/build/modules
30 94 210.185.19.135 2010-10-15 21:22:23 /admin/build/block
31 93 210.185.19.135 2010-10-15 17:07:59 /admin/build/block
32 92 210.185.19.135 2010-10-15 17:01:06 /admin/build/block
33 91 210.185.19.135 2010-10-15 17:00:38 /admin/build/block
34 90 210.185.19.135 2010-10-15 16:59:00 /admin/build/block
35 89 210.185.19.135 2010-10-14 22:54:08 /admin/content/node
36 88 210.185.19.135 2010-10-14 22:49:00 /admin/content/node
37 87 210.185.19.135 2010-10-14 22:41:25 /admin/content/node
38 86 210.185.19.135 2010-10-14 22:38:11 /admin/content/node
39 85 210.185.19.135 2010-10-14 22:34:34 /admin/content/node
40 84 210.185.19.135 2010-10-14 22:22:17 /admin/content/node
41 83 210.185.19.135 2010-10-14 22:19:50 /admin/content/node
42 82 210.185.19.135 2010-10-14 22:16:42 /admin/content/node
43 81 210.185.19.135 2010-10-14 22:12:08 /admin/content/node
44 80 210.185.19.135 2010-10-14 22:00:51 /admin/content/node
45 79 210.185.19.135 2010-10-14 21:55:47 /admin/content/node
46 78 210.185.19.135 2010-10-14 21:54:54 /node/6

CommentFileSizeAuthor
#2 counter-get_real_ip-990886-2.patch850 bytesdozymoe

Comments

drupalnesia’s picture

Category: bug » support

Check if you have proxy enable to access your website. Also make sure you have a different IP before test this behavior.

dozymoe’s picture

Version: 6.x-2.11 » 6.x-2.19
Component: Miscellaneous » Code
Category: support » feature
Status: Active » Needs review
StatusFileSize
new850 bytes

Mas bro, I'm having similar issue, I tried the codes available at some blog. Eh, copied the php code as is.

It checks some other server variable for proxy redirection etc, I think.

asep.sutisna’s picture

Thanks dozymoe, it works!

drupalnesia’s picture

Status: Needs review » Patch (to be ported)

I am on D7 now, I will update the D6 version soon.

drupalnesia’s picture

Amazing there are so many "HTTP FORWARDED" like variables, e.g:
HTTP_PRAGMA, HTTP_XONNECTION, HTTP_CACHE_INFO, HTTP_XPROXY, HTTP_PROXY, HTTP_PROXY_CONNECTION, HTTP_CLIENT_IP, HTTP_VIA, HTTP_X_COMING_FROM, HTTP_X_FORWARDED_FOR, HTTP_X_FORWARDED, HTTP_COMING_FROM, HTTP_FORWARDED_FOR, HTTP_FORWARDED, ZHTTP_CACHE_CONTROL

But for temporary quick I aggree to follow this simple check from: http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html

Will be upload 6.x-2.23 soon, I am working on it now.

drupalnesia’s picture

Status: Patch (to be ported) » Closed (fixed)

Counter 6.x-2.23:
Fix: Detect real IP whenever behind Proxy
Fix: Remove "view counter" on Permissions page, because we already have "Show block for specific roles" in Blocks Configuration
Fix: Remove README.TXT, use http://drupal.org/project/counter instead

See #5, since many HTTP FORWARDED like variables need to be test, please create separated issue if you found path #2 not cover your environment.