Activity Stream
48,167 MEMBERS
63287 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 7 of 7
  1.     
    #1
    Member
    Website's:
    ihide.info experthide.com hideonthe.net

    Default [TUT] Securing /tmp and /dev/shm partion

    Hello,

    So here I am again for another tut. This time we are securing /tmp and /dev/shm.

    Lets get started.

    Part 1 : Securing /tmp

    Step 1 : Make a 1GB(Or more) file for /tmp and an ext3 filesystem for tmp
    Code: 
    dd if=/dev/zero of=/dev/tmpFS bs=1024 count=1000000
    /sbin/mkfs.ext3 /dev/tmpFS
    Step 2 : Create a backup copy of your current /tmp drive
    Code: 
    cp -Rpf /tmp /tmpbackup
    Step 3 : Mount our new tmp parition and change permissions
    Code: 
    mount -o loop,noexec,nosuid,rw /dev/tmpFS /tmp
    chmod 1777 /tmp
    Step 4 : Copy old data
    Code: 
    cp -Rpf /tmpbackup/* /tmp/
    Step 5 : Edit /etc/fstab and add this
    Code: 
    /dev/tmpMnt /tmp ext3 loop,nosuid,noexec,rw 0 0
    Step 6 : Test your fstab entry
    Code: 
    mount -o remount /tmp
    Part 2 : Secure /var/tmp

    Step 1 : Rename it and create a symbolic link to /tmp
    Code: 
    mv /var/tmp /var/tmp1
    ln -s /tmp /var/tmp
    Step 2 : Copy the old data back
    Code: 
    cp /var/tmpold/* /tmp/
    Step 3 : Restart services that use the /tmp partion

    Part 3 : Securing /dev/shm

    Step 1 : Edit your /etc/fstab
    Code: 
    nano /etc/fstab
    change:
    "none /dev/shm tmpfs defaults,rw 0 0" to
    "none /dev/shm tmpfs defaults,nosuid,noexec,rw 0 0"

    Step 2 : Remount /dev/shm
    Code: 
    mount -o remount /dev/shm

    And their you go All done!

    *Note* if you have cpanel installed just run /scripts/securetmp in ssh
    .:Raymond:. Reviewed by .:Raymond:. on . [TUT] Securing /tmp and /dev/shm partion Hello, So here I am again for another tut. This time we are securing /tmp and /dev/shm. Lets get started. Part 1 : Securing /tmp Step 1 : Make a 1GB(Or more) file for /tmp and an ext3 filesystem for tmp dd if=/dev/zero of=/dev/tmpFS bs=1024 count=1000000 Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.com
    and if you're in cPanel;

    /scripts/securetmp
    I had to similar steps above as the /tmp was too full and had to expand to 5 GB on a cPanel server recently.
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

  4.     
    #3
    Member
    Website's:
    ihide.info experthide.com hideonthe.net
    @Cory

    again cory this is a general tut. Not everyone has cpanel installed. But thanks for posting that lemme add it

  5.     
    #4
    Member
    Website's:
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.com
    Quote Originally Posted by Forgiven View Post
    @Cory

    again cory this is a general tut. Not everyone has cpanel installed. But thanks for posting that lemme add it
    Can't you tell I'm a cPanel user?

    but only reason why I mentioned it is because I simply said I used the similar steps you posted above above; to expand my /tmp on a cPanel server instead of using /scripts/securetmp

    Just incase if anyone is looking to know how to do that on a 'cPanel Server'.

    Questions could be asked: "Can I do this on a cPanel Server?" -Simply, yes...trying to simply avoid a lot of posts.
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

  6.     
    #5
    Member
    Website's:
    WRZhost.com WExplain.com
    Keep up the good work and keep on ignoring nooby comments
    Any questions? Want to make money?My Online Marketing Forum
    WRZhost offshore hosting! Still the best offshore hosting after 7 years! Hongkong,Russia,NL,Germany

  7.     
    #6
    Member
    Website's:
    ihide.info experthide.com hideonthe.net
    @cory

    Lol i wasnt thinking straight. Thanks

    @tippie

  8.     
    #7
    Member
    I am getting this at step 3:-
    mount: no permission to look at /dev/loop#

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Securing php-fpm with nginx
    By masterb56 in forum Technical and Security Tutorials
    Replies: 4
    Last Post: 29th Aug 2011, 08:46 AM
  2. [TUT] Securing SSH a bit ;)
    By .:Raymond:. in forum Technical and Security Tutorials
    Replies: 13
    Last Post: 9th Jun 2011, 08:29 AM
  3. [Selling] VPS Securing Services
    By iL < in forum Completed Transactions
    Replies: 2
    Last Post: 31st Mar 2010, 05:13 AM
  4. Need help securing VPS!!
    By lukip006 in forum Server Management
    Replies: 5
    Last Post: 31st Aug 2009, 04:14 PM
  5. securing vb forum
    By lenney in forum vBulletin
    Replies: 16
    Last Post: 19th Jul 2009, 08:43 PM

Tags for this Thread

BE SOCIAL