FreeBSD Trafic Shaping

http://www.bsdnews.org/02/dummynet.php

Udgivet i Uncategorized | Skriv en kommentar

FreeBSD Trafic Shaping

http://www.bsdnews.org/02/dummynet.php

Udgivet i FreeBSD, Knowledge Base, Links, Old Base | Skriv en kommentar

Software raid in freebsd

you can if you want add:
device   ccd

but it shouldnt be necesary:

ccdconfig ccd1 32 0 /dev/ad0 /dev/ad1

Unites ad0 and ad1 in a harddisk named ccd1 which has twice the size

Save config:

ccdconfig -g > /etc/ccd.conf

echo /dev/ccd1 /store ufw rw 1 1 >> /etc/fstab , to mount during boot.


If you want mirroring do
ccdconfig ccd 32 CCDF_MIRROR /dev/ad0 /dev/ad1



# You can join two arrays as well

ccdconfig ccd3 32 0 /dev/ccd1 /dev/ccd

Unites the two arrays ccd1 and ccd2 in ccd3
Udgivet i FreeBSD, Knowledge Base, Old Base | Skriv en kommentar

Enabling 3d Support in Fedora Core 2

Remove any NVIDIA Drivers before proceding.

Hent ATI Drivers til XFree86 4.30

http://www.ati.com/support/drivers/linux/radeon-linux.html

Hent Fedora Core 2 Patch
http://www.fedoraforum.org/forum/attachment.php?attachmentid=3340

Derefter aabner du en terminal som root og henter kernesovs.

# yum install kernel-sourcecode

Installer ATI Drivere

# rpm -Uvh --replacefiles fglrx-4.3.0-*.i386.rpm

Apply the patch

# cd /lib/modules/fglrx/build_mod
# gunzip -c /tmp/fglrx-fedora.patch.gz | patch -p1

Build the module and install it
# sh make.sh
# cd ..
# sh make_install.sh

Now we need to install it, switch to runleve 3

# telinit 3

Login as root and remove current radeon drivers

# rmmod radeon
# rmmod fglxrx

Configure the the new driver and create x config file

# fglrxconfig

Symlink the ned config file
# cd /etc/X11
# mv xort.conf xorg.conf.bak
# ln -sf XF86Config-4 xorg.conf

Apply this fix , its a mouse error the fglrxconfig introduces
# sed -i 's/\dev\/mouse/\/dev\/input\/mice/g' /etc/X11/xorg.conf

Start X again
telinit 5

I stole this guide from : http://fedorafaq.org/#radeon
Udgivet i Knowledge Base, Linux, Old Base, Workstation | Skriv en kommentar

gprs internet på en nokia telefon

opret en modemforbindelse der bruger mobil telefonen som modem, og brug flg opkalds data:

tlf nr: *99***1#
bruger: ingen
kode: ingen

det sidste 1 tal skal måske skiftes hvis mobilen kører på et andet CID
Udgivet i Knowledge Base, MobilPhone, Old Base | Skriv en kommentar

redirect of banned users in firewall

the table `macs` have a field `mac` which identifies the banned computer, and a field `status` which identifies the state of the computer.

to redirect the users:
<pre>
for mac in $( echo "SELECT mac FROM macs WHERE status='banned';" | mysql -u fwuser bannedusers | grep -v mac ); do
        iptables -t nat -A PREROUTING -i eth1 -p tcp -d ! 10.0.0.1 -m mac --mac-source $mac --dport 80 -j REDIRECT --to-port 8080
done
</pre>

access are restricted to hosts other than the local (10.0.0.1)
Such connections are directed to port 8080 on the local machine.

on port 8080 a virtualhost runs with index.php that redirects to example.org/banned.php and a ErrorDocument 404 directive that also points at example.org/banned.php. (and thus catches subdirs and other pages in the original request)

index.php:
<pre>
<?
header("Location: http://example.org/banned.php");
?>
</pre>

.htaccess:
<pre>
ErrorDocument 404 http://example.org/banned.php
</pre>

virtualhost:
<pre>
<VirtualHost 10.0.0.1:8080>
    DocumentRoot /var/www-banned/
    ServerName gateway.example.org
</VirtualHost>

<Directory /var/www-banned/>
    Options Indexes Includes FollowSymLinks MultiViews

    AllowOverride All

    Order allow,deny
    Allow from all
</Directory>
</pre>

remember:
<pre>
Listen 80
Listen 8080
</pre>
in httpd.conf
Udgivet i Apache, Old Base | Skriv en kommentar

redirect of banned users in firewall

the table `macs` have a field `mac` which identifies the banned computer, and a field `status` which identifies the state of the computer.

to redirect the users:
<pre>
for mac in $( echo "SELECT mac FROM macs WHERE status='banned';" | mysql -u fwuser bannedusers | grep -v mac ); do
        iptables -t nat -A PREROUTING -i eth1 -p tcp -d ! 10.0.0.1 -m mac --mac-source $mac --dport 80 -j REDIRECT --to-port 8080
done
</pre>

access are restricted to hosts other than the local (10.0.0.1)
Such connections are directed to port 8080 on the local machine.

on port 8080 a virtualhost runs with index.php that redirects to example.org/banned.php and a ErrorDocument 404 directive that also points at example.org/banned.php. (and thus catches subdirs and other pages in the original request)

index.php:
<pre>
<?
header("Location: http://example.org/banned.php");
?>
</pre>

.htaccess:
<pre>
ErrorDocument 404 http://example.org/banned.php
</pre>

virtualhost:
<pre>
<VirtualHost 10.0.0.1:8080>
    DocumentRoot /var/www-banned/
    ServerName gateway.example.org
</VirtualHost>

<Directory /var/www-banned/>
    Options Indexes Includes FollowSymLinks MultiViews

    AllowOverride All

    Order allow,deny
    Allow from all
</Directory>
</pre>

remember:
<pre>
Listen 80
Listen 8080
</pre>
in httpd.conf
Udgivet i Apache, Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

CPAN Quickstart

http://www.cpan.org

First time

# perl -MCPAN -e shell

Some configuration options will be asked.

>> install NSNMPD::Simpe

Installation will go on

>> … install more

or

>> quit

Next time configuration will not be asked.

Udgivet i Knowledge Base, Old Base, Uncategorized | Skriv en kommentar

Kagså switche

81.19.234.134 : Wan, 3225g

172.16.11.101 : Backbone , 3226s
172.16.11.111 : Blok 161 , 3224
172.16.11.121 : Center switch , 3226s

172.16.11.102 : Fællesblok, 3224

172.16.11.103 : Munkecelle , 3224
172.16.11.113 : Munkecelle secondary , 3224

172.16.11.104 : Inspektøren , 3224

172.16.11.105 : Blå rækkehuse , 3224

172.16.11.106 : Orange rækkehuse, 3224
172.16.11.116 : Secondary , 3224

172.16.11.107 : Lille rækkehuse, 3224

172.16.11.108 : Grå rækkehuse, procurve 212m

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

failover firewall links

cisco pix:
http://www.cisco.com/univercd/cc/td/doc/product/iaabu/pix/pix_61/config/failover.htm

openbsd with pfsync + CARP:
http://www.countersiege.com/doc/pfsync-carp/

openbsd with pfsync, but not CARP:
http://www.seattlecentral.edu/~dmartin/docs/bridge.html
(CARP doesn’t work with bridges)

Udgivet i Knowledge Base, Links, Old Base | Skriv en kommentar