0

I have written a simple network program on java using sockets. Program has a client and a server.

When user types a word on client side, server simply return this word to client.

On server side I use Serversocket and bind it to port 4444. Why does not firewall block this connection on my server PC?

I ask this question because earlier I wrote this program using corba technology, and firewall on my server PC was blocking the connection to this port; when I disabled the firewall the program worked fine.

6
  • 2
    add your OS version and your firewall software Commented Dec 25, 2010 at 16:46
  • 1
    By any chance is this a single box experiment ? Some firewall packages on some operating systems do not get invoked for local sockets. Commented Dec 25, 2010 at 17:02
  • 2
    Are you running client and server on the same machine? Firewall does not usually block to localhost connection. Commented Dec 25, 2010 at 17:03
  • 1
    This doesn't appear to be a question about Java, instead the question is how your unspecified firewall software works. i.e why does it block this but not that. Commented Dec 25, 2010 at 17:32
  • @oluies winXP and standart windows firewall @Jim Rush & gigadot I have tested it on different machines Commented Dec 25, 2010 at 17:46

2 Answers 2

2

My first guess is that your firewall is only blocking well known and/or well known and registered ports. Check out this wikipedia article. To test this, have your program bind to a well known port and / or a registered port that is not in use in your environment.

Sign up to request clarification or add additional context in comments.

1 Comment

A few minutes ago I tested it with port number 21, but program with sockets worked well and corba program didn't work until the firewall was enabled
1

Maybe your firewall doesn't block the opening of server sockets, but only the connections to them? In this case you would be able to connect to the socket over "localhost", but not on your external IP (which means the IP on your local network, not the one at your router).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.