csf rewrite iptables after restart service

Post Reply
mzainal
Junior Member
Posts: 9
Joined: 13 Jan 2016, 02:04

csf rewrite iptables after restart service

Post 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.
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: csf rewrite iptables after restart service

Post by ForumAdmin »

You need to use a csfpost.sh script to setup your custom iptables rules. See /etc/csf/readme.txt for more info.
mzainal
Junior Member
Posts: 9
Joined: 13 Jan 2016, 02:04

Re: csf rewrite iptables after restart service

Post by mzainal »

Does old rule will flush or it will add a new rule among old rule?
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: csf rewrite iptables after restart service

Post by ForumAdmin »

You use the csfpost.sh to insert your own rules after csf has configured its own rules.
mzainal
Junior Member
Posts: 9
Joined: 13 Jan 2016, 02:04

Re: csf rewrite iptables after restart service

Post by mzainal »

Thank you for clarify it.
mzainal
Junior Member
Posts: 9
Joined: 13 Jan 2016, 02:04

Re: csf rewrite iptables after restart service

Post by mzainal »

Try find csfpost.sh from CLI. But i did not found it.

Code: Select all

find / -name csfpost.sh
No result.
mzainal
Junior Member
Posts: 9
Joined: 13 Jan 2016, 02:04

Re: csf rewrite iptables after restart service

Post 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 [~]#
Post Reply