dapurhosting.com Blog for Tech

April 24, 2009

Find User’s Files

Filed under: Server — dh @ 7:05 am

find / -user username | more

find /home/david -name ‘index*’
find /home/david -iname ‘index*’

http://www.codecoffee.com/tipsforlinux/articles/21.html

Find String On File

grep -H -r “text-to-find” /directory

cari file hari ini

find . -mtime -1 \! -type d -exec ls -l {} \;

April 19, 2009

Closing Open DNS Servers

Filed under: Securtiy — Tags: , — dh @ 4:31 am

Allowing DNS Recursion is like running an Open SMTP Relay. You allow anyone to query your DNS server and this can easily lead to abuse.
You can fix this by disabling recursive lookups for not authorized IP’s.
This article will teach you step by step how to do this.

  1. Login to your server as root
  2. Edit /etc/named.confpico /etc/named.conf

    Add before options {} the fallowing:

    acl “trusted” {
    MAIN_IP;
    SECONDARY_IP;
    127.0.0.1;
    };

    Where MAIN_IP and SECONDARY_IP are the IP’s of your nameservers on that server.

    Now you have to add in the same file /etc/named.conf in the options {} part of the file the fallowing:

    allow-recursion { trusted; };
    allow-notify { trusted; };
    allow-transfer { trusted; };

  3. Now save and restart namedservice named restart

Source:

http://www.cpanelconfig.com/cpanel-security-related-articles/closing-open-dns-servers/

April 18, 2009

PHP.INI Location

Filed under: Server — dh @ 12:45 pm

/usr/local/lib/php.ini

April 10, 2009

display bandwidth usage on an interface

Filed under: Server — Tags: , , , , — dh @ 2:15 pm

iftop -h | [-nNpbBP] [-i interface] [-f filter code] [-F net/mask]

Source: http://linux.die.net/man/8/iftop

April 3, 2009

Error from park wrapper: domain.com is already configured

Filed under: Uncategorized — dh @ 1:18 pm

On a cPanel server if you get the error: Error from park wrapper: domain.com is already configured while adding an add-on domain under cPanel. Make sure to remove the domain.com entries from:

/var/named/domain.com.db
/etc/httpd/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/var/cpanel/users/username
/etc/userdomains
/etc/groups
/etc/localdomains

Renaming or commenting will not help; you will have to remove the entries completely. Try now.

This worked for me.

source:
http://supportfacility.com/blog/cpanel/error-from-park-wrapper-domaincom-is-already-configured/

April 2, 2009

Where is User Cron Jobs?

Filed under: Server — Tags: — dh @ 5:11 pm

You can find them on

/var/spool/cron/

Powered by WordPress