Archive | How To RSS feed for this section

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

NAT in Cisco Router (PAT)

1. Create a nat pool with single public ip address router(config)#ip nat pool shrestha net 2. Create access list permitting the local LAN router(config)#access-list 1 permit 3. Map access list 1 to new pool using overload(PAT) router(config)#ip nat inside source list 1 pool shrestha overload 4. Go to public ip […]

Read more
Random Pages By Best Accounting Services