hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : VPS Tutorials : Steps to install CSF in your VPS
Reply

VPS Tutorials Tutorials related to VPS.
Forum Jump

Steps to install CSF in your VPS

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-17-2012, 09:46 AM
whrss whrss is offline
Premium Member
 
Join Date: May 2009
Location: SLASH ROOT
Posts: 554
Arrow

Steps to install CSF in your VPS


Below was the error while trying to install CSF in one of the OpenVz containers:

Quote:
[root@abc ~]# perl /etc/csf/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...FAILED [ 4294967295] - Required for csf to function
Testing ipt_multiport/xt_multiport...FAILED [FATAL Error: iptables: Unknown error 4294967295] - Required for csf to function
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...FAILED [FATAL Error: iptables: Unknown error 4294967295] - Required for csf to function
Testing ipt_limit/xt_limit...FAILED [FATAL Error: iptables: Unknown error 4294967295] - Required for csf to function
Testing ipt_recent...FAILED [Error: iptables: Unknown error 4294967295] - Required for PORTFLOOD and PORTKNOCKING features
Testing xt_connlimit...FAILED [Error: iptables: Unknown error 4294967295] - Required for CONNLIMIT feature
Testing ipt_owner/xt_owner...FAILED [Error: iptables: Unknown error 4294967295] - Required for SMTP_BLOCK and UID/GID blocking features
Testing iptable_nat/ipt_REDIRECT...FAILED [Error: iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)] - Required for MESSENGER feature
Testing iptable_nat/ipt_DNAT...FAILED [Error: iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)] - Required for csf.redirect feature
Enable Iptables Modules for a VPS:

1 . Before enabling the modules to a VPS , make sure that its enabled in the root node of the VPS. You can check it using the command:

Quote:
lsmod | grep -i module_name

2. If its not enabled, then it can enable by using the modprobe command:

Quote:


modprobe iptables_module

modprobe ipt_helper

modprobe ipt_REDIRECT

modprobe ipt_TCPMSS

modprobe ipt_LOG

modprobe ipt_TOS

modprobe iptable_nat

modprobe ipt_length

modprobe ipt_tcpmss

modprobe iptable_mangle

modprobe ipt_tos

modprobe iptable_filter

modprobe ipt_helper

modprobe ipt_tos

modprobe ipt_ttl

modprobe ipt_SAME

modprobe ipt_REJECT

modprobe ipt_helper

modprobe ipt_owner

modprobe ip_tables

modprobe ipt_MASQUERADE

modprobe ipt_multiport/xt_multiport

modprobe ipt_state/xt_state

modprobe ipt_limit/xt_limit

modprobe ipt_recent

modprobe xt_connlimit

modprobe ipt_owner/xt_owner

modprobe iptable_nat/ipt_DNAT

modprobe iptable_nat/ipt_REDIRECT
3. Stop the container which one you want to enable the module :

Quote:
# vzctl stop 101


4 . Executing the following command:-



a) Via Command line:

Execute following command to enable all the modules for the VPS


Quote:
# vzctl set 101 --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save
or

b) Add Rules manually:

Open the VPS configuration file which exists at /etc/vz/conf/veid.conf and paste following in the last line of the file.


Quote:
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 ip_conntrack_ftp ip_conntrack_irc ipt_conntrack ipt_state ipt_helper iptable_nat ip_nat_ftp ip_nat_irc"


5. Restart the container.

Quote:
# vzctl restart 101

Reply With Quote


Sponsored Links
  #2  
Old 07-17-2012, 08:16 PM
0ccul7 0ccul7 is offline
Junior Guru
 
Join Date: Jul 2011
Posts: 209
This is a good one there

Reply With Quote
  #3  
Old 07-17-2012, 08:30 PM
TravisT-[SSS] TravisT-[SSS] is offline
Temporarily Suspended
 
Join Date: Mar 2012
Location: Tampa, FL =)
Posts: 1,757
Very well written out. Nice job!

Reply With Quote
Sponsored Links
  #4  
Old 07-19-2012, 08:31 AM
sean20 sean20 is offline
Junior Guru Wannabe
 
Join Date: Jul 2012
Location: USA
Posts: 89
Code:
Testing ipt_recent...FAILED [Error: iptables: Unknown error 4294967295] - Required for PORTFLOOD and PORTKNOCKING features
Testing xt_connlimit...FAILED [Error: iptables: Unknown error 4294967295] - Required for CONNLIMIT feature
For those 2, you have to contact your VPS host provider, you can't do it on your VPS.

Reply With Quote
  #5  
Old 07-19-2012, 09:50 AM
whrss whrss is offline
Premium Member
 
Join Date: May 2009
Location: SLASH ROOT
Posts: 554
Quote:
Originally Posted by sean20 View Post
Code:
Testing ipt_recent...FAILED [Error: iptables: Unknown error 4294967295] - Required for PORTFLOOD and PORTKNOCKING features
Testing xt_connlimit...FAILED [Error: iptables: Unknown error 4294967295] - Required for CONNLIMIT feature
For those 2, you have to contact your VPS host provider, you can't do it on your VPS.
That is right. In fact all the steps mentioned above should be done on the Hardware node.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Install cPanel/WHM on CentOS (3 Steps) Netshop-Isp Hosting Software and Control Panels Tutorials 8 Yesterday 04:11 PM
Installed CSF, what else should I install to secure vps server with DA onnoysomoy Hosting Security and Technology 11 01-05-2011 04:27 AM
Install Webmin on Linux CentOS in 4 steps Netshop-Isp Hosting Software and Control Panels 0 10-23-2010 09:48 AM
Steps to install BlueDragon HOUSCOUS Hosting Software and Control Panels 14 01-01-2004 02:14 AM

Related posts from TheWhir.com
Title Type Date Posted
Web Host A2 Hosting Launches Customizable VPS Hosting Plans Web Hosting News 2012-06-07 15:11:57
Web Host Cyber Host Pro Launches New VPS Packages Web Hosting News 2011-09-16 18:15:55
Web Host A2 Hosting Launches QuickInstaller Tool for VPS Plans Web Hosting News 2011-08-19 20:00:53
Web Host HostingZoom Adds Softaculous Auto-Installer to Hosting Plans Web Hosting News 2011-08-17 17:52:34
Attracta Offers Single-Click Web App Installation to Customers Web Hosting News 2011-08-11 16:57:09


Tags
csf firewall, csf install, openvz, vps

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?