Copy Image via netcat

This is for a High-Bandwidth Network. If you have a Low-Bandwidth Network you can try to switch lzo with bzip2.

Target:
nc -v -l -p 19000 | lzop -c -d | pv -s 70G | dd bs=16M of=/root/foo.img

  1. listen on port 19000 for connections.
  2. decompress the datapackages.
  3. pv displays a status bar.
  4. and wirte them into a file.

Source:
dd bs=16M if=/root/bar.img | lzop -3 -c | nc -v 10.0.01 19000

  1. dd reads the file in 16MB Blocks.
  2. each block will be compressed with lzo.
  3. nc connects 10.0.01 on port 19000 and pushes data.

Asterisk under Debian Wheezy with SIP Softphone Ekiga or Jitsi

install asterisk

aptitude install asterisk

edit /etc/asterisk/sip.conf

[general]
context = default
bindport = 5060
bindaddr = 0.0.0.0
tcpbindaddr = 0.0.0.0
tcpenable = yes

[1001]
type = friend
callerid = User 1001 <1001>
secret = 1001
host = dynamic
canreinvite = no
dtmfmode = rfc2833
mailbox = 1001
disallow = all
allow = ulaw
transport = udp

[1002]
type = friend
callerid = User 1002 <1002>
secret = 1002
host = dynamic
canreinvite = no
dtmfmode = rfc2833
mailbox = 1002
disallow = all
allow = ulaw
transport = udp

edit /etc/asterisk/extensions.conf

[general]
static=yes
writeprotect=no

[default]
exten => 1001,1,Answer()
exten => 1001,n,Dial(SIP/1001,20,tr)
exten => 1001,n,Hangup

exten => 1002,1,Answer()
exten => 1002,n,Dial(SIP/1002,20,tr)
exten => 1002,n,Hangup.

Soft Phones e.g. Ekiga or Jitsi

Skipfish on Debian Wheezy

install dependencies

aptitude install libidn11-dev zlib1g-dev libpcre3-dev

download skipfish

wget https://skipfish.googlecode.com/files/skipfish-2.10b.tgz

unpack

tar xvf skipfish-2.10b.tgz

compile

cd skipfish-2.10b
make

run e.g.

./skipfish -W dictionaries/complete.wl -o ../superskipfish/ http://domain.tdl/

Static IP Tinc VPN on Debian Wheezy

Install tinc

aptitude install tinc

tinc client create script

#!/bin/bash
#
Version="0.0.8"
#
# automated Tinc configuration of one participant of a static IP VPN ############################################
echo "tinc config configurator"

VPNName="yourtincvpnname123"		# Once set stays the same
VPNSubnet="10.9.8.0/24"			# Once set stays the same
ServerName="Server0123"			# Name of one or more Clients (space separated)
ThisClientName="Client0123"		# Each Client must have a unique Name (Server is created the same way as every other Client)
ThisClientAddress="name.dyndns.tld"	# DNS or IP of this Client
ThisClientPort="655"			# Port of this Client
ThisClientUniqueVpnIp="10.9.8.123"	# Each Client must have a unique static IP

# make needed directories
echo "creating directories ..."
mkdir -v "/etc/tinc/$VPNName/"
mkdir -v "/etc/tinc/$VPNName/hosts/"
touch "/etc/tinc/$VPNName/hosts/tinc.conf"

echo "creating tinc config ..."
echo "Name = $ThisClientName
ConnectTo = $ServerName
Device = /dev/net/tun
Interface = VPN
DeviceType = tap
Mode = switch" > "/etc/tinc/$VPNName/tinc.conf"
#Device = /dev/net/tun // for Linux
#Interface = VPN       // for Windows

cat "/etc/tinc/$VPNName/tinc.conf"
chmod 640 "/etc/tinc/$VPNName/tinc.conf"

echo "creating tinc client file"
echo "Address = $ThisClientAddress
Subnet = $VPNSubnet
Port = $ThisClientPort" > "/etc/tinc/$VPNName/hosts/$ThisClientName"
#Subnet = $VPNSubnet   // virtual subnet

echo "creating ip config file"
echo "#!/bin/sh
ifconfig \$INTERFACE $ThisClientUniqueVpnIp netmask 255.255.0.0" > "/etc/tinc/$VPNName/tinc-up"
chmod +x "/etc/tinc/$VPNName/tinc-up"

# Auto activate This VPN
echo "activating this vpn"
cat /etc/tinc/nets.boot
echo "$VPNName" >> /etc/tinc/nets.boot
cat /etc/tinc/nets.boot

# generate vpn keys
echo "generating public and private vpn keys"
# tincd -n "$VPNName" -K[=BITS]
tincd -n "$VPNName" -K4096

#############!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
echo "Exchange all hosts files (can be done over insecure connections without security flaws)"
#############!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
echo "Debuging:"
echo 'tincd -n "$VPNName" -D -d'

Compile own Linux Kernel on Debian Wheezy

abhängigkeiten installieren:

aptitude install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential

Neuesten Kernel herunterladen:

cd /usr/src
wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.xz
wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.sign

Kernel auspacken und verifizieren:

unxz linux-3.13.tar.xz
gpg --verify linux-3.13.tar.sign
tar xvf linux-3.13.tar
cd linux-3.13

Debian config kopieren

make clean && make mrproper
cp /boot/config-`uname -r` ./.config

Debian config laden

make menuconfig
hier "Load an Alternate Configuration File" und dann speichern

Kernel kompilieren

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

Kernel installieren

dpkg -i /usr/src/linux-image-3.13-custom_3.13-custom-10.00.Custom_amd64.deb
dpkg -i /usr/src/linux-headers-3.13-custom_3.13-custom-10.00.Custom_amd64.deb

Neustarten und genießen 😀

Siehe auch:
Wie man einen Kernel kompiliert – Debian Etch
Erstellen eines Kernels auf traditionelle Art und Weise

Torrent Opentracker on Debian

install dependencies

apt-get install make g++ zlib1g-dev cvs

get and compile opentracker

cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat
cd libowfat
make
cd ..
cvs -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co opentracker
cd opentracker
make

Let it start at bootup:

crontab -e
@reboot /path/to/what/ever/opentracker