<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>dmiessler.com | grep understanding - Latest Comments in Security: How Network Ports Work</title><link>http://danielrm26.disqus.com/</link><description>dmiessler.com/about/</description><language>en</language><lastBuildDate>Fri, 16 Feb 2007 13:48:57 -0000</lastBuildDate><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353434</link><description>Ahhh, I see now.&lt;br&gt;&lt;br&gt;So this (from lsof) makes more sense now:&lt;br&gt;&lt;br&gt;firefox-b 250 yur  43u  IPv4 0x4177018      0t0  TCP 10.0.0.102:53475-&amp;gt;ar-in-f104.google.com:http (ESTABLISHED)&lt;br&gt;&lt;br&gt;Firefox has an open connection with Google using my local port 53475, right?  I guess outbound connections pick a random port and make sure it isn't in use or something?  I assume there is a nice POSIX system call for this sort of thing? get_an_unused_user_port() sort of thing?&lt;br&gt;&lt;br&gt;Thanks for the info.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yur</dc:creator><pubDate>Fri, 16 Feb 2007 13:48:57 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353433</link><description>Are the midgets unionized?&lt;br&gt;&lt;br&gt;**We represent the Lollipop Guild, the Lollipop Guild, the Lollipop Guild**</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael S Black</dc:creator><pubDate>Fri, 16 Feb 2007 08:36:08 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353432</link><description>&amp;gt; If I’m running a local webserver listening on port 80, and then on the same machine I use my browser … how does the response traffic not go to my webserver (thus confusing everyone involved)?&lt;br&gt;&lt;br&gt;In general, "client" ports (also called ephemeral ports) are very high -- often in the many thousands. The low ports (especially those below 1024) are reserved for common services such as web, ftp, telnet, etc.&lt;br&gt;&lt;br&gt;So think of it this way -- each side of a connection has two things: 1) an IP address, and 2) a port. Usually the server side will be a low port and the client a high one, but it depends on the application so that's not always the case.&lt;br&gt;&lt;br&gt;Hope this helps...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">danielrm26</dc:creator><pubDate>Thu, 15 Feb 2007 23:03:07 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353431</link><description>Haw haw.  I just had a mental image of Daniel yelling at his computer:&lt;br&gt;&lt;br&gt;"Hey all you midgets in there!  Quit yackin' and get back to work!"</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim</dc:creator><pubDate>Thu, 15 Feb 2007 22:45:15 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353430</link><description>Gotta love metaphors.&lt;br&gt;&lt;br&gt;-- Arik</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">arikb</dc:creator><pubDate>Thu, 15 Feb 2007 22:36:04 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353429</link><description>A most excellent explanation for me, someone who never knew anything about ports, etc.  Unfortunately, now, if I find myself in a situation called upon to explain this phenomenon, the only analogy I'll have handy will involve midgets on spring-loaded windows.  I am heartened, though, that this is apparently the same situation you, yourself, are in.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jason Powell</dc:creator><pubDate>Thu, 15 Feb 2007 18:54:50 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353428</link><description>Yur&lt;br&gt;&lt;br&gt;The 'connection' between your web browser and the web server is between the port on your machine and the port on theirs. Typically connections *from* your machine will be made above port 1024, if not higher, *to* a server on a port below 1024.&lt;br&gt;&lt;br&gt;So, your web server listens on port 80, and your web browser 'listens' on a higher port, for the specific task of talking to the remote web server for one session.&lt;br&gt;&lt;br&gt;Hope this makes a bit of sense.. :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt</dc:creator><pubDate>Thu, 15 Feb 2007 18:32:36 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://dmiessler.com/blog/security-how-network-ports-work#comment-4353427</link><description>I've often wondered about ports used to send data.&lt;br&gt;&lt;br&gt;I know that a webserver listening on the default HTTP port of 80 will "lock" that port on a machine.  Two processes can't listen on the same port (at least with any OS's I'm familiar with).&lt;br&gt;&lt;br&gt;But when I'm on my desktop, does my browser use a port to send/receive data from a webserver?&lt;br&gt;&lt;br&gt;If I'm running a local webserver listening on port 80, and then on the same machine I use my browser ... how does the response traffic not go to my webserver (thus confusing everyone involved)?&lt;br&gt;&lt;br&gt;/boggle</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yur</dc:creator><pubDate>Thu, 15 Feb 2007 18:05:31 -0000</pubDate></item></channel></rss>