I setup a simple nginx server and it works if I just type localhost into the browser. If I try to access it from my phone in the same network, by typing the IP address of my computer, I get a "webpage not available" message. This is my nginx.conf:

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.fedora.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;

http {
    server {
        listen 80;
        location / {
            root /usr/share/nginx/html;

According to this post, I configured my firewall to allow http in the Home zone, and set the wireless network to be in that zone.

The first two entries in the INPUT chain of iptables are

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             ctstate     RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            

so I don't think that's the problem.

And yet, looking at the tcpdump capture of the request from my phone I see a reply host unreachable - admin prohibited:

21:13:38.514782 IP > sidney.http: Flags [S], seq 2569820651, win 14600, options [mss 1460,sackOK,TS val 3018406 ecr 0,nop,wscale 6], length 0
21:13:38.514934 IP sidney > ICMP host sidney unreachable - admin prohibited, length 68

Output of firewall-cmd --list-all --zone=home:

home (active)
  target: default
  icmp-block-inversion: no
  interfaces: wlo1
  services: dhcpv6-client http mdns samba-client ssh
  ports: 80/tcp
  masquerade: no
  rich rules:

What could be the problem? I'm on Fedora 24.

  • That is the behavior I would expect for using localhost as your domain. See someone with a similar issue over at Server Fault: serverfault.com/questions/804228/… You should be able to enter the IP address and have your site served. – Paul Sep 21 '16 at 0:48
  • I do use the IP when accessing from my phone. And since the packets show up in tcpdump, it's the correct IP. – devil0150 Sep 21 '16 at 7:46
  • Are you able to access it locally by using the IP? I'm not sure which side that capture is from. Some home routers do have a setting to prevent your WLAN network to connect to host on the LAN and vice versa. – Seth Sep 21 '16 at 8:19
  • Yes I can access it with the IP locally. The capture is done at the computer that hosts the server. Running sshd as a ssh server works fine and can be accessed from the phone so I don't think there's anything the router is doing. – devil0150 Sep 21 '16 at 8:25
  • Please post the output of firewall-cmd --list-all. – Michael Hampton Sep 22 '16 at 6:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.