<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>danielmiessler.com - Latest Comments in Security: How Network Ports Work</title><link>http://drm.disqus.com/</link><description>https://danielmiessler.com/about/</description><atom:link href="https://drm.disqus.com/security_how_network_ports_work/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 16 Feb 2007 13:48:57 -0000</lastBuildDate><item><title>Re: Security: How Network Ports Work</title><link>http://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155622</link><description>&lt;p&gt;Ahhh, I see now.&lt;/p&gt;&lt;p&gt;So this (from lsof) makes more sense now:&lt;/p&gt;&lt;p&gt;firefox-b 250 yur  43u  IPv4 0x4177018      0t0  TCP 10.0.0.102:53475-&amp;gt;&lt;a href="http://ar-in-f104.google.com" rel="nofollow noopener" target="_blank" title="ar-in-f104.google.com"&gt;ar-in-f104.google.com&lt;/a&gt;:http (ESTABLISHED)&lt;/p&gt;&lt;p&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;/p&gt;&lt;p&gt;Thanks for the info.&lt;/p&gt;</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://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155621</link><description>&lt;p&gt;Are the midgets unionized?&lt;/p&gt;&lt;p&gt;**We represent the Lollipop Guild, the Lollipop Guild, the Lollipop Guild**&lt;/p&gt;</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://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155619</link><description>&lt;p&gt;&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;/p&gt;&lt;p&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;/p&gt;&lt;p&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;/p&gt;&lt;p&gt;Hope this helps...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Miessler</dc:creator><pubDate>Thu, 15 Feb 2007 23:03:07 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155618</link><description>&lt;p&gt;Haw haw.  I just had a mental image of Daniel yelling at his computer:&lt;/p&gt;&lt;p&gt;"Hey all you midgets in there!  Quit yackin' and get back to work!"&lt;/p&gt;</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://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155616</link><description>&lt;p&gt;Gotta love metaphors.&lt;/p&gt;&lt;p&gt;-- Arik&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arik</dc:creator><pubDate>Thu, 15 Feb 2007 22:36:04 -0000</pubDate></item><item><title>Re: Security: How Network Ports Work</title><link>http://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155615</link><description>&lt;p&gt;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.&lt;/p&gt;</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://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155613</link><description>&lt;p&gt;Yur&lt;/p&gt;&lt;p&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;/p&gt;&lt;p&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;/p&gt;&lt;p&gt;Hope this makes a bit of sense.. :)&lt;/p&gt;</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://https://danielmiessler.com/blog/security-how-network-ports-work#comment-11155611</link><description>&lt;p&gt;I've often wondered about ports used to send data.&lt;/p&gt;&lt;p&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;/p&gt;&lt;p&gt;But when I'm on my desktop, does my browser use a port to send/receive data from a webserver?&lt;/p&gt;&lt;p&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;/p&gt;&lt;p&gt;/boggle&lt;/p&gt;</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>