aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Prevent certain ports from coming in. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Prevent certain ports from coming in." Watch "Prevent certain ports from coming in." New topic
Author

Prevent certain ports from coming in.

Huang Qingyan
Greenhorn

Joined: Jan 18, 2002
Posts: 23
Dear experts,
As this is a java forum, I gonna ask some programming question.
The stuff is how can I write a java program inorder to block port 80 from coming in or out. Please give me some advice on how to start.
Thanks a lot,
Franco
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
This is usually done with firewalls.
But if you really want to do it
in Java, you can write a Java program
that listens at port
80 and just discards all incoming
information.
On most systems, you have to be
administrator to have your program
bind to port 80.
You must free port 80 first and
then run this Java program.


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Huang Qingyan
Greenhorn

Joined: Jan 18, 2002
Posts: 23
Dear Michael,
Can you please kindly advise me on how to write the codes in the way that it just on certain port and also the method on how to discard the packets that come in on that port.
Warmest regards,
Franco
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Prevent certain ports from coming in.
 
Similar Threads
Beginning java object : Advice for oop understanding
how to get Client Ip address?
Servlet Constructor
General Error in SQL Server 2000
Last afternoon before the exam