Page 1 of 1

csf rewrite iptables after restart service

Posted: 13 Jan 2016, 02:48
by mzainal
Hi,

I'm doing some customize to iptables using limit burst. But when restart csf in cpanel, those customs rule gone.

I restart csf from cpanel because i set connection limit on port 80. We have several dos attack a few days ago on our client server. Please advice.

Thanks.

Re: csf rewrite iptables after restart service

Posted: 13 Jan 2016, 08:18
by ForumAdmin
You need to use a csfpost.sh script to setup your custom iptables rules. See /etc/csf/readme.txt for more info.

Re: csf rewrite iptables after restart service

Posted: 13 Jan 2016, 08:23
by mzainal
Does old rule will flush or it will add a new rule among old rule?

Re: csf rewrite iptables after restart service

Posted: 13 Jan 2016, 08:25
by ForumAdmin
You use the csfpost.sh to insert your own rules after csf has configured its own rules.

Re: csf rewrite iptables after restart service

Posted: 13 Jan 2016, 08:28
by mzainal
Thank you for clarify it.

Re: csf rewrite iptables after restart service

Posted: 14 Jan 2016, 07:46
by mzainal
Try find csfpost.sh from CLI. But i did not found it.

Code: Select all

find / -name csfpost.sh
No result.

Re: csf rewrite iptables after restart service

Posted: 14 Jan 2016, 07:48
by mzainal

Code: Select all

root@shared [~]# ls /etc/csf
./              csf.blocklists.new  csf.ignore     csf.rblconf    csf.smtpauth     csfui.pl@       license.txt            ui/
../             csf.conf            csf.logfiles   csf.redirect   csf.suignore     csfwebmin.tgz@  messenger/             uninstall.sh@
alerts@         csf.deny            csf.logignore  csf.resellers  csf.syslogs               pt_deleted_action.pl@  version.txt
changelog.txt   csf.dirwatch        csf.mignore    csf.rignore    csf.syslogusers  index.html      readme.txt             webmin@
csf.allow       csf.dyndns          csf.pignore    csf.signore    csftest.pl@      install.txt     regex.custom.pm@
csf.blocklists  csf.fignore         csf.pl@        csf.sips       csf.uidignore    lfd.pl@         remove_apf_bfd.sh@
root@sshared [~]#