Realtime network traffic Sniffer

Tcptrack displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and displays informa-tion such as state, source/destination addresses and bandwidth usage in a sorted, updated list very much like the top command. tcptrack -i eth1

Read more

MySQL Replication: replicating specific databases/tables only

// replicate this database replicate-do-db=database_name // don’t replicate this database replicate-ignore-db=database_name // replicate this database.table replicate-do-table=database_name.table_name // don’t replicate this table replicate-ignore-table=database_name.table_name // allows wildcards, use % as the wildcard character // e.g db% would be all databases beginning with db replicate–wild-do-table=database_name.table_name // ignore all specified tables, with wildcards replicate-wild-ignore-table=db_name.table_name

Read more

Basic Firewall

#!/bin/sh PATH=’/sbin’ # Flush the tables to apply changes iptables -F # Default policy to drop ‘everything’ but our output to internet iptables -P FORWARD DROP iptables -P INPUT DROP iptables -P OUTPUT ACCEPT # Allow established connections (the responses to our outgoing traffic) iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT # Allow […]

Read more

Setup Mysql Replication

Setup Primary Server Append following following in Primary Server my.cnf [mysqld] log-bin=/var/log/mysql/binlog.log server-id=1 Create log directory mkdir /var/log/mysql/ chown mysql:mysql /var/log/mysql /etc/init.d/mysql restart Backup desired database mysql -u root -p or if plesk installed mysql -u admin -p`cat /etc/psa/.psa.shadow` Create GRANT REPLICATION SLAVE ON *.* TO ‘replicate_user’@’%’ IDENTIFIED BY ‘dbpass’; FLUSH PRIVILEGES; FLUSH TABLES WITH […]

Read more

drupal update with drush

cd /var/www/drupaldirectroy # Backup everything (codebase + database) drush arb # get a list of all modules: drush up -s # filter it to just those needing an update: drush up -s | grep -i update # filter again for just security updates: drush up -s | grep “SECURITY UPDATE” # get a count of […]

Read more
Random Pages By Best Accounting Services