Trace: cpanel rsyslog lain-lain
  • rsync pclinux os dari repo
rsync --progress -arvlp repo.ugm.ac.id::pclinuxos/apt/ /media/jgos/pclinuxos/apt/
  • Set Date
date 0909103009

Keterangan, dari deban ke belakang
09 = bulan
09 = tanggal
10 = jam
30 = menit
09 = tahun

1012091045
<code>
10 = Tahun 2010
12 = Bulan desember
09 = Tanggal
10 = Jam
45 = Menit

Sinkronisasikan waktu system ke waktu hardware (BIOS)

hwclock --systohc
  • Install GCC di CentOS
yum groupinstall 'Development Tools'
  • Set Proxy
setenv HTTP_PROXY http://172.16.29.1:3128
  • Httpd UserDir

Aktifkan baris berikut

UserDir public_html

set permisi di home direktori (biar ga permision denied)

chmod +x /home/user_name
  • yum with proxy

tambahkan baris berikut pada file /etc/yum.conf

#proxy
proxy=http://192.x.x.x:8080/
proxy_username=username
proxy_password=password_kita
  • Find emty directory
find . -type d -empty

find and remove emty directory (not recomended)

find . -type d -empty -exec rmdir {} \;
  • Find emty file
find . -type f -empty

find and count empty file

find . -type f -empty | wc -l

count not empty file

find . -type f -not -empty | wc -l
  • Squid Purge
/usr/local/sbin/squidclient -h 127.0.0.1 -m PURGE http://host_to_purge
  • Uninstall vmware 7
sudo sh /usr/bin/vmware-installer --uninstall-product=vmware-workstation
  • Wget download entire website:

Create directory content

mkdir /home/nikesh/linuxpoison

use following command to download the website:

wget -r -Nc -mk http:testing.com/

-r Turn on recursive retrieving
-N Turn on time-stamping
-m Create a mirror
-k Convert the link

  • Compile daq with libpcap

Pas ngompile daq buat librari snort malah keluar error

checking for libpcap version >= "1.0.0"... no

    ERROR!  Libpcap library version >= 1.0.0  not found.
    Get it from http://www.tcpdump.org

padahal pcap sudah sukses terinstall, solusinya kopikan libpcap.a ke direktori /usr/lib

cp /usr/local/lib/libpcap.a /usr/lib/
cp /usr/local/lib/libpcap.so.1 /usr/lib64/libpcap.so.1

Atau di link saja

ln -s /usr/local/lib/libpcap.a /usr/lib/libpcap.a
ln -s /usr/local/lib/libpcap.so.1 /usr/lib64/libpcap.so.1

setelah itu coba jalankan ./configure lagi hasilnya..

Build AFPacket DAQ module.. : yes
Build Dump DAQ module...... : yes
Build IPFW DAQ module...... : yes
Build IPQ DAQ module....... : no
Build NFQ DAQ module....... : no
Build PCAP DAQ module...... : yes
  • Add user without home directory and shell
groupadd squid
adduser -d /dev/null -s /bin/false -g squid squid

atau

useradd -g snort snort -s /sbin/nologin
  • Connection Limit
/sbin/iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 5 -j REJECT
  • Menggunakan scp di port selain 22
scp -P 7676 rifqi@10.xx.xx.xx:/home/rifqi/install50.iso .
  • Mencari suatu kata dalam file yang terletak di dalam direktori
grep -Rn mod_perl.so /etc/apache*

-R = recursive
-n = line (keterangan baris)

  • Recovery MySQL tabel

masuk ke direktori MySQL data, default ada di /vaw/lib/mysql, masuk ke direktori nama database, kemudian jalankan perintah berikut

myisamchk Log.MYI --safe-recover
  • Cek user yg menjalankan apache
egrep ^User /etc/httpd/conf/httpd.conf 
  • update/upgrade nagvis
./install.sh -n /usr/bin -p /usr/local/nagvis -u apache -g apache -w /etc/httpd/conf.d -a y
  • Debian packages file list
dpkg -L packages_name
  • Agar radius bisa listen di lebih dari satu ip
listen {
        ipaddr = 10.xx.xx.x
        port = 1812
        type = auth
}

listen {
        ipaddr = 10.xx.xx.x
        port = 1812
        type = auth
}

di bagian ini sebenernya bisa di tambahkan juga opsi policy dari masing-masing ip

  • Mikrotik forwarding to proxy
/ip firewall nat add chain=dstnat action=dst-nat to-addresses=xx.xx.xx.x to-ports=3128 protocol=tcp src-address=192.168.88.0/24 dst-port=80 
  • Mendeteksi jumlah koneksi via netstat
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
  • Cek proses
ps faux
  • Packet count with iptables
 iptables -L -nvx
  • show process owner
lsof -p 1234
  • Install ntop

Download ntop disini http://www.nmon.net/packages/rpm/x64/ntop/ install paket ntop nya

rpm -ivh ntop-5.0.2-2.el6.x86_64.rpm

Setelah instalasi selesai, buat password admin nya dengan perintah berikut

/usr/local/bin/ntop -A --set-admin-password=password_ntop

jalankan ntop nya

/usr/local/bin/ntop -w 3000 -i eth2
  • restore bacula
/usr/local/bacula/sbin/bconsole

To select the JobIds, you have the following choices:
     1: List last 20 Jobs run
     2: List Jobs where a given File is saved
     3: Enter list of comma separated JobIds to select
     4: Enter SQL list command
     5: Select the most recent backup for a client
     6: Select backup for a client before a specified time
     7: Enter a list of files to restore
     8: Enter a list of files to restore before a specified time
     9: Find the JobIds of the most recent backup for a client
    10: Find the JobIds for a backup for a client before a specified time
    11: Enter a list of directories to restore for found JobIds
    12: Select full restore to a specified Job date
    13: Cancel


Select item:  (1-13): 3
Enter JobId(s), comma separated, to restore: 7519 
You have selected the following JobId: 7519

Building directory tree for JobId(s) 7519 ...
  • Solving SSH error: Too many authentication failures for

Buat file baru dengan nama config pada directory .ssh

vi ~/.ssh/config

tambahkan baris berikut

IdentitiesOnly yes
  • Routing ke jaringan tertentu

tambahkan baris berikut di file /etc/sysconfig/network-scripts/route-eth0.13

10.0.0.0/8 via xx.xx.xx.x dev eth0.13
  • Static routing, dari ip tertentu dengan gateway tertentu
/sbin/ip route add 192.168.1.0/24 dev eth0

iki nek ming via dev tertentu

route add default gw 192.168.1.254 eth0
  • ISCSI discovery target
iscsiadm -m discovery -t sendtargets -p 10.xx.xx.xx static
  • LDAP Search
ldapsearch -h ldap.server -b "ou=people,o=Universitas Gadjah Mada,dc=ugm,dc=ac,dc=id" -x "uid=user_name"
  • delete huge bacula database log
mysql -u username -p
USE bacula;
TRUNCATE TABLE Log;
  • truncate bacula log
mysql -u username -p
USE bacula;
TRUNCATE TABLE Log;
  • Menggabungkan beberapa gambar menjadi satu
convert gambar-satu.jpg gambar-dua.jpg -append hasil-merge.jpg
  • Gammu tes sms
echo "tes " | /usr/local/bin/gammu -c /etc/smsdrc textall --sendsms TEXT nomer_tujuan
  • Dig google ip's
$ dig TXT +short _netblocks{,2,3}.google.com | tr ' ' '\n' | grep '^ip4:'
  • mod_rmoteip (httpd+centos7)

LoadModule remoteip_module modules/mod_remoteip.so RemoteIPHeader X-Forwarded-For RemoteIPInternalProxy 10.13.241.190

  • delete mail queue log

To remove all mail from all the queues ( hold, incoming, active and deferred ) , run :

 <code>
   [root@rh-mcnode01 ~]# postsuper -d ALL
   </code>
  • find last modified
find -printf "%TY-%Tm-%Td %TT %p\n" | sort -n
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki