How to install csf on a VPS .
How to install csf on a VPS or how to fix the error ” Error: iptables command [/sbin/iptables -v -A LOGDROPIN -p tcp -m limit --limit 30/m --limit-burst 5 -j LOG --log-prefix 'Firewall: *TCP_IN Blocked* '] failed, at line 196″
Introduction:
CSF is giving good compatibility with cpanel servers . But in a vps (openvz or Virtuzzo) the csf configuration is quite different.
Sometimes you may get an error as follow after the csf installation in vps
Error: iptables command [/sbin/iptables -v -A LOGDROPIN -p tcp -m limit --limit 30/m --limit-burst 5 -j LOG --log-prefix 'Firewall: *TCP_IN Blocked* '] failed, at line 196
So how to resolve this issue?. Let us do it as follows,
If you get the above error, then uninstall csf from your VPS & reinstall as follows.
There are two steps to configure the csf on a vps
i)Main vps server ( The host server ,in which the vps nodes are running) configuration
ii) Vps node configuration.
i)Main vps serverconfiguration :-
Before starting the csf installation in a node login to the main server (host server) and check whether the following modules are inserted in to the kernel
ipt_conntrack
ipt_LOG
ipt_owner
ipt_state
ip_conntrack_ftp
You can check it as follows
# lsmod |grep -i <module-name>
If not please insert these modules into the kernel.
#modprob <module-name>
eg: modprob ipt_conntrack
Now add these modules to iptable configuration as follows.
# vi /etc/sysconfig/iptables-config
Add the following in this file
IPTABLES_MODULES=”ipt_conntrack ipt_LOG ipt_owner ipt_state ip_conntrack_ftp”
Now edit the vps configuration file from /etc/sysconfig/vz-scripts/
Let 101 is the VEID, add the above inserted modules into the IPTABLE section in this configuration file.
To find the VEID :
vzlist -a
# vi /etc/sysconfig/vz-scripts/101.conf
IPTABLES=”iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ipt_state
iptable_nat ip_nat_ftp ipt_owner ip_conntrack_ftp”
Now we completed the main vps server(node) configuration . So now reboot the child node (not main server) as follows
# vzctl restart <veid>
eg: vzctl restart 101
ii) Vps node configuration.
Now ssh or vzctl enter into the child.
eg : vzctl enter VEID
Now download and install the csf .
Download here :- http://www.configserver.com/free/csf.tgz
sh /etc/csf/install.sh
Before starting the csf let us do some configurations as follows , Edit the file /etc/csf/csf.conf .Then set the following variables
ETH_DEVICE = “venet0″ #from ifconfig you can see the n/w device
MONOLITHIC_KERNEL = “1″
VERBOSE = “0″ # will disable the verbose output during start
start the csf and lfd :-
/etc/init.d/csf start
/etc/init.d/lfd start
DONE!
1 Comment to “How to install csf on a VPS .”
Post comment
12MP administrator bash bashrc calculator camera cd/dvd cfs error change IP cPanel csf csf iptable csf vps DKIM dkim spam eject eject linux execution time exim fake orkut FTP ftp error hacking history IP iptable error Linux linux disc Notepad Tricks open source orkut phishing password private folder in windows pro-ftp pure-ftp recover password Red Hat reset administrator password samsung secret folder Teiid time of command time out error Windows windows tricks
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Recent Posts
- Fix Toshiba battery issue for Linux
- How to enable DKIM in cPanel server.
- Exim: remove mails in queue from a particular sender.E
- OpenVZ network down SIOCADDRT: Network is unreachable
- How to configure NAT with iptables on a VPS.
- How to disable gzip output on lightspeed server accounts
- Find Linux OS is 32 or 64bit.
- songbird! iTunes for Ubuntu
- How to Hide Text in Notepad !!
- How to transfer a cPanel account to DirectAdmin.
- System User Account in Windows XP !!
- Configure Windows XP to Automatically Login!
- How to change Linux root password temporarily.
- How to install winrar for Linux
- social networking all together by Digsby.
Recent Comments
- ido on Fix Toshiba battery issue for Linux
- Pablo Barrales on Fix Toshiba battery issue for Linux
- FullMetal on Fix Toshiba battery issue for Linux
- Rodger on Fix Toshiba battery issue for Linux
- John on Fix Toshiba battery issue for Linux




[...] This post was mentioned on Twitter by techinterplay. techinterplay said: How to install csf on a VPS . – How to install csf on a VPS or how to fix the error " Error: iptables command… http://is.gd/bD7UN #linux [...]