KS said:
I agree that access controll should not be done this way, but for logging
and keep an eye on who use my webpage it should be the way to do it.
Does anyone know if the ipadress normally would be from the client
computer ? By normally I dont consider some hacker that has change his
ipadress.
Im just trying to understand the consept.
It should be, unless the IP address is spoofed. And although firewalls can
detect this, AFAIK normal applications don't look that close to the
packets; at least Java doesn't.
But even for normal users, you cannot entirely rely on the IP address: it
may be dynamic, or the for users is behind a NAT firewall. In that last
case you'll get the address of the firewall, as the internal address is
likely in one of the unroutable ranges.
For logging purposes though, logging the IP address and preferably also
the username is enough in most cases. The username is not important when
you don't expect many corporate users to connect, or if usage is anonymous
anyway.