Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Remote Host for Administrator

Quote Reply
Remote Host for Administrator
As an administrator, I would like to see not only the user's/guest's IP address, but also in their remote host (that tells me more than the IP, usually).

Do I have to write a plugin for this, or can it be done more easily?


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Remote Host for Administrator In reply to
OK, I went out and looked for a tool to do this, which I found at http://www.bjoernsworld.de/...erse-dns-lookup.html (page in german).

I made a global, called it hostlookup, which basically contains the lookup subroutine in the script on above URL, and now I can call it on the who's online page using <%hostlookup($online_ip)%>.

It probably slows down the display of the who's online page, but since only the administrator will be able to see the host/IP information, that shouldn't be an issue.


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Remote Host for Administrator In reply to
You just need to change the ENV REMOTE_IP to REMOTE_ADDR if this is supported on the server.

I think the reason for not doing this is banning people with their host name is completly stupid, and host name lookups take time, and not all web servers are set up to translate IP addresses.

Cheers

- wil
Quote Reply
Re: [Wil] Remote Host for Administrator In reply to
In Reply To:
You just need to change the ENV REMOTE_IP to REMOTE_ADDR if this is supported on the server.
It's not as simple as that, because the IP addresses of the users that are currently online are stored in a table, and read from that table to be displayed on the who's online page.

I think it would not be a good idea to also save the REMOTE_ADDR in the table, that would require adding a new field, plus writing a plugin to actually save the REMOTE_ADDR in the table. Plus, it would slow the forum down, because the lookup would have to be done all the time.

My solution does not require all that overhead, it is just a way to see which REMOTE_ADDR corresponds ot which IP, and only when it is needed, namely when I as an administrator view the who's online page.

In Reply To:
I think the reason for not doing this is banning people with their host name is completly stupid, and host name lookups take time, and not all web servers are set up to translate IP addresses.
It has never been my intention to ban by REMOTE_ADDR, and I agree with you that this would be stupid.


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Remote Host for Administrator In reply to
Hi Yogi

Sorry, I didn't read your message clearly enough. Sure, your method would probably the best and fastest way of doing this.

Not sure why you want to, though? :-)

Cheers

- wil
Quote Reply
Re: [Wil] Remote Host for Administrator In reply to
In Reply To:
Not sure why you want to, though? :-)
Because there is a guy who used to post stupid messages to my old forum. I know the REMOTE_ADDR of the internet cafe where he/she usually posts from by heart (well I guess I also know the IP address, but not by heart...).

Having the host name displayed makes the vistors somehow look more human to me....


Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Remote Host for Administrator In reply to
OK. Fair enough. Be wary of proxy servers at places like internet cafes. If you ban the one guy you're probably blocking out the whole cafe. Especially if their router is using IP rewritting.

- wil
Quote Reply
Re: [Wil] Remote Host for Administrator In reply to
Actually, my strategy is not to block the IP, but to find out who he is (because he has to register if he wants to post), and then contact him by his real email address.

Thanks for the remark about the proxy servers, the hostname in question actually contains ...proxy..., so I guess they use a proxy server.


Ivan
-----
Iyengar Yoga Resources / GT Plugins