Re: TCP-Programming: Port connects to itself? Why is this possible?

This is a discussion on Re: TCP-Programming: Port connects to itself? Why is this possible? within the Linux Networking forums, part of the Linux Forums category; > I just noticed that it is possible to open a TCP-socket and connect it to > itself ... I ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-08-2003
Dennis Petersen
 
Posts: n/a
Default Re: TCP-Programming: Port connects to itself? Why is this possible?

> I just noticed that it is possible to open a TCP-socket and connect it to
> itself ... I don't see how / why this makes sense. Shouldn't the kernel
> deny this?
> If I do a netstat I see the following:
>
> mhpa9rec:~# netstat -p | grep 3000
> tcp 0 0 mhpa9rec:3000 mhpa9rec:3000 ESTABLISHED1351/sock
>

I fail to see why the kernel needs to deny this?
If I were to create a port blocker your example woult fit nicely when
clarifying how to do this (without reading and writing of course).
In this way I would be able to programmatically occupy different ports
without using many resources, thus controlling which ports are free for
other (possible malicious) sockets.

Do I make sense? It is a long time ago I did this kind of lowlevel
programming... thank god for IPTables :)

Sincerely,
Dennis Petersen


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0