File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Blocking Internet Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Blocking Internet Access" Watch "Blocking Internet Access" New topic

Blocking Internet Access

shreshth tandon

Joined: Feb 17, 2007
Posts: 4
Hi!! i am making a project on 'Application layer filter' in java. for this i need to block some or all the sites according to need. please help me with both the cases separately.
Thanks in advance
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

So what exactly is your 'beginner' question? If you have question, by all means ask. The more specific they are, the easier it is for someone to help you. Post code samples (use the code tags!!!), say what you are expecting vs. what you actually get, etc.

As is, your post looks a lot like a "please do my work for me" request. Nobody here will really do that. We are here to help you LEARN to write your own code, not to write your code for you.
[ April 24, 2007: Message edited by: Fred Rosenberger ]

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
shreshth tandon

Joined: Feb 17, 2007
Posts: 4
it's a sheer case of miscommunication that you understood that i want someone to the work!!! i just need a direction, a help in the sense which
the following code segment is used. this segment is basically not blocking the internet traffic coming through a LAN adapter. ne changes or corrections?? tried the different sockets also but no effect.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Looks like this should return "restricted site" if the URL is or if the first 500 bytes of content you retrieve includes "Iram". (If Iram comes after that, you'll return some partial content plus restricted site.) Is that right? What does it do that's different from that?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
shreshth tandon

Joined: Feb 17, 2007
Posts: 4
yup exactly. what it is not doing is that when a internet connection is established through a proxy server over a LAN connection(as in case of a institute), it stops working i.e. stops giving the desired results and allows all sites. i have to deploy it in a similar situation and that is why in need of help!!
I agree. Here's the link:
subject: Blocking Internet Access
It's not a secret anymore!