network

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

memtest86+ PXE boot

apt-get install -y pxelinux
 
# check for current version
# http://www.memtest.org/#downiso
 
URL=http://www.memtest.org/download/5.01/memtest86+-5.01.bin
 
wget -q ${URL} -P /tmp/
 
mkdir /var/lib/tftpboot/memtest
mv /tmp/memtest86+-*.bin /var/lib/tftpboot/memtest
cd /var/lib/tftpboot/memtest
ln -s memtest86+-*.bin memtest86+
 
echo "confiure tftpboot..." 
mkdir -p /var/lib/tftpboot/pxelinux.cfg
cat <<EOF>   /var/lib/tftpboot/pxelinux.cfg/memtest86+.conf
LABEL linux
   MENU LABEL memtest86+
   KERNEL /memtest/memtest86+
EOF
 
echo "MENU INCLUDE pxelinux.cfg/memtest86+.conf" >

VNC remote help

#
# SERVER
#
# install x11vnc and start in listener mode
sudo apt-get install x11vnc
x11vnc -noxdamage -once -timeout 30 -connect "panticz.dyndns.org:5500"
 
#
# Linux client
#
# update your dyndns.org ip and enable port forward for 5500
#https://www.dyndns.com/account/services/hosts/
sudo ddclient
vncviewer -listen
 
 
#
# Windows client
#
http://dl.dropbox.com/u/4170695/www/VNC4.zip
 
# LINKS
# https://help.ubuntu.com/community/x11vnc
# http://www.heise.de/ct/ftp/08/07/194/
# http://www.heise.de/netze/X-Window-Desktop-fernsteuern-per-Shell-Skript-und-VNC--/artikel/108532

RaLink RT2500 (rt2500pci)

# fix driver / config bug in Ubuntu Hardy (low bandwidth)
iwconfig wlan0 rate 54M
 
# run automaticly on startup
cat <<EOF> /etc/rc.local
#!/bin/sh -e
iwconfig wlan0 rate 54M
exit 0
EOF
 
# Links
http://wiki.ubuntuusers.de/WLAN/Ralink

OpenVPN

Install
http://www.panticz.de/install_OpenVPN

Restore prevoius NetworkManager OpenVPN configurations
wget https://raw.githubusercontent.com/panticz/scripts/master/restoreOpenvpnConfig.sh -O - | bash -

#!/bin/bash

if [ $(grep sda1 /etc/mtab | wc -l) -eq 1 ]; then
  DEV=sda2
else
  DEV=sda1
fi

sudo mount /dev/${DEV} /mnt
for i in $(find /mnt/etc/NetworkManager/system-connections -name "*.openvpn"); do
  sudo cp $i /etc/NetworkManager/system-connections/
done
sudo umount /mnt

# set file permission and owner
echo sudo chown root:root /etc/NetworkManager/system-connections/*.openvpn
echo sudo chmod 600 /etc/NetworkManager/system-connections/*.openvpn

config file
tls-client
client
dev tun
proto udp
tun-mtu 1400
remote YOUR_HOST.dyndns.org 1194
ca ca.pem
cert user.pem
key keys.pem
cipher BF-CBC
comp-lzo
verb 3
ns-cert-type server
tls-remote YOUR_HOST.dyndns.org
float

Connect to Client in same IP range
route add 192.168.1.31 dev tap0

extract p12 file
Zertifikat des Benutzers:
openssl pkcs12 -in *.p12 -clcerts -nokeys -nodes -out user.pem

Zertifikat der Zertifizierungsstelle:
openssl pkcs12 -in *.p12 -cacerts -nodes -out ca.pem

Privater Schlüssel:
openssl pkcs12 -in *.p12 -nocerts -nodes -out keys.pem

# remove passphrase from a pkcs12 certificate
openssl pkcs12 -in protected.p12 -nodes -out /tmp/temp.pem
openssl pkcs12 -export -in /tmp/temp.pem -out unprotected.p12

OpenVPN Gui (Client for Windows)
http://man.chinaunix.net/linux/efw-admin-guide-html-chunk/efw.vpn.openvpn.html

C:\Programme\OpenVPN\config\YOUR_VPN.ovpn (old)
client
proto udp
remote YOUR_SERVER.dyndns.org
resolv-retry infinite
nobind
persist-key
persist-tun
ca YOUR_CERT.cer
auth-user-pass
comp-lzo
dev tap

Configure Gnome Network Applet for Endian
VPN-Connections > VPN-Configure
Add
Create
Connection Name: YOUR_VPN_NAME
Gateway: YOUR_VPN_SERVER_IP
Type: Password
Username: YOUR_VPN_USER_NAME
Password: YOUR_VPN_PASS
CA Certificate: YOUR_ENDIAN .pem file

Advanced:
Use LZO Data Compression: checked
Use a TAP Device: check
OK

IPv4 settings > Routing:
Add
Address: YOUR_VPN_NETWORK (192.168.1.0)
Netmask: 255.255.255.0

backup your OpenVPN connections
tar cjf ~/backup/system-connections.$(date -I).tar.bz2 /etc/NetworkManager/system-connections/

Android
https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=de
http://www.rz.uni-kiel.de/pc/openvpn/AndroidVPN

Links
http://askubuntu.com/questions/29086/where-are-vpn-configuration-files-imported-by-network-manager-saved
http://www.ipcop-forum.de/forum/viewtopic.php?p=167998
http://www.ngs.ac.uk/useful-openssl-commands
http://www.sven-kuegler.de/tag/openvpn
http://www.ngs.ac.uk/useful-openssl-commands
http://man.chinaunix.net/linux/efw-admin-guide-html-chunk/efw.vpn.openvpn.html

Networks

# Example /etc/network/interfaces
auto lo
iface lo inet loopback

# device: eth0
auto eth0
iface eth0 inet static
address 178.63.46.216
broadcast 178.63.46.255
netmask 255.255.255.192
gateway 178.63.46.213

# default route to access subnet
up route add -net 178.63.46.192 netmask 255.255.255.192 gw 178.63.46.213 eth0

#new
http://panticz.de/nmap-ip-and-portscan

# old
# scan ip from mac
NET=192.168.0
for ((i=1; i<=254; i++));do
ping -c 1 ${NET}.$i 2>&1 >/dev/null
arp -a ${NET}.$i
done

# Bandwidth calculator

Syndicate content