-------------------------------------------------------------------- scanning all network devices using arp-scan on 192.168.254.0 network: arp-scan --interface=eth1 192.168.254.0/24 -------------------------------------------------------------------- iptables -t nat -A PREROUTING -p tcp -i eth0 -d 192.168.2.109 --dport 10001 -j DNAT --to 192.168.1.32:10000 iptables -A INPUT -i eth0 -s 192.168.254.2 -j DROP iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables-t nat-A PREROUTING -i eth0 -p TCP --dport4662 -j DNAT --to 192.168.0.10:4662 iptables-t nat-A PREROUTING -i eth0 -p UDP --dport4672 -j DNAT --to 192.168.0.10:4672 ------------- proxy port forwarding linux. ssh -f -L 8080:localhost:8080 leming@ehion.com sleep 9999 ------------- ------------------------- Limit traffic on the interface down to 220kbit/s tc qdisc add dev eth0 root tbf rate 220kbit latency 50ms burst 1540 ------------------------- ------------------------------------ fixing table in mysql after crash: DEBUG MODE SQL Error : 145 Table './c64forum/phpbb_config' is marked as crashed and should be repaired mysqlcheck --auto-repair c64forum phpbb_config c64forum.phpbb_config warning : Table is marked as crashed warning : 2 clients are using or haven't closed the table properly status : OK ------------------------------------- ----------------------------------------------------- Quick backup (dump) of mysql database: mysqldump -u user -p nameofdatabase > ch01032010.sql ----------------------------------------------------- ------------------- piping ls to xargs: ls -la|grep 2010-03-03|awk '{print $8}'|xargs -i -t mv {} /home/leming/perl/tmp/03032010/ ------------------- cat access_log|egrep -o [0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+|uniq| while read q; do echo -n "IP:$q,";host $q|awk -F'pointer ' '{print "hostname="$2}'; done