Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I can't find an answer to this question anywhere.

I have ssh access set up, and can tunnel into my server. When on the server, I can curl localhost and get a response:

curl localhost

However, when I attempt to access port 80 on my LAN, I get no response.

I have edited IPTables to show:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http

Any help would be appreciated.

share|improve this question

1 Answer 1

iptables is accepting connections from anywhere destined to port 80, fine.

Based on the fact that you can curl localhost but NOT from another host within the LAN, I reckon the daemon running listens to loopback only, change it to listen on your NICs, for example eth0 and restart the service.

e.g.

Apache vhost config file

<VirtualHost *:80>

Nginx vhost config file

server {
    listen   *:80;
    ...
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.