<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Check your listen statement in  /etc/httpd/conf/httpd.conf.  It
    should be:<br>
    Listen 8080<br>
    <br>
    If that is correct, run tcpdump (ctrl+c to quit) and then try
    externally connecting :<br>
    tcpdump -n -i eth0 port 80 or port 8080<br>
    <br>
    If you get traffic on port 8080 then you have an iptables problem.<br>
    <br>
    Bill<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 10/4/2012 3:45 PM, Mark Space wrote:<br>
    </div>
    <blockquote cite="mid:BLU0-SMTP1195C8054380947C1F6B08BD2840@phx.gbl"
      type="cite">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Hi all, I'm having a bit of trouble setting up a new web server.
      The last time I set up up it went smoothly, but for some reason I
      can't connect to the HTTP port on this one.<br>
      <br>
      Any clues what I'm missing?<br>
      <br>
      I can:<br>
      <br>
      1. SSH into my server from an external workstation.<br>
      2. Ping my server by DNS name from an external workstation.<br>
      3. I can load the default web page when I'm SSH'd in, this works
      fine:<br>
      <pre class="jive-pre"><code class="jive-code jive-java">$ wget localhost
--2012-10-04 17:44:35--  http:<font color="darkgreen">//localhost/</font>
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2432 (2.4K) [text/html]
Saving to: âindex.html.1â
 
100%[======================================&gt;] 2,432       --.-K/s   in 0s
 
2012-10-04 17:44:35 (183 MB/s) - âindex.html.1â
</code></pre>
      <br>
      However, I cannot connect via HTTP externally, even using the  IP
      address:<br>
      <br>
      4. Unable to connect Firefox can't establish a connection to the
      server at 54.243.205.88.<br>
      <br>
      I'm not sure where I could have fubared this. I did try to
      redirect the ports from 80 to 8080, perhaps that was done
      incorrectly?<br>
      <br>
      <pre class="jive-pre"><code class="jive-code jive-java">[ec2-user@domU-12-31-39-0A-A0-29 ~]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
 
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
 
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[ec2-user@domU-12-31-39-0A-A0-29 ~]$ sudo iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 21 packets, 1608 bytes)
 pkts bytes target     prot opt in     out     source               destination
  150  7600 REDIRECT   tcp  --  eth0   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 redir ports 8080
 
Chain INPUT (policy ACCEPT 171 packets, 9208 bytes)
 pkts bytes target     prot opt in     out     source               destination
 
Chain OUTPUT (policy ACCEPT 45 packets, 3625 bytes)
 pkts bytes target     prot opt in     out     source               destination
    2   120 REDIRECT   tcp  --  *      *       0.0.0.0/0            127.0.0.1            tcp dpt:80 redir ports 8080
    0     0 REDIRECT   tcp  --  *      *       0.0.0.0/0            10.211.163.215       tcp dpt:80 redir ports 8080
 
Chain POSTROUTING (policy ACCEPT 47 packets, 3745 bytes)
 pkts bytes target     prot opt in     out     source               destination
</code></pre>
      <br>
      <br>
      I thought this should be exactly the same as the last time I did
      it, so I don't know why it wouldn't work. <br>
      Here's the script I used to set up the iptables:<br>
      <br>
      iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j
      REDIRECT  --to-ports 8080<br>
      iptables -t nat -A OUTPUT -d 10.211.163.215 -p tcp --dport 80 -j
      REDIRECT  --to-ports 8080<br>
      iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j 
      REDIRECT --to-ports 8080<br>
      /etc/init.d/iptables save<br>
      /etc/init.d/iptables restart<br>
      <br>
      <br>
      I'm completely at a loss how to troubleshoot this further, any
      advice is much appreciated.<br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>