Bài đăng

How to install (D)DoS Deflate and APF (Advanced Policy Firewall) to block bad IPs

Hello. You could probably find tutorials using google, but here it is, at one place.  Before few days I had problems with one of the servers I administrate and situation on the server was as follows: - totally slow network, websites loading was 10-20sec (30) - at first I though, ok, slow loading, server load is high and some client is doing problems - after connecting to the server and checking statistics - server CPU was all the time on 20-30%, memory was fine, all services were up-and-running so where is the problem? - server wasn't on latest #MU, it was just missing 2-3 updates (I'm talking about plesk 11.5) and I could saw in history of changes no security updates whatsoever, but what ever, lets give it a try - nothing, didn't helped - i did apt-get update && upgrade - still nothing - current status was that everything is up-to-date, however there are still problems - listing connections on the server with command: netstat -ntu | awk '{print $5}' | c...

Phát hiện và chống tấn công ddos

DDOS là một vấn đề nan giải cho các webmaster hoặc admin. Sau đây mình xin giới thiệu một vài thủ thuật để nhận biết DDOS và một số biện pháp đối phó khi server bị DDOS. Khi server đột ngột chậm như rùa, mọi xử lý của server đều rất nặng nề, thì nhiều khả năng do một trong hoặc những nguyên nhân sau: 1. Server bị DDOS 2. Server bị quá tải do thiếu RAM 3. Server bị quá tải do tốc độ xử lý của CPU không đảm bảo 4. Tốc độ truy xuất dữ liệu của HDD không đáp ứng nhu cầu read/write của data. (Thông thường xảy ra trên các ổ SATA 72krpm hoặc HDD sắp hỏng) Trong bài viết này chúng ta đi vào vấn đề thứ 1: server bị DDOS, các vấn đề 2,3,4 có thể khắc phục dễ dàng bằng cách nâng cấp phần cứng. Kiểm tra xem server có bị DDOS hay không: Từ command line Linux gõ: Mã: netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n Câu lện trên sẽ trả về hàng loạt IP chiếm nhiều connection nhất trên server. Cần lưu ý rằng DDOS có thể xuất phát từ một l...

Manually Creating Custom Taxonomies

Manually Creating Custom Taxonomies ( tao the loai tuy chinh) Add the following code in your theme’s  functions.php  file or in a  site-specific plugin  (recommended)  to create a hierarchical custom taxonomy like categories: //hook into the init action and call create_book_taxonomies when it fires add_action( 'init', 'create_topics_hierarchical_taxonomy', 0 ); //create a custom taxonomy name it topics for your posts function create_topics_hierarchical_taxonomy() { // Add new taxonomy, make it hierarchical like categories //first do the translations part for GUI $labels = array( 'name' => _x( 'Topics', 'taxonomy general name' ), 'singular_name' => _x( 'Topic', 'taxonomy singular name' ), 'search_items' => __( 'Search Topics' ), 'all_items' => __( 'All Topics' ), 'parent_item' => __( 'Parent Topic' ), 'parent_item_colon' =...

Bài thuốc tự chế “vĩnh biệt” bệnh xoang không tốn tiền

Hình ảnh
Cây giao Chi tiết quy trình diệt bệnh xoang bằng cây giao Điều đầu tiên trong bài thuốc này, ông Đảnh nhấn mạnh: “Do cây giao thuộc họ xương rồng, có mủ đục có hại cho mắt nên trong mọi thao tác làm thuốc (cắt, bẻ…) nhất thiết phải thật cẩn thận, tránh để mủ này dính vào mắt (có thể mang kính), tránh trường hợp mủ có khả năng làm hại, đui mắt. Những dụng cụ nhất thiết phải có để chữa bệnh xoang gồm: 1. Một ấm nước nhỏ (bằng kim loại, sành sứ đều được và lưu ý sau này không dùng ấm này để nấu nước uống vì sợ độc). 2. Lấy một tờ lịch treo tường loại lớn quấn xéo lại thành một cái ống dài. Lưu ý ống phải dài khoảng 50cm, nếu ngắn quá thì hơi sẽ quá nóng, dễ bị phỏng da; còn nếu dài quá thì hơi không đủ mạnh để hít. Ống phải quấn sao cho một đầu vừa miệng vòi ấm, còn một đầu nhỏ hơn dùng để hít. Nếu có ống tre hay trúc được thông lỗ giữa các đốt cây thì tốt hơn, nhưng không được dùng loại ống bằng nhựa bởi dễ nóng chảy. Bài thuốc xông mỗi ngày gồm một chén (bát) nước và khoảng 7...

Tao Custom Fields (meta-box) ko can plugin

Hình ảnh
Step 1. Define meta box with all needed fields Open the  functions.php  file, and put the following code into it: $prefix = 'dbt_' ; $meta_box = array ( 'id' => 'my-meta-box' , 'title' => 'Custom meta box ' , 'page' => 'post' , 'context' => 'normal' , 'priority' => 'high' , 'fields' => array ( array ( 'name' => 'Text box' , 'desc' => 'Enter something here' , 'id' => $prefix . 'text' , 'type' => 'text' , 'std' => 'Default value 1' ), array ( 'name' => 'Textarea' , 'desc' => 'Enter big text here' , 'id' => $prefix . 'textarea' , ...