aspose file tools*
The moose likes Servlets and the fly likes Help to create IP filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Help to create IP filter" Watch "Help to create IP filter" New topic
Author

Help to create IP filter

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi all.
I have developed a small web forum and I want now to develope an IP blocking filter (like JR's IP filter and other...) to prevent a specifc user from posting.
but I need some help and tips.
1. getRemoteAddress( ) method returns the (IP) address of the client or last proxy that sent the request.
Ok, if this user is behind a proxy, how can I know his IP (so, I can block him) ?
2. Each time a computer connects to internet, it gets a dynamic IP (from DCHP, I think).
well, I have blocked a user which his IP is : 66.122.6.14 (for example).
when he connects to the internet again, he gets a new IP, how can I block him ?
I need every post here...
Thanks.
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Basically you can't unless there is some way to capture the MAC address, which I don't think there is.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

mvnforum application has an IP filter ....
this filter uses a properties file that contains the blocked IP.
Any help from our dear moderators ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

MVNForum is an open source project.
You don't need any help from a moderator.

http://sourceforge.net/projects/mvnforum/


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Thanks.
I know it is an open source, but I want some rancher here that he can explains my previous question to me (like how to know the IP ..)....
And since JR contains a similiar filter, our dear moderators can help me .
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you haven't already, download and install Firefox. Then go get the Live HTTP Headers plugin for it. http://livehttpheaders.mozdev.org/
With it, you can see, in real time, exactly what information the browser is sending to the server. This will include the remoteAddress as well as any app specific cookies.

At the moment, Javaranch isn't using MVNForum. It's still using a cgi solution that is not open source and was not put together by the moderators of this forum. The MVNForum version is in the works.

If Javaranch can shut someone off, even after they change IPs, then it's not using a purely IP based solution. It may be using a combination of IP and the cookies it sets.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help to create IP filter
 
Similar Threads
Capturing IP address of the client machine
Does J2ME replace WAP/WML.?
A couple of RMI questions
RMI lookup
Network programming behing proxies - reg.