I'm using UFW on Fedora Server 28 and when I allow port 80 and make sure that apache is running, no server pops up in my browser. I'm doing this via ssh, so I know the device is connected. Using nmap on another computer indicates port 80 is not open, but 22 (ssh) is. Any ideas?

UFW status:

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
80                         ALLOW       Anywhere                  
22 (v6)                    ALLOW       Anywhere (v6)             
80 (v6)                    ALLOW       Anywhere (v6)             

Apache status:

Warning: The unit file, source configuration file or drop-ins of httpd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
   Active: active (running) since Mon 2018-05-28 12:20:35 CDT; 15h ago
     Docs: man:httpd.service(8)
  Process: 15958 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
 Main PID: 13757 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 4500)
   Memory: 19.7M
   CGroup: /system.slice/httpd.service
           ├─13757 /usr/sbin/httpd -DFOREGROUND
           ├─15959 /usr/sbin/httpd -DFOREGROUND
           ├─15960 /usr/sbin/httpd -DFOREGROUND
           ├─15961 /usr/sbin/httpd -DFOREGROUND
           └─15965 /usr/sbin/httpd -DFOREGROUND

The default firewall tool on Fedora is firewalld. It is installed and running by default. If you choose not to use it, and use ufw instead, then you also have to disable firewalld.

systemctl stop firewalld
systemctl mask firewalld

Restart ufw or restart your computer after disabling firewalld.

ufw disable
ufw enable

Of course firewalld is the recommended firewall tool, and it's probably about as easy to use as ufw for basic stuff while providing a lot more flexibility if you need it later.

|improve this answer|||||
  • It works! Thanks so much! Now my followup question: why did port 22 work immediately when I didn't allow it view firewalld? – Jersh Nov 15 '18 at 15:27
  • It was already open in firewalld. – Michael Hampton Nov 15 '18 at 15:35

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.