port forward with iptables 
iptables -I FORWARD -i INTERFACE -p tcp --dport PORT -j ACCEPT
iptables -A PREROUTING -t nat -i INTERFACE -p tcp --dport PORT -j DNAT --to-destination LOCAL_IP


[ view entry ] ( 1113 views )   |  print article
apt-get behind a server port redirected with ssh to a proxy 
There is an apt proxy (Apt-Cacher NG), a workstation, a server and a server behind that server.
workstation> ssh -R3142:proxy:3142 server

server> ssh -R3142:127.0.0.1:3142 server_behind

server_behind> cat /etc/apt/apt.conf.d/01proxy
Acquire::http { Proxy "http://localhost:3142"; }

server_behind> apt-get update; apt-get upgrade


[ view entry ] ( 906 views )   |  print article
Ubuntu Wake on Lan WOL 
If ethtool ethX doesn't contain Wake-on: g then add pre-down /sbin/ethtool -s ethX wol g to /etc/network/interfaces

Add NETDOWN=no to /etc/default/halt

Test with /sbin/shutdown -P now and wakeonlan [-i BROADCASTADDR] MAC (apt-get install wakeonlan)

[ view entry ] ( 872 views )   |  print article
Find duplicate filenames 
find -type f -printf "%f\n" | sort | uniq -d


[ view entry ] ( 547 views )   |  print article
hdd performance tests 
#> hdparm -tT /dev/sda
Timing buffered disk reads: 398 MB in 3.00 seconds = 132.45 MB/sec

write:

#> dd if=/dev/zero of=./tempfile bs=1M count=1024 conv=fdatasync,notrunc
1073741824 Bytes (1,1 GB) kopiert, 12,8038 s, 83,9 MB/s

read:

#> echo 3 > /proc/sys/vm/drop_caches
#> dd if=./tempfile of=/dev/null bs=1M count=1024
1073741824 Bytes (1,1 GB) kopiert, 6,79724 s, 158 MB/s

[ view entry ] ( 1329 views )   |  print article

<<First <Back | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Next> Last>>