change command iptables to csf

Post Reply
3245
Junior Member
Posts: 7
Joined: 19 Sep 2013, 10:38

change command iptables to csf

Post by 3245 »

Hello,
i have two line code for iptables for allow just a range ip for able check my port, cause i have a backend ip (reverse proxy), and i dont want anyone able detect it (for secure against ddos and etc)

its below, but when i installed CSF, iptables disabled, so i want know how i can run this two command on CSF?

iptables -I INPUT -p tcp -m multiport --dports http,https -s 186.2.160.0/24 -j ACCEPT
iptables -I INPUT -p tcp -m multiport --dports http,https -s 77.220.207.192/26 -j ACCEPT

Thanks.
Black Tiger
Junior Member
Posts: 73
Joined: 17 Feb 2009, 14:14
Contact:

Re: change command iptables to csf

Post by Black Tiger »

If you want to run them after csf has run, then create a file called /etc/csf/csfpost.sh and add the lines in there.

If you want them applied before CSF runs, create a file called /etc/csf/csfpre.sh and add the lines in there.

In both cases you ofcourse have to restart csf after creating or changing them.
Post Reply