Latest Article Get our latest posts by subscribing this site

Blokir HP Android di Mikrotik


Automatisasi blokir ip address berdasarkan hostname

Drop (blokir) ip address dari dhcp lease yang tidak diinginkan berdasarkan hostname, disini saya berikan contoh semua yg memakai hp android:

script 1 : melakukan pencarian di filter, jika ip yg dimaksud ada maka akan di hapus terlebih dahulu agar tidak terjadi dupilkasi

:local ipfilter value=[/ip firewall filter find]; :foreach looping in=$ipfilter do={:local komen value=[/ip firewall filter get $looping value-name=comment]; :if ($komen=”android”) do={/ip firewall filter remove $looping}};

script akan saya namakan : hapus-filter-android

Script 2 : menambahkan ip address pada firewall filter lalu di lakukan drop (blokir) agar android tidak dapat mengakses internet.

:local bnyklease value=[/ip dhcp-server lease find]; :foreach looping in=$bnyklease do={:local namahost value=[:pick [/ip dhcp-server lease get $looping value-name=host-name] 0 7]; :local ipadd1 value=[/ip dhcp-server lease get $looping value-name=active-address]; :if ($namahost=”android”) do={/ip firewall filter add chain=forward action=drop dst-address=$ipadd1 disabled=no comment=$namahost}};

script akan saya namakan : drop-android

jika script diatas sudah dibuat maka kita tinggal membuat schedule atau jadwal untuk mengeksekusi script.

untuk menambahkan 2 script diatas di 1 scheduler maka scriptnya seperti berikut :

/system script run hapus-filter-android

/system script run drop-android

sumber : https://www.facebook.com/notes/wong-lawas/automatisasi-blokir-ip-address-berdasarkan-hostname-dengan-script-scheduler-di-m/684255344977928

Blokir Bruteforce Pada Mikrotik


/ip firewall filter
add action=drop chain=input comment="SECURITY - BRUTEFORCE BLOCKING" disabled=no dst-port=22-23 protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1w3d chain=input comment="" connection-state=new disabled=no dst-port=22-23 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m chain=input comment="" connection-state=new disabled=no dst-port=22-23 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=input comment="" connection-state=new disabled=no dst-port=22-23 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m chain=input comment="" connection-state=new disabled=no dst-port=22-23-23 protocol=tcp

How to reset the MySQL server on a cPanel server without reinstalling


Ahoy,

I have been asked a few times how to reset the mysql installation on cPanel without reinstalling. Doing this will make all databases inaccessable so it is HIGHLY not recommended to follow this guide, unless the stated goal is to clear out all databases after events such as catastrophic innodb corruption. In these events the stated goal is to reset mysql and restore from backups. Reseting the MySQL installation is a drastic step, and should not be performed without great consideration.

If you follow this guide all your databases will be inaccessible and the only accessible databases at the end of the guide will be the minimum requirement for cPanel.

If you chose to reset all mysql data, an unsupported path by cPanel, you would want to follow these steps. I recommend that you do not simply copy and paste these commands, but rather research each step and ensure that you understand the process as cPanel support will not be able to assist you in the event of an issue. You should have allready have working knowledge for mysql to attempt this.

If you chose to proceed, it is at your own risk.
Always ensure and verify that you have backups located in a remote destination.

To reset your mysql installation and /var/lib/mysql directory, you will want to first stop mysqld:

Code:
 /etc/init.d/mysql stop
You will now want to move aside your mysql data directory, and /etc/my.cnf. You can move aside you mysql data directory to a backup with a timestamp with the following command. If you have another directory for your mysql installation (eg. /home/mysql) You will need to use that directory instead, and compensate for this when installing an fresh database as well.

Code:
mv -v /var/lib/mysql{,.Backup.`date +%F.%T`}
mv -v /etc/my.cnf{,.Backup.`date +%F.%T`}
Next we will need to create the basic mysql data directory structure with the following command. Note: this command will ask you to set a mysql root password. We will do this through WHM once mysql is working so you don't need to set it via the command line. You will want to reset the mysql root password through WHM because otherwise WHM will not know the root mysql password and database features will fail with access denied from mysql.

Code:
mysql_install_db
The Next step is to set the correct permissions on the mysql directory
Code:
chown -R  mysql.mysql /var/lib/mysql
At this point we can start up our new mysql installation.
Code:
/etc/init.d/mysql start
Our new mysql installation is up and running, you will want to reset the mysql root password through WHM. This will also set up access to phpmyqdmin:

Code:
WHM >> SQL Services >> Reset MySQL Root Password
Now we will need to run some scripts to set up the cPanel mysql databases that cPanel relies on.
Code:
/usr/local/cpanel/bin/hulkdsetup
/usr/local/cpanel/bin/update-roundcube --force
/scripts/fullhordereset --force
/usr/local/cpanel/bin/leechprotectinstall --force
/usr/local/cpanel/bin/update-logaholic --force
Lastly, you will need to use the following command to restore the grants to the database, once you add databases back in for the users. This will restore the cPanel grants, allowing access to the databases. So you have access issues after this guide, this will be an helpful command.

Code:
/usr/local/cpanel/restoregrants --db=mysql --cpuser=USERNAME --all

At this point you will have a working cPanel and mysql installation. However none of your users databases will be functional at this point. You will need to do this manually or script the restore. Below is a sample script that run in a directory containing cPanel backup files, it will restore the databases. This script is only meant to be an starting point for custom restore scripts, and cPanel does not support it. Logoholic data will still need to be migrated manually.

Code:
#!/bin/bash


#Loop through the users on the server
for i in `\ls -1 /var/cpanel/users/ | \grep -v './'`; do
    \echo;\echo;
    \echo "++++ Starting $i +++++";

    if [ -e $i.tar.gz ]; then
        \echo "Extracting SQL files";
        # Extract the Databases from the backup
        \tar -zxf $i.tar.gz $i/mysql;
        if [ -e $i/mysql/roundcube.sql ]; then
            \echo "Importing $i's Roundcube data";
            \mysql roundcube < $i/mysql/roundcube.sql;
        fi
        if [ -e $i/mysql/horde.sql ]; then
            \echo "Importing $i's Horde data";
            \mysql horde < $i/mysql/horde.sql;
        fi
        \echo "Importing $i's databases";
        for x in `\ls -1 $i/mysql/* | \grep -v 'roundcube\|horde\|openfileslimit' | \cut -d \/ -f 3 | \cut -d \. -f 1| \uniq`; do
            \echo "    - Importing $x";
            \mysql < $i/mysql/$x.create;
            \mysql $x < $i/mysql/$x.sql;
        done;
        /usr/local/cpanel/bin/restoregrants --db=mysql --cpuser=$i --all;
    else
        \echo "Missing $i.tar.gz";
    fi
done;

Link Ilmu VPS dan Dedicated Server



http://klikhost.com/mengatasi-folder-vartmp-yang-sering-penuh/
http://klikhost.com/cara-mengatasi-penyebab-harddisk-server-penuh/
http://ads.id/forums/archive/index.php/t-103262.html

 http://forums.cpanel.net/f354/how-reset-mysql-server-cpanel-server-without-reinstalling-408952.html

Tutorial Perintah Dasar di Linux (VPS Centos)

Perintah dasar di linux centos :
  1. Melihat ukuran/size folder : #du -h /home  (dimana home adalah folder tujuan yang ingin diketahui sizenya)
  2. #df : Perintah di atas akan menampilkan statistik disk yang terpakai dan tersisa.
  3. du -S | sort -n : Melihat ukuran direktore yang terkecil ke yang terbesar 
Mencari file terbesar :
  • find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " "Pemilik :" $3 " Ukuran: "$5 " Dibuat pada:" $6 " "$8 }'
Realtime Memory Usega :
  • watch -d free -m
     

Setting Polycom CX700


Langkah-langkah setting polycom cx700 :
  1. Pasang kabel power polycom
  2. Colokan kabel LAN dari switch ke polycom (yang bergambar LAN), kemudian colokan kabel LAN dari PC ke polycom (yang bergambar PC)
  3. Pastikan polycom sudah mendapat IP dari server DHCP dengan cara tekan advance -->system information
  4. Tekan input setting, untuk mendownload sertifikat yang terbaru dari server Ms.Lync pastikan settingannya seperti gambar dibawah. Jika sudah tekan Sign In 
  5. Tanda kalau berhasil mendownload certifikat akan ada tulisan download certifikat from server, kemudian akan balik lagi seperti gambar nomor 4. Kemudian anda ubah lagi settingannya seperti gambar di bawah ini
  6. Jika sudah tekan Sign In, dan secara ajaib polycom cx700 anda sudah berhasil login. 
*) - Kalau polycom minta password masukan 123456
    - Jika tidak bisa login, pastikan polycom sudah dapat IP
    - Jika sudah dapat IP dan polycom blm bisa login, anda reset polycomnya dengan cara menekan tombol reset kurang lebih 10 detik, kemudian ulangi langkah 1-5


Polycom CX300 tidak mau login



Cara untuk menangani bila Polycom CX300 tidak mau login kemudian di layar polycom muncul tulisan sign in :
  1. Klik kanan pada My Computer pilih Properties
  2. Masukan password administrator bila komputer masih login menggunakan user biasa
  3. Pada menu sebelah kiri klik Device Manajer
  4. Klik gambar panah pada menu Sound, Video and Game Controller
  5. Klik kanan pada menu Polycom CX300 kemudian pilih Uninstall
  6. Klik OK, kemudian tunggu beberapa saat sampai proses uninstall driver selesai
  7. Cabut kabel USB polycom yang menancap di CPU kemudian colokan kembali
  8. Dan secara ajaib polycom cx300 akan login secara otomatis, logo polycom di polycomnya akan menyala hijau
  9. Selesai

 
Copyright © 2013. Blog Pengalaman Pribadi - All Rights Reserved