network

Configure network bridge

#!/bin/bash
 
# backup original network config
mv /etc/network/interfaces /etc/network/interfaces.org
 
# configure network bridge for xen
cat <<EOF> /etc/network/interfaces
auto lo
iface lo inet loopback
 
# eth0 (internal lan)
auto eth0 eth1 xenbr1
iface eth0 inet static
        address 192.168.1.111
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.5
        #post-up ethtool -K eth0 tx off
 
# eth1 (DSL)
iface eth1 inet manual
        up ifconfig eth1 0.0.0.0 promisc up
 
# xenbr1 (bridge between second nic

PXE Net Boot

 

OpenVPN connect to network with same ip range

#!/bin/bash
 
# delete routing for whole network
sudo route del -net 192.168.1.0 netmask 255.255.255.0 dev tap0
 
# add route to hosts
for ip in {30..50}; do
	sudo route add 192.168.1.${ip} dev tap0
done

wep

airmon-ng start wlan0 6
wesside-ng -i wlan0

#!/bin/sh

export BSSID=00:1A:4F:9A:6F:9D
export CHANNEL=11

rmmod ipw2200
modprobe ipw2200 rtap_iface=1
iwconfig eth1 mode managed channel $CHANNEL key s:password ap $BSSID
#ifconfig eth1 hw ether 00:a1:b2:c3:d4:e5
ifconfig eth1 up
ifconfig rtap0 up

#########
rmmod ipw2200
modprobe ipw2200 rtap_iface=1
iwconfig eth1 ap $BSSID
iwconfig eth1 key s:fakekey
iwconfig eth1 mode managed
ifconfig eth1 hw ether 00:19:3E:00:3E:36
iwconfig eth1 channel $CHANNEL
ifconfig eth1 up
ifconfig rtap0 up
#########

memtest86+ PXE boot

#!/bin/bash
 
# check for current version
# http://www.memtest.org/#downiso
 
URL=http://www.memtest.org/download/4.00/memtest86+-4.00.bin.gz  
 
wget ${URL} -P /tmp
gzip -d /tmp/memtest86+-*.bin.gz
 
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..." 
cat <<EOF>  /tftpboot/pxelinux.cfg/memtest86+.conf
LABEL linux
   MENU LABEL memtest86+
   KERNEL /memtest/memtest86+
EOF
 
echo "MENU INCLUDE pxelinux.cfg/memtest86+.conf" >> /tftpboot/pxelinux.cfg/defaul

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

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

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

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

# 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

Do you like this page? Then support it. Please click the AD below and visit the sponsor. Thank you!


Syndicate content