CSF blocking and closing port 80

Post Reply
qleb
Junior Member
Posts: 1
Joined: 13 Mar 2015, 17:15
Location: United Arab Emirates

CSF blocking and closing port 80

Post by qleb »

Hello

from 2 days ago all my websites on the server goes down , I've disabled CSF and its up again

when i enable CSF port 80 got closed when i disable it port 80 is open

I've checked TCP in out port 80 is included

what is the problem ?
masterguru
Junior Member
Posts: 2
Joined: 18 Mar 2015, 19:07

Re: CSF blocking and closing port 80

Post by masterguru »

No idea, but I am having same problem in a WHM server.

I have set lots of servers with CSF Firewall but this one is blocking port 80 and 443 despite they are set in csf.conf, as always.

It is showing this error messages in /var/log/messages when trying to connect to http:

Mar 18 19:07:49 hostname kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:88:54:c0:00:1c:73:63:c5:e5:08:00 SRC=192.185.0.164 DST=x.x.x.x LEN=60 TOS=0x00 PREC=0x00 TTL=61 ID=7210 DF PROTO=TCP SPT=40504 DPT=80 WINDOW=14600 RES=0x00 SYN URGP=0

But inside iptables the rules looks good:
$ iptables -L | grep http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
tcp -- x.x.x.x anywhere tcp dpt:http
tcp -- anywhere x.x.x.x tcp spt:http

I have no idea what is happening, I have tried everything that I know but not success.

Any idea will be welcome, thanks!
masterguru
Junior Member
Posts: 2
Joined: 18 Mar 2015, 19:07

Re: CSF blocking and closing port 80

Post by masterguru »

Well, mistery solved.

It was a managed hostgator server, and Hostgator uses its own firewall that it was disturbing CSF Firewall (despite I had disabled it but seems hostgator have its own tools installed apart from firewall that disturbs CSF causing unexpected issues).

So, DO NOT try to install CSF Firewall in a managed Hostgator server.
Post Reply