• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Security in Datagrams

 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, its been ages

I'm in the process of understanding Datagrams, and i understand that it is connectionless protocol...
so my question is, if i send some data to a server, and leave that socket open for continuous listening, can an unauthorized host spam my socket?

In Java will it though any kind of exception to reject data from the unauthorized host?

hope the questions are clear
thanks
HannaH
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, a Socket isn't vulnerable to that. A ServerSocket is open for listening to anyone who wants to connect, but a Socket is used only for connections to a particular port on a particular host. No other host can connect to it.
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf very much

I particularly meant, DatagramSocket

is that the same as ServerSocket?

and when you say a "ServerSocket is open for anyone to connect" doesn't that mean an unauthorized one can connect to my host?
[ February 20, 2008: Message edited by: H Melua ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I particularly meant, DatagramSocket

is that the same as ServerSocket?

No. A ServerSocket uses TCP, not UDP like DatagramSocket.

and when you say a "ServerSocket is open for anyone to connect" doesn't that mean an unauthorized one can connect to my host?

That's exactly what it means. You need to implement authentication and authorization yourself if you use raw sockets.
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers very much for the info, it sounds very interesting

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic