<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Bizarre Linux Networking Problem</title>
	<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem/</link>
	<description>Comments on Ask MetaFilter post Bizarre Linux Networking Problem</description>
	<pubDate>Mon, 01 Oct 2007 16:21:44 -0800</pubDate>
	<lastBuildDate>Mon, 01 Oct 2007 16:21:44 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Bizarre Linux Networking Problem</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem</link>	
		<description>I have a server running Centos 5. It&apos;s currently refusing outside connections to any port except port 22. ip-tables and SELinux are both disabled. Whiskey Tango Foxtrot? &lt;br /&gt;&lt;br /&gt; By outside connections, I mean any connection that&apos;s not localhost. So, for example, I can telnet to localhost port 25, but from a machine on the same subnet (255.255.255.0) it refuses the connection. I&apos;ve also checked /etc/hosts.allow and /etc/hosts.deny, both are empty and in xinetd.conf no_access and only_from remain unset.&lt;br&gt;
&lt;br&gt;
Seriously guys, I&apos;m sure I&apos;m missing something really stupid, but I&apos;m baffled at the moment.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.72794</guid>
		<pubDate>Mon, 01 Oct 2007 16:13:23 -0800</pubDate>
		<dc:creator>signalnine</dc:creator>
		
			<category>unix</category>
		
			<category>centos</category>
		
			<category>networking</category>
		
			<category>firewall</category>
		
			<category>linux</category>
		
			<category>tcp-ip</category>
		
	</item> <item>
		<title>By: Zed_Lopez</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084138</link>	
		<description>How are the machines networked? Do you have a firewall running on your router?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084138</guid>
		<pubDate>Mon, 01 Oct 2007 16:21:44 -0800</pubDate>
		<dc:creator>Zed_Lopez</dc:creator>
	</item><item>
		<title>By: odinsdream</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084143</link>	
		<description>What iptables rules are you using? Have you tried flushing them?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084143</guid>
		<pubDate>Mon, 01 Oct 2007 16:25:32 -0800</pubDate>
		<dc:creator>odinsdream</dc:creator>
	</item><item>
		<title>By: genghis</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084150</link>	
		<description>I dimly recall that this was the default behaviour on lots of RedHat-derived distros.  Nothing&apos;s open until you open it.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084150</guid>
		<pubDate>Mon, 01 Oct 2007 16:27:46 -0800</pubDate>
		<dc:creator>genghis</dc:creator>
	</item><item>
		<title>By: Geckwoistmeinauto</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084151</link>	
		<description>What&apos;s the output (as root) of:&lt;br&gt;
iptables -L&lt;br&gt;
netstat -ap</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084151</guid>
		<pubDate>Mon, 01 Oct 2007 16:27:55 -0800</pubDate>
		<dc:creator>Geckwoistmeinauto</dc:creator>
	</item><item>
		<title>By: bh</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084158</link>	
		<description>Are you positive SELinux is completely disabled?  Something seems familiar about this question, but I can&apos;t quite place it.  I ran across something when I was planning an SELinux install, and I seem to remember something about needing an extra step to completely disable it.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084158</guid>
		<pubDate>Mon, 01 Oct 2007 16:31:51 -0800</pubDate>
		<dc:creator>bh</dc:creator>
	</item><item>
		<title>By: CrayDrygu</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084165</link>	
		<description>It&apos;s possible that each individual service is only configured to listen for connections on localhost.  Then, even without a firewall, the SMTP server won&apos;t respond to outside connections because it isn&apos;t even listening for them.&lt;br&gt;
&lt;br&gt;
The solution would be to alter each service&apos;s configuration so that it listens on all interfaces, or to specify (usually by IP) the interface(s) to listen to.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084165</guid>
		<pubDate>Mon, 01 Oct 2007 16:36:11 -0800</pubDate>
		<dc:creator>CrayDrygu</dc:creator>
	</item><item>
		<title>By: Good Brain</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084175</link>	
		<description>I think CentOS uses APF (advanced protection firewall or something).  Check the manpage.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084175</guid>
		<pubDate>Mon, 01 Oct 2007 16:43:57 -0800</pubDate>
		<dc:creator>Good Brain</dc:creator>
	</item><item>
		<title>By: a robot made out of meat</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084206</link>	
		<description>http://wiki.centos.org/HowTos/Network/IPTables&lt;br&gt;
&lt;br&gt;
The HowTos/ folder has other setup issues.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084206</guid>
		<pubDate>Mon, 01 Oct 2007 17:16:25 -0800</pubDate>
		<dc:creator>a robot made out of meat</dc:creator>
	</item><item>
		<title>By: fnord</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084207</link>	
		<description>This sounds like default RedHat behavior.&lt;br&gt;
&lt;br&gt;
Check your /etc/mail/sendmail.cf for the DaemonPortOptions string.&lt;br&gt;
&lt;br&gt;
It&apos;ll most likely be something like this -&lt;br&gt;
&lt;br&gt;
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA&lt;br&gt;
&lt;br&gt;
That makes sendmail only listen on the loopback address.&lt;br&gt;
&lt;br&gt;
Change that to something more like this - &lt;br&gt;
&lt;br&gt;
O DaemonPortOptions=Name=MTA&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
What else isn&apos;t listening correctly, or is it just sendmail/port 25?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084207</guid>
		<pubDate>Mon, 01 Oct 2007 17:16:36 -0800</pubDate>
		<dc:creator>fnord</dc:creator>
	</item><item>
		<title>By: Skorgu</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084234</link>	
		<description>This is almost certainly apf being &quot;clever.&quot; apf -l will (verbosely) list the rules it&apos;s using, apf -f will flush all rules to their default (open) state. &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Also useful is apf -a &amp;lt;machine&amp;gt; which will allow a single ip or FQDN to bypass the firewall rules.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084234</guid>
		<pubDate>Mon, 01 Oct 2007 17:38:12 -0800</pubDate>
		<dc:creator>Skorgu</dc:creator>
	</item><item>
		<title>By: zengargoyle</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084283</link>	
		<description>Are you sure about iptables?  I&apos;m a CentOS newbie, &apos;apf&apos; is &quot;command not found&apos; on my box.  &apos;/etc/init.d/iptables status&apos; is the check:&lt;br&gt;
&lt;br&gt;
# /etc/init.d/iptables status&lt;br&gt;
Firewall is stopped.&lt;br&gt;
&lt;br&gt;
if not stopped, do &apos;/et/init.d/iptables stop and check again.  I used the &apos;system-config-securitylevel&apos; interface to turn off SELinux and the Firewall.  Except for SSH, and HTTP(S), I would guess that others are correct that the default is to answer to localhost only.&lt;br&gt;
&lt;br&gt;
Sorry, another CentOS newbie here.  I&apos;m used to Gentoo, CentOS is making me pull out my hair.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084283</guid>
		<pubDate>Mon, 01 Oct 2007 18:19:54 -0800</pubDate>
		<dc:creator>zengargoyle</dc:creator>
	</item><item>
		<title>By: TravellingDen</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084508</link>	
		<description>Check the output of netstat -l and see what is actually listening where.&lt;br&gt;
&lt;br&gt;
I&apos;d wager as others said that Sendmail is only listening on localhost.&lt;br&gt;
&lt;br&gt;
You will see something like: &lt;br&gt;
&lt;br&gt;
tcp        0      0 6.53.123.156:53        0.0.0.0:*               LISTEN     &lt;br&gt;
&lt;i&gt;This is listening to port 53 only on the indicated IP.&lt;/i&gt;&lt;br&gt;
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     &lt;br&gt;
&lt;i&gt;This is listening ONLY on localhost&lt;/i&gt;&lt;br&gt;
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN     &lt;br&gt;
&lt;i&gt;This is listening for connections on any available interface, signified by 0.0.0.0&lt;/i&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084508</guid>
		<pubDate>Mon, 01 Oct 2007 21:47:23 -0800</pubDate>
		<dc:creator>TravellingDen</dc:creator>
	</item><item>
		<title>By: Malor</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084544</link>	
		<description>If you get a connection, which is then immediately dropped, you might be encountering &apos;tcpwrapper&apos;, which isn&apos;t used much anymore, but which is still fully functional. &lt;br&gt;
&lt;br&gt;
/etc/hosts.allow and /etc/hosts.deny list services and hosts; this is generally used by inetd, but many applications are tcpwrapper-aware.  On first connection, they consult those files, and if the connection isn&apos;t allowed, it&apos;s immediately dropped before any conversation takes place.  Again, this is rarely used, but if you have the connect-then-drop symptom, that&apos;s where to look.&lt;br&gt;
&lt;br&gt;
If it&apos;s not connecting AT ALL, then you either do have your firewall on, or you haven&apos;t configured your daemons to listen to external ports.  Many daemons, nowadays, listen only on the loopback interface by default, meaning they can&apos;t be reached from the outside world.  You have to fix this on a per-daemon basis, generally by telling it to listen to the external IP address instead of 127.0.0.1.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084544</guid>
		<pubDate>Mon, 01 Oct 2007 22:27:04 -0800</pubDate>
		<dc:creator>Malor</dc:creator>
	</item><item>
		<title>By: Malor</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084549</link>	
		<description>This script will absolutely purge any rules you have in iptables:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;IPTABLES=&quot;/sbin/iptables&quot;&lt;br&gt;
IP=&quot;/sbin/ip&quot;&lt;br&gt;
&lt;br&gt;
EXT_IFACE=&quot;eth0&quot;&lt;br&gt;
&lt;br&gt;
echo &quot;0&quot; &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br&gt;
&lt;br&gt;
$IPTABLES -P OUTPUT ACCEPT&lt;br&gt;
$IPTABLES -P INPUT ACCEPT&lt;br&gt;
$IPTABLES -P FORWARD ACCEPT&lt;br&gt;
&lt;br&gt;
cat /proc/net/ip_tables_names | while read table; do&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$IPTABLES -t $table -L -n | while read c chain rest; do&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if test &quot;X$c&quot; = &quot;XChain&quot; ; then&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$IPTABLES -t $table -F $chain&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;done&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$IPTABLES -t $table -X&lt;br&gt;
done&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
This assumes that your external interface is eth0, and it disables TCP forwarding, meaning that it will stop routing packets to machines behind it.  &lt;br&gt;
&lt;br&gt;
I tried to get the script to indent properly, but Metafilter strips out spaces on preview, so I have to post blindly, getting it right the first try.  If I failed, my apologies.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084549</guid>
		<pubDate>Mon, 01 Oct 2007 22:33:08 -0800</pubDate>
		<dc:creator>Malor</dc:creator>
	</item><item>
		<title>By: Malor</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084550</link>	
		<description>Oh good, that came out right.  I&apos;m not sure who the original author was of that script, but it&apos;s very effective at completely wiping out your iptables rules, no matter how complex they are.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084550</guid>
		<pubDate>Mon, 01 Oct 2007 22:35:05 -0800</pubDate>
		<dc:creator>Malor</dc:creator>
	</item><item>
		<title>By: Malor</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084556</link>	
		<description>Oh,  duh, you already checked for tcpwrappers. &lt;br&gt;
&lt;br&gt;
If you try to connect and it just hangs, it&apos;s probably your firewall stopping it.  If it instantly comes back with a &apos;REFUSED&apos; message, it&apos;s probably that the daemon simply isn&apos;t listening on the external interface.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084556</guid>
		<pubDate>Mon, 01 Oct 2007 22:42:49 -0800</pubDate>
		<dc:creator>Malor</dc:creator>
	</item><item>
		<title>By: yomimono</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084655</link>	
		<description>I remember having to reboot to fully disable SELinux on RHEL/CentOS 4 (although this smells more like a problem with the daemon not listening on all interfaces, as was said above).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084655</guid>
		<pubDate>Tue, 02 Oct 2007 04:16:37 -0800</pubDate>
		<dc:creator>yomimono</dc:creator>
	</item><item>
		<title>By: signalnine</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084903</link>	
		<description>[root@staging-dbserve ~]# iptables -L&lt;br&gt;
Chain INPUT (policy ACCEPT)&lt;br&gt;
target     prot opt source               destination&lt;br&gt;
&lt;br&gt;
Chain FORWARD (policy ACCEPT)&lt;br&gt;
target     prot opt source               destination&lt;br&gt;
&lt;br&gt;
Chain OUTPUT (policy ACCEPT)&lt;br&gt;
target     prot opt source               destination&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[root@staging-dbserve ~]# netstat -l&lt;br&gt;
Active Internet connections (only servers)&lt;br&gt;
Proto Recv-Q Send-Q Local Address               Foreign Address             State&lt;br&gt;
tcp        0      0 *:57795                     *:*                         LISTEN&lt;br&gt;
tcp        0      0 *:964                       *:*                         LISTEN&lt;br&gt;
tcp        0      0 *:sunrpc                    *:*                         LISTEN&lt;br&gt;
tcp        0      0 staging-dbserve:ipp         *:*                         LISTEN&lt;br&gt;
tcp        0      0 staging-dbserve:postgres    *:*                         LISTEN&lt;br&gt;
tcp        0      0 staging-dbserve:smtp        *:*                         LISTEN&lt;br&gt;
tcp        0      0 *:ssh                       *:*                         LISTEN&lt;br&gt;
udp        0      0 *:filenet-tms               *:*&lt;br&gt;
udp        0      0 *:filenet-nch               *:*&lt;br&gt;
udp        0      0 *:958                       *:*&lt;br&gt;
udp        0      0 *:961                       *:*&lt;br&gt;
udp        0      0 *:mdns                      *:*&lt;br&gt;
udp        0      0 *:sunrpc                    *:*&lt;br&gt;
udp        0      0 *:ipp                       *:*&lt;br&gt;
udp        0      0 *:filenet-rmi               *:*&lt;br&gt;
udp        0      0 *:mdns                      *:*&lt;br&gt;
Active UNIX domain sockets (only servers)&lt;br&gt;
Proto RefCnt Flags       Type       State         I-Node Path&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     8070   /tmp/.s.PGSQL.5432&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     13230  /tmp/ssh-jEEpLE5641/agent.5641&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     8472   /var/run/avahi-daemon/socket&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     8514   @/var/run/hald/dbus-lO8fS3c7Di&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     8513   @/var/run/hald/dbus-D9D0iLYOVH&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     8326   /dev/gpmctl&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     7158   /var/run/audit_events&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     7442   /var/run/dbus/system_bus_socket&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     7519   /var/run/sdp&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     7664   /var/run/pcscd.comm&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     7841   /var/run/acpid.socket&lt;br&gt;
unix  2      [ ACC ]     STREAM     LISTENING     7884   /var/run/cups/cups.sock</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084903</guid>
		<pubDate>Tue, 02 Oct 2007 08:31:53 -0800</pubDate>
		<dc:creator>signalnine</dc:creator>
	</item><item>
		<title>By: signalnine</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084907</link>	
		<description>Oh, and there it is. &lt;i&gt;None&lt;/i&gt; of the daemons are listening on anything but the loopback by default. Weird. I guess I expected to see at least *one* daemon listening to eth0. Thanks, guys.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084907</guid>
		<pubDate>Tue, 02 Oct 2007 08:38:12 -0800</pubDate>
		<dc:creator>signalnine</dc:creator>
	</item><item>
		<title>By: Malor</title>
		<link>http://ask.metafilter.com/72794/Bizarre-Linux-Networking-Problem#1084965</link>	
		<description>Actually, the *:57795 syntax means &quot;any interface, port 57795&quot;.  Almost all of your daemons appear to be listening on eth0.  Postgres, CUPS, and your mail program might not be, though.  &lt;br&gt;
&lt;br&gt;
If you do &apos;netstat -ln&apos;, it will print the actual numeric values instead of &apos;staging-dbserve&apos;.  If it&apos;s 127.0.0.1, that&apos;s your problem.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.72794-1084965</guid>
		<pubDate>Tue, 02 Oct 2007 09:23:48 -0800</pubDate>
		<dc:creator>Malor</dc:creator>
	</item>
	</channel>
</rss>
