Portal Home > Knowledgebase > Articles Database > CSF not Allowing Ports !!!
CSF not Allowing Ports !!!
Posted by Rezaa, 03-05-2012, 11:06 AM |
Hello,
My CSF does not Allow ports that listed in "Allow incoming TCP ports".
When I add a port in TCP_IN and TCP_OUT fields, and then saving changes and restarting lfd, Port will be open for a few seconds during restart, but it will be useless upon restart finished.
It made me really confused!
Any suggestion ?
|
Posted by krizag, 03-05-2012, 12:03 PM |
How are you restarting csf? Is testing mode enabled in csf conf?
How are you making sure that the ports are not open?
|
Posted by Rezaa, 03-05-2012, 12:13 PM |
I guess you think I'm a newbie, But I'm not. I know how to restart CSF/LFD.
I do restart lfd from CSF interface in WHM.
Ofcourse testing mode is not enabled.
This port is used for a payment gateway. As payment gateway says "could not connect to host" so there is some problems with server.
As I mentioned in previouse post, problem willbe fixed during restart but after that, port will be blocked again and all connections will be refused.
|
Posted by GORF, 03-05-2012, 12:35 PM |
Have you flushed CSF?
|
Posted by SafeSrv, 03-05-2012, 12:45 PM |
Try add the IP to the allow list and restart !
|
Posted by n@sh, 03-05-2012, 03:19 PM |
Hey,
Try to add iptables rules in the file /etc/csf/csfpost.sh to open your ports and restart csf.
vi /etc/csf/csfpost.sh
and add
iptables -I INPUT/OUTPUT -s 0/0 -p tcp --dport -j ACCEPT
Use INPUT for inbound connection and OUTPUT for Outbound connection.
|
Posted by Rezaa, 03-05-2012, 03:27 PM |
Problem has been fixed.
Connections to that port was refused because there was no service running on that port.
|
Posted by brianoz, 03-06-2012, 07:18 AM |
A very bad idea ... CSF provides neater ways of doing these things. Like adding a line to csf.allow or adding a port to TCP_IN etc.
|
Posted by madaboutlinux, 03-06-2012, 08:19 AM |
Right, there was no problem with the way you allowed the port but a service should be running on the port to respond.
|
Add to Favourites Print this Article
Also Read