0

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.

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;
    ...
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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