Portal Home > Knowledgebase > Articles Database > csf and iptables


csf and iptables




Posted by ttgt, 04-13-2009, 03:49 AM
i install csf on centos, my server is working but the network is unreachable, i try to run "service iptables stop", and the server is unreachable now, i check from whm,it shows csf is working, but i ssh the server and type "service iptables status", it shows "firewall is stopped", is it correct? is not,how can i fix the issue? thanx

Posted by Quel, 04-13-2009, 03:54 AM
service csf stop iptables --flush That will clean up all rules. and revise the csf file to open all ports needed. check that ports 21,22,25,80,445 are open, both tcp and udp. And it is likely that you need others if you use a control panel..etc Quel

Posted by eth00, 04-13-2009, 07:35 AM
iptables is the linux software firewall. csf is simply a frontend to it, csf makes it so you don't have to know how to actually work iptables.

Posted by ttgt, 04-13-2009, 08:20 AM
by the way,how can i make sure if my setting in csf is working on iptables now? thanx

Posted by eth00, 04-13-2009, 09:00 AM
iptables -L -n should show hundreds of lines. You could also portscan it before and after and see if there is a change (there may not be depending on what you are running).

Posted by ttgt, 04-13-2009, 10:00 AM
but if iptables not work or does not exist, how csf to control it to do defense? thanx

Posted by eth00, 04-13-2009, 10:02 AM
If iptables is not running csf is not doing anything.

Posted by ttgt, 04-13-2009, 10:04 AM
by the way,if my iptables is stopped, my csf is no effect on my iptables and there is no working firewall at all? thanx

Posted by RZNetworks, 04-14-2009, 09:16 AM
That's correct - if you stop your iptables service - csf will not function. csf isn't actually preventing packets from reaching the server and its applications, csf is controlling iptables, which depending on the rules set - prevent packets from reaching the applications. csf is dependent on iptables.

Posted by ttgt, 04-14-2009, 09:41 AM
is lfd depend on iptables,too? thanx

Posted by ServerManagement, 04-14-2009, 10:43 AM
You should enter anything you want to do in CSF, not iptables directly. CSF and LFD work together, so make any changes in CSF.

Posted by mattchariot, 04-14-2009, 12:35 PM
use direct CSF for the rules you want to add.. It will automatically gose to iptables.. Also make sure that you will enable ssh port on csf firewall..



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
APF ? on openvz vps (Views: 645)
HTTPme Unreachable (Views: 871)

Language: