You are not logged in.

#1 2012-02-28 18:31:10

beetlejuice7
Member
Registered: 2012-02-28
Posts: 49

SSH works but no luck with HTTP

This is my first time running arch -- I was able to get OpenSSH server up and running and can connect no problem.  I installed nginx as well, but am unable to access the web server.

I am able to ``curl localhost`` and see the correct output, but am unable to connect from outside.

I tried installing ufw and setting that up but still no luck.  Here are my settings:

sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
80/tcp                     ALLOW       Anywhere
22                         ALLOW       Anywhere

When I ``curl`` from elsewhere, I get:

curl: (7) couldn't connect to host

Lastly, output from ``lsof -i``

nginx     1132     root    8u  IPv4   8214      0t0  TCP *:http (LISTEN)
nginx     1133     http    8u  IPv4   8214      0t0  TCP *:http (LISTEN)

Any ideas?

Last edited by beetlejuice7 (2012-02-28 18:40:50)

Offline

#2 2012-02-28 19:35:33

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: SSH works but no luck with HTTP

Try

# netstat -puntal|grep nginx

That should tell you whether nginx is only listening on localhost.

Does telnetting to port 80 work? If it does, then it means there's something active on that port.

You really should try with the firewall disabled as well.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-02-28 19:43:36

beetlejuice7
Member
Registered: 2012-02-28
Posts: 49

Re: SSH works but no luck with HTTP

sudo ss -puntal|grep nginx
tcp    LISTEN     0      128                    *:80                    *:*      users:(("nginx",802,8),("nginx",800,8))

Worth noting: I am able to, from the machine in question, ``curl the.external.ip`` and everything works.  Trying to ``curl`` from outside the network does not work however.

I also tried turning off the firewall, no change.

Last edited by beetlejuice7 (2012-02-28 19:43:58)

Offline

#4 2012-02-28 19:53:15

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: SSH works but no luck with HTTP

And telnet?

Define 'outside the network'. That should mean 'outside my LAN', but the way you use it it only looks like accessing nginx only works for localhost (ie the box it is running from).

Last edited by .:B:. (2012-02-28 19:54:26)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2012-02-28 20:00:12

beetlejuice7
Member
Registered: 2012-02-28
Posts: 49

Re: SSH works but no luck with HTTP

Telnet works fine locally.  Outside the LAN is where I run into trouble.  Interestingly, though, I am able to

curl <the.external.ip>

from the machine running the web server.  Hope that clarifies

Offline

#6 2012-02-28 20:08:12

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: SSH works but no luck with HTTP

Does telnet work fine from other computers in your LAN? Is port 80 forwarded in your router?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2012-02-28 20:11:18

beetlejuice7
Member
Registered: 2012-02-28
Posts: 49

Re: SSH works but no luck with HTTP

Ahhh sorry I misunderstood!  I'm at work right now and have no access to the LAN besides the computer in question.

Offline

#8 2012-02-28 20:13:06

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: SSH works but no luck with HTTP

Well that's what you should test. You probably just haven't forwarded port 80 in your router's firewall.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#9 2012-02-28 20:19:50

beetlejuice7
Member
Registered: 2012-02-28
Posts: 49

Re: SSH works but no luck with HTTP

Awesome, will try that in a couple hours and update accordingly.  Think you're probably right, and if so, total derp :-[

Offline

#10 2012-02-29 03:04:43

beetlejuice7
Member
Registered: 2012-02-28
Posts: 49

Re: SSH works but no luck with HTTP

Update: I think it may be cox, my ISP.  I am able to reach everything on the local network.  The router firewall rules are configured identically for port 22 as they are for port 80 (and ssh works, of course).  Leads me to believe that maybe cox is blocking traffic on port 80?

Output of traceroute run from an amazon ec2 instance:

 1  10.206.92.3 (10.206.92.3)  0.364 ms  0.432 ms  0.481 ms
 2  ip-10-1-18-37.ec2.internal (10.1.18.37)  1.840 ms ip-10-1-12-37.ec2.internal (10.1.12.37)  0.388 ms ip-10-1-30-37.ec2.internal (10.1.30.37)  0.432 ms
 3  ip-10-1-29-14.ec2.internal (10.1.29.14)  0.421 ms ip-10-1-15-14.ec2.internal (10.1.15.14)  0.544 ms  0.637 ms
 4  216.182.224.82 (216.182.224.82)  0.629 ms  0.610 ms 216.182.224.78 (216.182.224.78)  0.492 ms
 5  72.21.222.148 (72.21.222.148)  0.765 ms  0.752 ms  0.969 ms
 6  72.21.220.52 (72.21.220.52)  1.179 ms 72.21.220.44 (72.21.220.44)  1.941 ms 72.21.220.52 (72.21.220.52)  1.438 ms
 7  72.21.221.10 (72.21.221.10)  1.185 ms ashbbbpj02-ae0.r2.as.cox.net (70.167.150.45)  1.380 ms 72.21.221.10 (72.21.221.10)  1.129 ms
 8  kscydsrj01-ge610.rd.ks.cox.net (68.1.1.177)  48.960 ms  49.185 ms kscydsrj02-ge610.rd.ks.cox.net (68.1.1.197)  48.782 ms
 9  ip70-183-65-22.ks.ks.cox.net (70.183.65.22)  53.797 ms ip70-183-65-26.ks.ks.cox.net (70.183.65.26)  61.418 ms ip70-183-65-22.ks.ks.cox.net (70.183.65.22)  50.520 ms
10  70.183.70.166 (70.183.70.166)  50.961 ms 70.183.70.170 (70.183.70.170)  56.680 ms 70.183.70.166 (70.183.70.166)  50.937 ms
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *

What a bunch of assholes:

http://ww2.cox.com/residential/idaho/su … 0000000%7D

Last edited by beetlejuice7 (2012-02-29 03:06:14)

Offline

#11 2012-02-29 03:48:34

n1x4
Member
From: Chernobyl
Registered: 2012-02-17
Posts: 149
Website

Re: SSH works but no luck with HTTP

Sign up with 'no-ip.com' or some other free DNS hosting service and redirect port 80. Should solve your poblem man.

Edit** Or just configure your httpd to run on another port other than 80. Locate nginx.conf and find the line:

# port to listen on. Can also be set to an IP:PORT
    listen 80;

Change to whatever port you want.

Last edited by n1x4 (2012-02-29 03:55:11)


||github||

Offline

#12 2012-02-29 04:18:18

MastodonHQ
Member
From: East TN,USA
Registered: 2012-02-29
Posts: 4
Website

Re: SSH works but no luck with HTTP

you could switch to at&t though they are asses about smtp(port 25) so i was unable to setup squirrel mail sad , another option is to listen on another port, then connect from the outside to the port, first sign up with the guys at freedns(http://freedns.afraid.org) or anyother free dns service, then when you want to hit your website up, example: http://mysubdomain.domainprovider.com/:9000. at&t doesn't block that many ports just port 25, netbios ports, and i think a few miscellaneous ports, though you only get a percentage of their advertised speeds we pay $49 or $40 a month and rarely get anything above 365kbps on the download side, upload is at most i think 25kbps though i haven't checked in awhile.

Last edited by MastodonHQ (2012-02-29 04:19:26)

Offline

Board footer

Powered by FluxBB