Get Paid to Participate     Twitter     Facebook     Google+
Hosting Discussion
 

Hosting Discussion > Web Hosting Forums > Hardware and Server Configuration > Commands for securing a Cpanel Server
forgot password?


Reply


Old
  Post #1 (permalink)   02-12-2005, 02:24 AM
HD Guru
 
Join Date: Jan 2005
Posts: 850

Status: talkwebhosts.co is offline
1) Shell fork Enabled
2) Annoymouse FTP Disabled
3) Background Processes killed
4) Make sure apache is secured and all Ver are matching correctly
5) cd /scripts
./updatenow
./upcp
./fixcommonproblems
6) cd /tmp
rm -R -f sess*
rm -R -f cpanel*
rm -R -f php*

Anything to add or subtract from this list? This was provided by frattay22!
__________________
Web Hosting Forum :: Come Help Build A New Hosting Community!
TargetedWebTraffic.net :: Purchase Quality Targeted Traffic For Your Website
 
 
 


Old
  Post #2 (permalink)   02-12-2005, 05:48 AM
HD Addict
 
Join Date: Jan 2005
Posts: 183

Status: cats-computing is offline
Thanks frattay. We'll keep it in mind.
__________________
CatsNine // http://www.catsnine.com
Affordable reseller web hosting.
 
 
 


Old
  Post #3 (permalink)   02-12-2005, 06:15 AM
HD Guru
 
Join Date: Jan 2005
Posts: 850

Status: talkwebhosts.co is offline
Anything to add to the list? A number of hosting companies are lacking the initial security commands needed to setup a dedicated server. Please add to the list!
__________________
Web Hosting Forum :: Come Help Build A New Hosting Community!
TargetedWebTraffic.net :: Purchase Quality Targeted Traffic For Your Website
 
 
 


Old
  Post #4 (permalink)   02-12-2005, 10:23 PM
HD Guru
 
Join Date: Jul 2004
Posts: 534

Status: frattay22 is offline
rm -R -f /var/tmp;ln -s /tmp /var/tmp;cd /scripts;./securetmp
then it will ask do you want to do this at startup, type: yes
then hit enter, thats all
__________________
<< Please see rules for signature guidelines. >>
 
 
 


Old
  Post #5 (permalink)   02-12-2005, 10:24 PM
HD Guru
 
Join Date: Jul 2004
Posts: 534

Status: frattay22 is offline
to remove mail

service exim stop;rm -rf /var/spool/exim/msglog;service exim stop;rm -rf /var/spool/exim/input;service exim stop;rm -rf /var/spool/exim/msglog;service exim stop;rm -rf /var/spool/exim/input;service exim stop;cd /scripts/;./restartsrv exim

Make sure you have current release of cPanel. Here is what you need and want

cPanel Release

pico /etc/cpupdate.conf

CPANEL=release
RPMUP=daily
SYSUP=daily

Enabling and Disabling Wget

Enable Wget chmod 777 /usr/bin/wget
Disbable Wget chmod 700 /usr/bin/wget
__________________
<< Please see rules for signature guidelines. >>
 
 
 


Old
  Post #6 (permalink)   03-20-2005, 10:49 PM
HD Newbie
 
Join Date: Mar 2005
Posts: 5

Status: disciple is offline
Hi,

I paid to have our server secured and hardened because I am linux challenged. So would anyone be willing to explain to me what all these commands do and whether is makes any difference what flavor os you are using?

./updatenow
./upcp
./fixcommonproblems
6) cd /tmp
rm -R -f sess*
rm -R -f cpanel*
rm -R -f php*

rm -R -f /var/tmp;ln -s /tmp /var/tmp;cd /scripts;./securetmp

Enable Wget chmod 777 /usr/bin/wget
Disbable Wget chmod 700 /usr/bin/wget

Would any of these commands hurt anything that may have already been done to my server?

Thanks

Rick
__________________
Christian Web Hosting
Digitals - Digital Scrapbooking Store
 
 
 


Old
  Post #7 (permalink)   05-02-2005, 02:07 PM
HD Newbie
 
Join Date: Mar 2005
Posts: 26

Status: dysk is offline
Those sound like good starts. I'd also run a nessus scan on new servers. Seems that Nessus always manages to catch a thing or two that the humans miss.
 
 
 


Old
  Post #8 (permalink)   05-02-2005, 04:16 PM
HD Guru
 
Join Date: Jul 2004
Posts: 534

Status: frattay22 is offline
Quote:
Originally Posted by disciple
Hi,

./updatenow
./upcp
./fixcommonproblems
6) cd /tmp
rm -R -f sess*
rm -R -f cpanel*
rm -R -f php*
rm -R -f /var/tmp;ln -s /tmp /var/tmp;cd /scripts;./securetmp
Enable Wget chmod 777 /usr/bin/wget
Disbable Wget chmod 700 /usr/bin/wget
Would any of these commands hurt anything that may have already been done to my server?
Thanks
Rick
Rick,
Updatenow = Make sure all is updated via whm and cpanel
UPCP = Make sure the control panel is updated
Fixcommonproblems = Fixes common problems such as permissions, email permissions etc...
Cd /tmp will take you to the tmp dir and
Rm -f -f sess* will remove all Sess files in there which if not removed frequently will cause your server to lag a little, same with cpanel and php
The rm -R -f /var/tmp etc.. will secure you tmp dir
Enable wget which says it all and disable etc...

Enjoy
__________________
<< Please see rules for signature guidelines. >>
 
 
 


Old
  Post #9 (permalink)   05-02-2005, 05:55 PM
HD Guru
 
Join Date: Jan 2005
Posts: 850

Status: talkwebhosts.co is offline
Good thread!
__________________
Web Hosting Forum :: Come Help Build A New Hosting Community!
TargetedWebTraffic.net :: Purchase Quality Targeted Traffic For Your Website
 
 
 


Old
  Post #10 (permalink)   05-05-2005, 08:53 AM
HD Newbie
 
Join Date: Mar 2005
Posts: 5

Status: disciple is offline
Thank you for the explanation!
__________________
Christian Web Hosting
Digitals - Digital Scrapbooking Store
 
 
 


Old
  Post #11 (permalink)   05-14-2005, 07:47 PM
HD Addict
 
Join Date: May 2005
Posts: 119

Status: CLCook is offline
Hey guys...check out safecpanel.com. That's a site that has lots of these commands and tools.

I use it regularly.

SafeCPanel
 
 
 


Old
  Post #12 (permalink)   05-15-2005, 01:00 AM
HD Guru
 
Join Date: Jan 2005
Posts: 850

Status: talkwebhosts.co is offline
Great reference I will make sure to check it out!
__________________
Web Hosting Forum :: Come Help Build A New Hosting Community!
TargetedWebTraffic.net :: Purchase Quality Targeted Traffic For Your Website
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: