You are not logged in.

#1 2017-08-02 17:31:39

aarchinoob
Member
Registered: 2017-08-02
Posts: 2

[Solved] UFW won't open port 80

Some time ago, I set up a UFW firewall, and let it block most ports. However, I needed to serve a page for a small number of local devices today.  Therefore, I tried to make UFW enable it for the whole local network. After a lot of tries, the output of

ufw status verbose

is the following

Status: active
Logging: on (low)
Default: allow (incoming), allow (outgoing), deny (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
80                         ALLOW IN    Anywhere                  
Anywhere                   ALLOW IN    192.168.0.200             
80 (v6)                    ALLOW IN    Anywhere (v6)             

80                         ALLOW OUT   Anywhere                  
80 (v6)                    ALLOW OUT   Anywhere (v6)             

From my machine, the output of

curl 192.168.0.105

is the page that should be served.
However, when executing

curl 192.168.0.105

it tells me that the port isn't open:

curl: (7) Failed to connect to 192.168.0.105 port 80: Connection refused

In dmesg, the following log entries are 13 times visible, but haven't appeared since (Altough access still was denied):

[Aug 2 15:47] [UFW BLOCK] IN=wlo1 OUT= MAC=3c:a9:f4:3e:df:58:e4:ce:8f:62:8d:2a:08:00 SRC=192.168.0.200 DST=192.168.0.105 LEN=64 TOS=0x00 PREC=0x00 TTL=64 ID=15728 DF PROTO=TCP SPT=52588 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0 

EDIT: The iptables unit is disabled, and stopped. The ufw unit is active (exited) with the following status:

ufw.service - CLI Netfilter Manager
   Loaded: loaded (/usr/lib/systemd/system/ufw.service; disabled; vendor preset: disabled)
   Active: active (exited) since Wed 2017-08-02 16:04:03 CEST; 3h 31min ago
 Main PID: 6300 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/ufw.service

Aug 02 16:04:02 demeter systemd[1]: Starting CLI Netfilter Manager...
Aug 02 16:04:03 demeter systemd[1]: Started CLI Netfilter Manager.

Last edited by aarchinoob (2017-08-02 20:08:24)

Offline

#2 2017-08-02 20:08:07

aarchinoob
Member
Registered: 2017-08-02
Posts: 2

Re: [Solved] UFW won't open port 80

After checking again for conflicting services, I found that I had nftables installed and enabled. After disabling it, and a restart, everything worked again.

Offline

Board footer

Powered by FluxBB