Friday, December 03, 2004

A screen within a screen within a screen session

If you every have a screen within a screen within a screen session you will quickly find it very frustrating to detach the sub-most screen. Luckly I found a post on here on how to detach just the sub-most screen session. You must be within that sub-most screen you want to detach before you hit "Ctrl-A a a d". It is quit a mouth full but it gets the job done.

Sunday, October 31, 2004

Senior Project moved to CVS

Now that I have the hang of CVS I have moved my old senior_proj folder to CVS as SeniorProject. It has been some time since I last worked on this project so I'll make a little note to myself for future reference.

cvs project name: SeniorProject
Vendor Name: Spring2004WBSCSS
Tag: ALPHA

The next tag will be Release1.0 when it is ready for production use.

Wednesday, October 20, 2004

picoFreeBSD

I never thought FreeBSD could fit on a single floppy. This reminds FreeSCO back in my high school days.

FreeBSD right off Press!

For the latest in FreeBSD press articles.

Tuesday, September 21, 2004

Get Java Plugin to work with FreeBSD with this link

Found this link on the web, for getting the java plug-in to work with FreeBSD. I have not tried it out yet but I may need this in the future as I have had problems getting the java plug-in to work in the past:

URL: http://archive.pilgerer.org/mharc/html/freebsd-stable/2004-07/msg00280.html

Monday, September 20, 2004

VIM takes forever to start!

Wow!! I just made several changes to my .cshrc file and later found out that for some strange reason, VIM was taking its own time to start. Apparently, VIM was trying to connect to the X server to get additional information.

After searching on Google I found that the -X options to vim would fix this delay and it did. Now vim starts up lightening fast like it used to.

It was probably enabling the DISPLAY variable in .cshrc, which triggered this slow effect.

Sunday, September 19, 2004

Ruby, please stop Core Dumping...

It has been a while since I last ran cvsup on my ports collection. To my surprise I ran into a bit of a jam when I ran: cvsup -g -L 2 /etc/stable-supfile. I received a hideous error which looked something like this:

root@:/usr/ports> portupgrade -ar
[Updating the pkgdb in /var/db/pkg ... - 472 packages found (-1 +0) (...)/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:467: [BUG] Segmentation fault
ruby 1.8.2 (2004-07-29) [i386-freebsd4]

Garance Alistair Drosehn made a post to lucky.freebsd.ports newsgroup, which in my opinion was the best result I found after searching for solutions to this fix. This post was as follows:

Try adding the following two
lines to /usr/local/etc/pkgtools.conf :

ENV['PKG_DBDRIVER'] = "bdb_hash"
ENV['PORTS_DBDRIVER'] = "bdb_hash"

Add them down where other environment variables are set, such as
ENV['PORTSDIR'] ||= '/usr/ports'

I must also mention that issuing:

root@:/usr/ports> pkgdb -fu

worked wonders and fixed the problem, now no more core dumps on portupgrade. I wonder what caused this problem.

Two editors deleted, another blog created! :)

I should have done this first, create a separate blog for OOD instead of adding my partners to my blog. This will just save a lot of headaches in the future.

Instead I created oodwithbaliga.blogspot.com and invited my two partners, Dave and Steven. :)

Wednesday, September 15, 2004

Two Editors added for OOD

I would like to humbly welcome Steven Peterson, and David Grochowski to My Almost Daily Blog (MADB). These individuals were added as a result of group formations for Object Oriented Design for Fall 2004. We are to use this blog to keep track of our projects logs, including the first project. In addition, since I will also be using the blog to keep track of what I learn as it pertains to computers I extend this option for you two as well. Feel free to post information of your daily learnings.

Tuesday, September 14, 2004

Fo' Shizzle

Yo.

Sunday, September 05, 2004

List the 10 largest files in a directory

Taken from "BSD Fortune".
du /partition_or_directory_name | sort -rn | head
-- Dru

Saturday, September 04, 2004

Free Virus Protection for Windows

http://www.pandasoftware.com/activescan/
http://www.grisoft.com/us/us_index.php
http://www.avast.com/

Tuesday, August 24, 2004

Desktop Printing w/ FreeBSD

Whew! It is getting late and I need some sleep. I will read this article either tomorrow or within the next week. Since my LPT port is broken I will have to try out the examples in this article on another computer. Petes computer will be the best pick since more computers are networked to the server I setup. This will come in very hand when it is set up.

The article URL: http://www.ofb.biz/modules.php?name=News&file=article&sid=321

Encrypt GAIM Conversations

This works with Gaim-0.81 and provides transparent RSA using NSS.
More information on this later after using it for some time.
URL: http://gaim-encryption.sourceforge.net/

Brief Notes from Poul -Henning Kamp on GBDE

I am new to this GBDE (GEOM Based Disk Encryption) for now so I am just going to jot down information I find interesting or did not know about for later personal research.

These notes are from http://phk.freebsd.dk/pubs/bsdcan-04.slides.gbde.pdf

GEOM - The framework for classes which perform transformations on disk I/O:
- was developed under DARPA/SPAWAR.
- Is filesystem independent and works at the disk level. The good thing is that these encrypted disk/partitions look just like any other disk. Better yet, GEOM works with UFS1/2. Since I am using FreeBSD-4.10 Stable I may have to upgrade to 5.x if I want to use GBDE. I am really comfortable with 4.10 right not, but I know eventually I will upgrade. For now I will just read up on GBDE.
- Many other filesystems can be used with GEOM, including but not limited to FAT, NTFS, ISO9660 and many more.

How Good is GEOM?:
Well, it is said that unless AES is broken GEOM can not be cracked! That sounds good to me.

Another Good News Source

http://www.newsforge.com/ I found while reading a Slashdot post on the new GBDE-GEOM Based Disk Encryption for FreeBSD. This is something I will look into later.

Protect the USB PenDrive at all Cost!

This is something I fear most. Losing my USB pendrive! Not only will my data be gone, but who ever comes across it will have my data. Why not just encrypt it?

This article from BSDNews.org talks just about that.

Monday, August 23, 2004

Convert to Hex in VIM

Just recently, I realized my favorite Open Source Editor (OSE), VIM, has a built-in "hex editor". Well, it is not really a Hex editor, but rather a conversion option. I realized this while playing with the pull-down menus in VIM for windows.

While in VIM issuing the following will convert the current screen to hex:

$> %!xxd

To convert back do:

$> %!xxd -r

I thought this was pretty neat!

Wednesday, August 18, 2004

Hotmail in FreeBSD (gotmail)

Found a new toy, gotmail (/usr/ports/gotmail). This is a console application which downloads mail from hotmail.com or msn.com to either a local folder or it can be configured to forward mail to another email address like gmail!.

Thursday, August 12, 2004

1and1 Linux Hosting Setup

A client of mine just purchased hosting services from 1and1.com and wants me to do web development for him. Initially he signed up for the MS package, but I requested that he change to Linux. The MS package was nice, it came with .NET and all that good stuff, but I am on the go most of the time and every machine I sit at will not have VS.NET waiting for me. The ability to SSH is avaliable on most computers I do work on. This for me will be the best option for now as I can just ssh from where I am and do updating.

Manually I had to transfer all the files from the MS host (the initial service) to my machine which will be transerfed to the Linux host (the new service) once I have my ssh account customized the way I need it.

I need the following files:
- .cshrc
- .vimrc
- .screenrc

I need the following directories:
- phpMyAdmin/
- Backups/
- home/

Just realized this is going to be annoying!!! I HATE how this HOST does not allow you to change their cryptic usernames! I have to use usernames like 34asfa243asf! And their passwords look just the same!

Created one out of three databases to make sure database creation works like I expect. The same problem here even the names of the database created look like password and cannot be changed. The best thing for me to do is just create a log file on the server and document which database I am using and for what reason/application.

-Downloaded phpMyAdmin to work with the one out of three databases only.
-created an .htaccess to protect the database

Wednesday, August 11, 2004

Setting up Apache2/mod_php/mod_ssl ....

Excellent Guide: http://www.bsdguides.org/guides/freebsd/webserver/apache_ssl_php_mysql.php

Post Notes on Apache (2.0.50):

Since 2.0.49_2, to run apache www server from startup, add apache2_enable="YES"
in your /etc/rc.conf.
Available variables you add/set to /etc/rc.conf.
- apache2_enable (bool): Set to "NO" by default.
Set it to "YES" to enable apache2.
- apache2ssl_enable (bool): Set to "NO" by default.
Set it to "YES" to start apache with SSL
(if exists in httpd.conf).
- apache2limits_enable (bool):Set to "NO" by default.
Set it to yes to run `limits $limits_args`
just before apache starts.
- apache2_flags (str): Set to "" by default.
Extra flags passed to start command.
- apache2limits_args (str): Default to "-e -C daemon"
Arguments of pre-start limits run.

Apache2 Installed OK and I added the following to /etc/rc.conf
### Start-up Options for Apache2 ############
apache2_enable="YES"
apache2ssl_enable="YES"

Manually creating the directories for SSL if they do not already exists:

$> mkdir /usr/local/etc/apache2/ssl.key
$> mkdir /usr/local/etc/apache2/ssl.crt
$> chmod 0700 /usr/local/etc/apache2/ssl.key
$> chmod 0700 /usr/local/etc/apache2/ssl.crt

Installing MySQL (mysql-server-4.0.20)
$> cd /usr/ports/databases/mysql40-server
$> make install WITH_OPENSSL=yes distclean

Added group "mysql".
Added user "mysql".

# Personal Note: Remember to change the password for mysql user root.

Next I will install mod_php4 and mod_php5
Note: Make sure to check the OpenSSL box and leave the rest of the
default values alone.

$> cd /usr/ports/www/mod_php4
$> make install distclean
$> cd /usr/ports/lang/php4-extensions
$> make install distclean

I just realized that I can not install both mod_php4 and mod_php5 because of the following error:
===> mod_php5-5.0.0_2,1 conflicts with installed package(s):
mod_php4-4.3.8_2,1

They install files into the same place.
Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/mod_php5.
*** Error code 1

Stop in /usr/ports/www/mod_php5.


So, for now I'll just stick with mod_php4 and its extensions

$> cd /usr/ports/www/mod_php5
$> make install distclean
$> cd /usr/ports/lang/php5-extensions
$> make install distclean

Edit Apache's configuration file after all the "LoadModule" lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


Certificate Creation:
----------------------

Change to root's dir and issue the following:

$> mkdir SSLCertificates
$> cd SSLCertificates
$> opensll genrsa -des3 -out server.key 1024

From the above key we created we then need to make a certificate signing Request (CSR)
from the keys we just created.

$> openssl req -new -key server.key -out server.csr

After the above command use the same password used during CSR
Fill out all neccessary information required.

Now we need to sign our certificate
$> openssl x509 -req -days 365 -in server.csr signkey server.key -out server.crt

The above signs and makes our certificate valid for 365 days. Now the files need to be
copied to the appropiate directories.

$> cp server.key /usr/local/etc/apache2/ssl.key/
$> cp server.crt /usr/local/etc/apache2/ssl.crt/

$> chmod 0400 /usr/local/etc/apache2/ssl.key/server.key
$> chmod 0400 /usr/local/etc/apache2/ssl.key/server.crt




The following windows were open with these links before I rebooted!
http://bsdvault.net/sections.php?op=viewarticle&artid=78
http://bsdvault.net/sections.php?op=viewarticle&artid=82
http://bsdvault.net/sections.php?op=viewarticle&artid=105
http://www.tao.ca/

Tuesday, August 10, 2004

Use Blowfish for user password not MD5!


It just came to me understanding and attention that I was not using the strongest encryption scheme to encrypt my user passwords. This article from "BSDVault explains how to change the default DES encryption on FreeBSD to Blowfish. By default DES is used when users are added with "adduser" to produce a cipher, which in turn goes through the MD5 function to produce a hash.




Blowfish is said to be extermely strong and that it has yet to be cracked! Here are the procedures I used as I was following the article on BSDValut.net:

$> vim /etc/login.conf
Changed: password_format=md5
To: :passwd_format=blf:$> cap_mkdb /etc/login.conf


$> vim /etc/auth.conf

Added: crypt_default = blf

$> Checking /etc/master.passwd I see:

blowfishuser:$2a$04$tZ8kRFQJ4YU50c9cEYccIu7Z6BtmwB5fpwsE.kl7ogbEwNyQCgG16:

Nice!

Note the "$2a$", which denotes blowfish encryption is being used. This time around the hash in much longer than MD5. So, now when password is use the password will be encrypted with blowfish.

Friday, August 06, 2004

Nice little checklist for FreeBSD

http://www.sddi.net/FBSDSecCheckListaslist.html

This Check list is going to come in handy if I reinstall my FreeBSD system. I have made so many changes over the years and I can use this to add to when I think of something. The below checklist was slightly modified to suit my needs.


FreeBSD Security Checklist as a List

Location of this document: http://www.sddi.net/FBSDSecCheckListaslist.html

Location of the full version: http://www.sddi.net/FBSDSecCheckList.html

Installation
____ separate slices for /(500MB), /tmp(400MB), /usr(33G), /usr/home(2G), /var(400MB), /storage(34G)
____ no inetd.conf, nfs or ntp
____ list ntp servers to use:________________ ________________
____ add /sysutils/rdate-1.0 & /security/chkrootkit-0.36
____ add non-privileged user account in wheel group
Users
____ vipw and remove toor user, rename Charlie&, change shells
____ in /etc/group, and add ssh:*:0:sshusergroup
motd
____ cp /etc/motd /etc/motd.old
____ rm /etc/motd
____ touch /etc/motd
____ vi /etc/motd and create
____ cp /etc/motd /etc/issue
/etc/ssh/sshd_config
____ port 22
____ protocol 2
____ #Hostkey /etc/ssh/ssh_host_key
____ PermitRootLogin no
____ MaxStartups 5:50:10
____ X11Forwarding no
____ PrintLastLog yes
____ SyslogFacility auth
____ LogLevel VERBOSE
____ PasswordAuthentication no
____ Banner /etc/issue
____ AllowGroups sshusers
/etc/ssh/ssh_config
____ ForwardAgent no
____ ForwardX11 no
____ PasswordAuthentication no
____ CheckHostIP yes
____ Protocol 2
DSA Key Generation (as opposed to passwd)
____ su - {nonprivuser} as root
____ ssh-keygen -d
____ accept default /.ssh/id_dsa
____ enter passwords twice
____ cd .ssh
____ cat id_dsa.pub > authorized_keys2
____ copy key to floppy, and confirm
____ delete key from server
rc.conf
____ inetd.conf="NO"
____ syslogd_enable="YES"
____ syslogd_flags="-ss"
____ icmp_drop_redirect="YES"
____ icmp_log_redirect="YES"
____ clear_tmp_enable="YES"
____ portmap_enable="NO"
____ icmp_bmcastecho="NO"
____ fsck_y_enable="YES"
____ update_motd="NO"
____ tcp_drop_synfin="YES"
____ log_in_vain="YES"
login.conf & auth.conf
____ vi /etc/login.conf
____ :passwd_format=blf:____ :passwordtime=52d:____ mixpasswordcase=true:____ :minpasswordlen=9:____ :idletime=32:____ cap_mkdb /etc/login.conf
____ confirm with vipw that password field starts with $2
____ confirm shells for users
____ vi /etc/auth.conf
____ crypt_default=blf
sysctl.conf
____ vi sysctl.conf
____ net.inet.tcp.blackhole=2
____ net.inet.udp.blackhole=1
____ kern.ps_showallprocs=0
fstab
____ vi /etc/fstab
____ /tmp to rw,noexec
____ /usr/home to rw,nosuid,noexec
____ /floppy to rw,noauoto,noexec,nosuid,nodev,noatime
____ /cdrom to ro,noauto
crontab
____ chmod 600 /etc/crontab
____ touch /var/cron/allow and add users who can change cron jobs
____ chmod 600 /var/cron/deny
____ vi /var/cron/deny and add users to disallow
____ add 0 2 * * * root /usr/libexec/locate.updatedb
____ add 0 2 * * * root /usr/local/sbin/rdate {ntpserver}
____ add 1 3 * * * root /usr/local/sbin/chkrootkit
Kernel Changes /usr/src/sys/i386/conf/{kernelname}
____ #pseudo-device bpf
____ options SC_NO_HISTORY
____ options SC_DISABLE_REBOOT
____ options SC_DISABLE_DDBKEY
____ options TCP_DROP_SYNFIN
____ options RANDOM_IP_ID
____ options ICMP_BANDLIM
____ confirm settings in /usr/src/sys/i386/conf/LINT
____ rebuild kernel and reboot
File Permissions
____ chmod 700 /root
____ chmod 600 /etc/syslog.conf
____ chmod 600 /etc/rc.conf
____ chmod 600 /etc/newsyslog.conf
____ chmod 600 /etc/hosts.allow
____ chmod 600 on /etc/login.conf
____ chmod 700 /usr/home/*
Network Time Protocol
____ vi /etc/ntp.conf
____ restrict default ignore
TCP Wrappers
vi /etc/hosts.allow
____ sshd : localhost : allow
____ sshd : x.x.x.x, x.x.x.x : allow
____ sshd : all : deny
____ ftpd : ALL : deny and so on for unused services
Console Access
____ vi /etc/ttys
____ first line: console none unknown off insecure
____ on insecure for each tty
Bash Shell
____ vi /usr/share/skel/.bash_logout
____ clear
chflags
____ list files to sappnd & schg
Clean-up
____ sockstat -4
____ tcpdump -xX

Sguil Installation Guide v 0.5.0_03

Richard Bejtlich just updated the Sguil Installation Guide. I have been telling myself to read this, but haven't yet gotten to it. I am determined to read it within the next week and try out Sguil on my box. The URL: http://sguil.sourceforge.net/sguil_guide_latest.txt

Those Damn Gaps!!!

I finally was able to get those gaps inbetween my images out! It took me three days... looking over my CSS as if I was a mad man... I mean, I looked and was sure there was nothing wrong with my code. I checked google, but but nothing. I was luck to stumble across a site which solved my problem. I don't have the URL off hand, but the site pretty much mentoned how IE works in quirks mode when XML 1.0 is used in a site. Well, my problem was I was outting XML with XHTML. Don't ask me out this messed up the images, but it did. I commented out the XML and it worked!! Boy, was I releaved.

Tuesday, August 03, 2004

There is life with CSS after all....

The reading was worth it. I was able to put together over 10 sliced images using only CSS positioning and passed XHTML Transitonal with ease. I must say, there is still a lot I have to learn. It really helps to try it out. All the reading was good, but I really understood most aspects better by trying them out.

Sunday, August 01, 2004

Images, Tables, and Mysterious Gaps

Article
Images, Tables, and Mysterious Gaps
Eric A. Meyer, Netscape Communications
Published 04 Mar 2002 (Feedback)
Revised 21 Mar 2003
url: http://devedge.netscape.com/viewsource/2002/img-table/

My Personal Notes (Information I found useful):


Block-Level Attribute:
Causes boxes to be stacked on top of each other instead of side-by-side.

Block-level and Inline Elements

Block level elements add line breaks before and after themselves. Here are some Block-level HTML tags:


  • <address>

  • <blockquote>

  • <br>

  • <div>

  • <fieldset>

  • <h1><h6>


  • <hr>

  • <legend>

  • <p>

  • <pre>

  • <ul>, <ol>, <li>, <dl> and <dd>




Inline Elements are the opposite and do not add line breaks before and after tags.

Saturday, July 31, 2004

Get those doctypes RIght the First Time

http://www.alistapart.com/articles/doctype/

Good things to know before webdesign

http://www.cameronmoll.com/archives/000036.html

From My Personal Experience:


- Inline elements should not have a width or height property applied to them. E.g., span, em, b, etc...

FireFox Extensions

This will help save time and effort when debugging websites.
http://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=60&vid=63

CSS Step 1: The Box Model

The CSS Box Model is pretty straight forward. I think I understand what is going on.

The box model pretty much talks about the borders which surround objects. These objects can be anything from pictures to text to other boxes. The box model also describes how these boxes can be positioned relatively, absolutely, statically or just in a normal flow layout to others boxes.

Each box which surrounds an element has four areas, starting from inside out:
1. The Content Area
2. Padding Area
3. Border Area
4. Margin Area

Worth noting:
- The margin edge height of a box depends on its content height, plus the top and bottom padding.
- The content width for each box is calculated top-down (note sure what this means exactly).
- Margins of boxes are always transparent. Keep in mind then creating a flow layout.

Calculating Widths and Margins:
For Absolutely positioned, non-replaced elements

The width of a containing block is equal to

'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right'

More Details...
I often have this problem of determining how wide a box is. Sometimes I feel it is good that I set a with or height to auto, so the margin can automatically adjust but then I run in to problems in the long run. This is because I am not taking into account the margins and padding or wether I have the left or right attribute applied.

Thursday, July 29, 2004

CSS is Kicking my ASS!

Yes! I said it! I am attempting to create a "liquid layout" with just CSS and no HTML.
As I layout over a dozen images, so overlap some are displaced and some are generating different behaivors in different browsers. Whew! This is not easy, especially when IE and Mozilla do not always work like you want them to.
I am going to head over to w3c.org and read up on CSS2. I should have taken a visit to w3c in the first place.

Sunday, July 25, 2004

Mono! Just when You thought...

I remember while I was joing my internship and asked, "I wonder if there is an open source equivalent to Microsoft .NET?" Since these were all M$ people they responded like any M$ advocate would, "I do not know. Open Source?". Yep!

Atleast there is google. Low an behold I get go-mono.com on search query: ".NET Open Source Implementation"

I was excited when I saw this page (www.go-mono.com). I did not imagine to see a .NET implementation for a couple years, but the folks at Mono were on top of it.

Read more

One or Two blogs?

I have two blogs. My delima is weather or not I should have two blogs or one. When I first head about blogspot.com I thought it would be a greate idea to have two blogs, one for my personal life and another for just my computer life. The problem is, my personal life is my computer life and vice versa.

Sometimes my logs conflit and can fit in either category. What I am going to do now is revert to just one blog. I just hope this is a good idea. For now I will add all the entries I have my FreeBSD blog to my winful blog and go from there. Since do not have too many entries I should be able to move everything over on a week or so.

I am disappointed what I have not been able to write in my blogs everyday like I said when I first created them.

Tuesday, May 25, 2004

"Getting my feet wet with Sockets, BSD style."

Just came across this site with an interesting tutorial:
BSD Sockets: A Quick And Dirty Primer
by Jim Frost
February 13, 1990
URL: http://www.softlab.ece.ntua.gr/facilities/documentation/unix/sockets.html


BSD Sockets are thought to be hard to understand at first. I guess I'll see for my self as I read through this tutorial.

The BSD socket is one of the primary medium of communication between different processes much like the telephone.

There are many types of socket schemes which are not to be confused with socket types, but for this tutorial only one socket scheme will be discussed in detail and this is the AF_INET socket scheme. Sockets are created with the socket() command which basically instantiates a connection with the addressing scheme specified as a parameter. The two most used addressing schemes are AF_UNIX and AF_INET. The AF_UNIX socket scheme uses UNIX pathnames to identify sockets and is useful for IPC between processes on the same machine. The AF_INET scheme uses Internet addresses in addition to a machine address and a port number which can allow form more than one socket connection on each macnine.

Now on to socket types. In addition to specifing the socket schemes and port the socket type must also be specified to the socket() command. The two most commonly used socket types are SOCK_STREAM and SOCK_DGRAM. SOCK_STREAM looks like what I will need, to read in those characters from vortex.labs.pulltheplug.com in order to get started with the wargame. SOCK_STREAM allows for data to move across the network as a stream of characters. SOCK_DGRAM allows for chunks of characters to come through as one at a time and are call datagrams.

When a socket is created that socket must then be binded to an address to listen to. This is done with the bind() function when working with sockets. Also with SOCK_STREAM there is the ability to work with incoming connections in a queue like fashion. To handle connections in a queue like fashion does not mean there is an unlimited number of space to have connections queued up in. We are limited to a maximum of five connections. The listen() function is use to set the number of request to have in a queue. Once we reach this maximum connections will be denied.


Now that I have a semi-ok grep on how socket(), bind() and listen() are used lets put it to practice.

/* This is not my code
* Taken from the URL above
*/

FreeBSD4.9-Stable (4.10-PRERELEASE) Backing up

Today I just bought a whole new pack of blank CD-R from stables. I bought the 50pk Memorex CDs for $20.00.

I will be backing up the following directories on my system. I have made a lot of changes since I last installed FreeBSD 4.9. I would hate to start from scratch. This happened to me before and it was not nice. I spent about a week reinstalling, making world, installing several ports, recompiling the kernel and fine tuning the system to my liking.

Before a disaster happens I will back up the following directories:

# /usr/ports/distfiles
# Directory size: 898 Megabytes (919, 206 bytes)
#

# /usr/local/etc/
# Directory size: 2.4 Megabytes (2, 450 bytes)
#

# /etc
# Directory size: 1.9 Megabytes (1, 898 bytes)
#

# /root
# Directory size: 85 Megabytes (86, 912 bytes)
#

# /var
# Directory size: 46 Megabytes (46, 916 bytes)
#

# /home
# Directory size: 1.2 Gigabytes (1, 301, 796 bytes)
#

# /storage/icon.storage/
# Directory size: 2.6 Gigabytes ( 2, 736, 608 bytes)
# If had a DVD Recorder I could have put everything on one CD.
#

# /storage/Lucious
# Directory size: 3.6 Megabytes (3, 666 bytes)
#

Backup CD 1 will contain:
1. /usr/local/etc (2, 450 bytes)
2. /etc (1, 898 bytes)
3. /root (86, 912 bytes)
4. /var (46, 916 bytes)
5. /storage/Lucious (3, 666 bytes)
Total: 141, 842 bytes

The iso for CD 1 will be named eervs`date`.iso and was created as follows:
$> mkisofs -UR -b /boot/cdboot -o ./eervs.iso /usr/local/etc /etc /root /var /storage/Lucious

-U disables filename restrictions
-R RockRidge CD format. This produces an image identical to the FreeBSD system tree.
-b Makes the CD bootable

This produced the following error message:
Using motd000 for /motd (motd)
mkisofs: Error: '/root/motd' and '/etc/motd' have the same Rock Ridge name 'motd'.
mkisofs: Unable to sort directory

Looks like I will be using tar the mkisofs.

For /usr/local/etc:

$> tar --gzip --create --verbose --absolute-names --preserve --exclude '*~' --file usr-etc.tgz /usr/local/etc

For /etc:

$> tar --gzip --create --verbose --absolute-names --preserve --exclude '*~' --file etc.tgz /etc

For /root:

$> tar --gzip --create --verbose --absolute-names --preserve --exclude '*~' --exclude '*Cache*' --exclude '*cache*' --file root.tgz

For /var:

$> tar --gzip --create --verbose --absolute-names --preserve --exclude '*~' --file var.tgz /var


I will now create my iso image with:

$> mkisofs -UR -V "EERVS" -o "eervs-4.9BSD`date +%Y%m%d%H%M%S`.iso" Lucious.tgz etc.tgz root.tgz usr-etc.tgz
Warning: creating filesystem that does not conform to ISO-9660.
20.58% done, estimate finish Tue May 25 23:16:09 2004
41.18% done, estimate finish Tue May 25 23:16:09 2004
61.72% done, estimate finish Tue May 25 23:16:11 2004
82.33% done, estimate finish Tue May 25 23:16:11 2004
Total translation table size: 0
Total rockridge attributes bytes: 494
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 10d24
24304 extents written (47 Mb)

The iso was written to CD with:
$> cdrecord dev=2,0,0 -v speed=42 eervs-3.9BSD20040525.iso

Track 01: 47 of 47 MB written (fifo 100%) [buf 98%] 20.7x.
Track 01: Total bytes read/written: 49774592/49774592 (24304 sectors).
Writing time: 27.526s
Average write speed 16.0x.
Min drive buffer fill was 89%
Fixating...
Fixating time: 13.667s
cdrecord: fifo had 784 puts and 784 gets.
cdrecord: fifo was 0 times empty and 385 times full, min fill was 93%.



Since the next set of directories all can not fit on one CD, I will create *.iso and split
the files in half before burning on CD. There is probably a better way to do this but I'll do it like this for now.



Backup CD 2
1. /usr/ports/distfiles (919, 206 bytes)
Instead of creating an iso image I can probably get away with deleting some files to make this
fit on a 700MB CD. After deleting the directories in /usr/ports/distfiles it only takes up 624M of storage space.

The iso was created and burned with the following commands respectively:
$> mkisofs -UR -o "distfiles-4.9BSD`date +%Y%m%d`.iso" -V "Distfiles" distfiles.tgz
$> cdrecord dev=2,0,0 -v speed=40 distfiles-4.9BSD20040525.iso

Backup CD 3 & 4
1. /home (1, 301, 796 bytes)
The iso for this directory will be named: home`date`.iso. Those are backquotes so the current date and time will replace the word 'date'. This iso will be split in half.

The iso was created and burned with the following commands respectively:
$> mkisofs -UR -o "home-4.9BSD`date +%Y%m%d`.iso" -V "HOME Directories" home.tgz

To split the iso:

$> split -b 699m home-4.9BSD20040526.iso home.iso

This produced two files:
1. xaa
2. xab

Which got names to home-4.9BSD_1_of_2_20040526.iso and home-4.9BSD_2_of_2_20040526.iso respectively.

To burn disk 1 and 2:

$> cdrecord dev=2,0,0 -v speed=40 home-4.9BSD_1_of_2_20040526.iso
$> cdrecord dev=2,0,0 -v speed=40 home-4.9BSD_2_of_2_20040526.iso


Backup CD 5, 6, 7 & 8
1. /storage/icon.storage ( 2, 736, 608 bytes)
The iso for this directory will be named: icon.storage`date`.iso. This image is going to be split 4 ways and placed onto four seperate CDs, each 700MB.


After createing the .tgz file for this backup then trying to create the iso from it I realized I was going this back up process backwards. Instead I just split the .tgz file into 4 chunks with split like so:

$> split -b 699m Storage.tgz

Then renamed each split file to:

$> mv xaa Storage_1_of_4_.tgz
$> mv xab Storage_2_of_4_.tgz
$> mv xac Storage_3_of_4_.tgz
$> mv xad Storage_4_of_4_.tgz

Time to create the .iso images and burn. Each .tgz was handled in this manner:

$> cdrecord dev=2,0,0 -v speed=52 -eject iconStorage-4.9BSD_X_of_420040526.iso
$> mkisofs -UR -o "iconStorage-4.9BSD_X_of_4`date +%Y%m%d`.iso" -V "Storage Directory X_4" Storage_X_of_4_.tgz > & /dev/null &


To mount the iso images:

$> vnconfig -v /dev/vn0c myimake.iso
$> mount -r -t cd9660 /dev/vn0c /mountpoint

After unmounting the vnode must be cleared so that another image may be mounted:

$> vnconfig -u -v /dev/vn0c

That was all. Lets hope my HD do not fail. "Knock on wood"

Monday, May 24, 2004

Just the ipf.rules I needed for my GATEWAY machine

I came across this really nice site when I was looking for example ipf.rules to use with IPFILTER.

This document was more than I needed.

Saturday, May 22, 2004

Setting up IPNAT for a Gateway Machine

Since my computer will be home for the summer I know my "pops" will need to use his computer and get on the net. I use FreeBSD and he uses Win2k. We have one internet connection and I need to access my box when I am away from home.

This is my first attempt to actually implement NAT. I have read Securing BSD 4.6 doc when I first installed 4.9 so I'll will refer to it while I setup this box to do my Network Address Translation.

I have a Linksys, EtherFast 10/100 Auto-Sensing 5-Port hub at my disposal to connect the other machines to the net.

The document I used to setup my FBSD box was written by Marty Schlacter, entitled "How to Build a FreeBSD-STABLE Firewall with IPFILTER". I found this document very helpful in regards to getting started with a new install and securing my boxen.

Skipping right #11. of the documentation listed above, titled: Create your IPFILTER and IPNAT rulesets

In this case tl0 is my outside interface connected to my ISP and fxp0 will be my inside interface which will connect to the hub and provide access to the rest of the machines.

My ipf.rules are as follows:
-----------------------------
#################################################################
# Outside Interface |tl0| Compaq Netelligent 10/100
#################################################################

#----------------------------------------------------------------
# Allow out all TCP, UDP, and ICMP traffic & keep state on it
# so that it's allowed back in.
#
# If you wanted to do egress filtering...here's where you'd do it.
# You'd change the lines below so that rather than allowing out any
# arbitrary TCP connection, it would only allow out mail, pop3, and http
# connections (for example). So, the first line, below, would be
# replaced with:
# pass out quick on tl0 proto tcp from any to any port = 25 keep state
# pass out quick on tl0 proto tcp from any to any port = 110 keep state
# pass out quick on tl0 proto tcp from any to any port = 80 keep state
# ...and then do the same for the remaining lines so that you allow
# only specified protocols/ports 'out' of your network
#----------------------------------------------------------------
pass out quick on tl0 proto tcp from any to any keep state
pass out quick on tl0 proto udp from any to any keep state
pass out quick on tl0 proto icmp from any to any keep state
block out quick on tl0 all

# -----------------------------------------------------------------------
# Block all inbound traffic from non-routable or reserved address spaces
# -----------------------------------------------------------------------
block in log quick on tl0 from 192.168.0.0/16 to any #RFC 1918 private IP
block in log quick on tl0 from 172.16.0.0/12 to any #RFC 1918 private IP
block in log quick on tl0 from 10.0.0.0/8 to any #RFC 1918 private IP
block in log quick on tl0 from 127.0.0.0/8 to any #loopback
block in log quick on tl0 from 0.0.0.0/8 to any #loopback
block in log quick on tl0 from 169.254.0.0/16 to any #DHCP auto-config
block in log quick on tl0 from 192.0.2.0/24 to any #reserved for doc's
block in log quick on tl0 from 204.152.64.0/23 to any #Sun cluster interconnect
block in quick on tl0 from 224.0.0.0/3 to any #Class D & E multicast


#----------------------------------------------------------------
# Allow bootp traffic in from your ISP's DHCP server only.
#----------------------------------------------------------------
pass in quick on tl0 proto udp from 0.0.0.0/32 to any port = 68 keep state
#----------------------------------------------------------------
# If you wanted to set up a web server or mail server on your box
# (which is outside the scope of this howto), or allow another system
# on the Internet to externally SSH into your firewall, you'd want to
# uncomment the following lines and modify as appropriate. If you
# have other services running that you need to allow external access
# to, just add more lines using these as examples.
#
# If the services are on a box on your internal network (rather than
# the firewall itself), you'll have to add both the filter listed below,
# plus a redirect rule in your /etc/ipnat.rules file.
#----------------------------------------------------------------
pass in quick on tl0 proto tcp from any to any port = 2121 flags S keep state keep frags
pass in quick on tl0 proto tcp from any to any port = 2222 flags S keep state keep frags
pass in quick on tl0 proto tcp from any to any port = 25 flags S keep state keep frags
pass in quick on tl0 proto tcp from any to any port = 80 flags S keep state keep frags
pass in quick on tl0 proto tcp from any to any port = 1977 flags S keep state keep frags
# pass in quick on tl0 proto tcp from X.X.X.X/32 to any port = 22 flags S keep state keep fra
gs

#----------------------------------------------------------------
# Block and log all remaining traffic coming into the firewall
# - Block TCP with a RST (to make it appear as if the service
# isn't listening)
# - Block UDP with an ICMP Port Unreachable (to make it appear
# as if the service isn't listening)
# - Block all remaining traffic the good 'ol fashioned way
#----------------------------------------------------------------
block return-rst in log quick on tl0 proto tcp from any to any
block return-icmp-as-dest(port-unr) in log quick on tl0 proto udp from any to any
block in log quick on tl0 all


#################################################################
# Inside Interface |fxp0| Intel EtherExpress 10/100
#################################################################

#----------------------------------------------------------------
# Allow out all TCP, UDP, and ICMP traffic & keep state
#----------------------------------------------------------------
pass out quick on fxp0 proto tcp from any to any keep state
pass out quick on fxp0 proto udp from any to any keep state
pass out quick on fxp0 proto icmp from any to any keep state
block out quick on fxp0 all

#----------------------------------------------------------------
# Allow in all TCP, UDP, and ICMP traffic & keep state
#----------------------------------------------------------------
pass in quick on fxp0 proto tcp from any to any keep state
pass in quick on fxp0 proto udp from any to any keep state
pass in quick on fxp0 proto icmp from any to any keep state
block in quick on fxp0 all


#################################################################
# Loopback Interface
#################################################################

#----------------------------------------------------------------
# Allow everything to/from your loopback interface so you
# can ping yourself (e.g. ping localhost)
#----------------------------------------------------------------
pass in quick on lo0 all
pass out quick on lo0 all

ipnat.rules will allow the inside interfaces to get information from internet by maping the inside interface to the outside interface tl0.
---------------------------------------------------------------------
# --------------------------------------------------------------------
# Do 'normal' IP address translation. This line will take all packets
# going out on your external NIC (tl0) that have a source address coming
# from your internal network (192.168.1.0), and translate it to whatever
# IP address your external NIC happens to have at that time
# --------------------------------------------------------------------
map tl0 192.168.1.0/24 -> 0/32

# --------------------------------------------------------------------
# If you have a system on your internal network that needs to be
# 'reachable' by external systems on the internet, you'll need a rule
# similar to the one below. This one takes all inbound http traffic
# (TCP port 80) that hits the firewall's external interface (ed0) and
# redirects it to port 80 on the 192.168.1.50 system on the internal network.
# Simply uncomment the rule, change the IP address and port number so that
# it does what you need. Remember that you have to enable the corresponding
# inbound filter in your /etc/ipf.rules file, too.
#
# --------------------------------------------------------------------
# rdr tl0 0.0.0.0/0 port 80 -> 192.168.1.50 port 80 tcp


Changes made to /etc/rc.conf:
----------------------------------
################## Basic Network Configuration File ##################

################## Inside Lan Network Configuration #############
ifconfig_fxp0="inet 192.168.1.1 netmask 255.255.255.0"
# defaultrouter="192.168.203.1"
# hostname="fxp0.inside-interface.com"
################## Inside Lan Network Configuration #############

# This makes sure that my inside interface fxp0 is recongnized as a
# network interface
# network_interfaces="fxp0 tl0 lo0"
ifconfig_tl0="DHCP"
hostname="arwuah.no-ip.com"
ntpdate_flags="clock.linuxshell.net"
ntpdate_enable="YES"
nfs_client_enable="YES"
nfs_reserved_port_only="YES"
sshd_enable="YES"
sshd_flags="-4"
ipfilter_enable="YES"
ipfilter_flags=""
ipmon_enable="YES"
ipmon_flags="-Dsvn"
ipnat_enable="YES"
icmp_drop_redirects="YES"
################## Basic System Configuration ##################
font8x8="/usr/share/syscons/fonts/iso07-8x8.fnt"
allscreens_flags="132x43"
keymap="us.pc-ctrl"
keyrate="fast"
kern_securelevel_enable="NO"
linux_enable="YES"
mousechar_start="3"
saver="fire"
scrnmap="NO"
usbd_enable="YES"
update_motd="NO"

moused_enable="NO"
moused_flags="-z 4 5"
moused_port="/dev/psm0"
moused_type="auto"

syslogd_flags="-ss"

##############################################################
### Mail Transfer Agent (MTA) options ######################
##############################################################
mta_start_script="/etc/rc.sendmail"
sendmail_enable="YES" # Run the sendmail inbound daemon (YES/NO/NONE).
sendmail_flags="-L sm-mta -bd -q30m" # Flags to sendmail (as a server)
sendmail_submit_enable="YES" # Start a localhost-only MTA for mail submission
sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost"
sendmail_outbound_enable="YES" # Dequeue stuck mail (YES/NO).
sendmail_outbound_flags="-L sm-queue -q30m" # Flags to sendmail (outbound only)
sendmail_msp_queue_enable="YES" # Dequeue stuck clientmqueue mail (YES/NO).
sendmail_msp_queue_flags="-L sm-msp-queue -Ac -q30m" # Flags for sendmail_msp_queue daemon.

# Enable named
named_enable="YES"


Changes made to /etc/sysctl.conf:
----------------------------------
# $FreeBSD: src/etc/sysctl.conf,v 1.1.2.3 2002/04/15 00:44:13 dougb Exp $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#
# Allow normal users to mount filesystems
vfs.usermount=1

# Disallow the viewing of other users processes
kern.ps_showallprocs=0

net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.link.ether.bridge=1
net.link.ether.bridge_cfg="`ifconfig -l`"

# For vmware
kern.ipc.shm_allow_removed=1

Ok, now I need to setup a dhcp server incase more computers get added to the internal network. This way is one plugs an ethernet plug to the hub they shoudl automatically get an ip-addy.

I went over to bsdvault.net and fould a short little article, "Setting up a DHCP Server on FreeBSD 4.2.".

All I did was head over to /usr/ports/net/isc-dhcp3-server and ran the following commands:

$> make && make install

The current version as of this writing is: 3.0.1.r12
After installing I copied /usr/local/etc/dhcp.conf.sample to /usr/local/etc/dhcpd.conf and changed it to my liking.

The following were also added to /etc/rc.conf:
-----------------------------------------------
dhcpd_enable="YES"
dhcpd_flags="" # command option(s)
dhcpd_conf="/usr/local/etc/dhcpd.conf" # configuration file
dhcpd_ifaces="fxp0"

To allow for dhcpd log messages to be send to a different file I added the following to /etc/syslog.conf:
-----------------------------------------------------------------------
local7.* /var/log/dhcpd_logs

My Slackware days

I was just on google and typed winful to see what it would come up with and low and behold I get a listing of posts I made when I was using slackware. This in 2001 when I made a post to alt.os.linux.slackware from my linux box asking how to clear and restore a terminal back to normal if it turned to garbage.

The response I received which works in bash/Bourne Again shell is to
echo -e '017', which clears everything. To distort the screen again echo -e '016'. The above commands are to "Switch Out" and "Switch In" in ASCII. I later figured that my terminal could also be cleared by simply typing "reset" at the terminal.

Lame Industries - Hybird 1 & 2, the rest maybe later

Ok. I am here at lameindustries. I read over the sites content and spoke with some folks on #lameindustries then decided to signup for an account.

After I signed up I passed level1/Hybrid1 with a breeze. It was a simple point and click cgi expolit.

Level 2 pass, xxx was in a secret folder. I would have found it faster but I did not have sound on my machine at the time of the level. Because of this I did not think to follow the path/music. Nonetheless, it was just as simple as level1/Hybrid1

Really "heated" right about now

I am feeling really heated right about now. I thought I could just shake the whole situation off and not deal about it, but the more I think about I feel unfairly treated.

I just received an email from one of the companies I interviewed with for an internship this past Tuesday, May 18th. It was not really the fact I did not get the intern but how I received a denial letter dated the day I had the interview. So what was the point for the interview if it was know before hand I was not to be considered given I qualified?

It could not be I did not qualify. This company came to my school for a career fair in which I watch other CS Majors just hand in their resumes and walked away. For my resume, the representative seemed more than interested in my resume and I quote, they said mine was one of the better resumes they look at whole at the fair. Mind you, this career fair was in late March. After waiting a few weeks and not hearing anything I phoned the lady who took my resume at the fair to follow up. It was said my resume was not yet forwarded and would be done as soon as possible. It was said they were still waiting to see if they were going to hire summer interns as it was not done for sometime now. Yet after a few more weeks, I thought of making another follow up call but did not want to seem like a pest so I did not call. Here is where thinks get interesting now that I think about it.

Came mid/late April someone from the CS department lands a full-time position at this company and the funny thing about this is that the interview was conducted over the phone. But see, this person knew someone at the company. How fascinating? From this I figured the company was not going to call me back. I mean I spoke with the two representatives for nearly 30mins while at the career fair. They were interested in my resume so apparently they were interested in me right? So, why even bother and be a pest?

Early May, while looking for other companies and luckily finding one to intern with I get a call from this company. This time from someone different, who said my resume was forwarded, but not from whom it was forwarded from. After hearing this message on my cell inbox, I must admit I was very excited. This was just before my Digital final; I remember it as clear as day. I ran to the lab to use the phone, but no one answered so I left a message. Low and behold I was contacted within the next three business days. We setup an interview for the 18th of May and I started preparing for possible interview questions in my head. After my final I jotted down some questions and pondered the rest while doing more research on the company by visiting their website.

As always, I arrive at my interviews early. For every interview I had this summer, two to count, I arrived an hour early and this interview was no different. I was an hour early before my interview and just waited around before my time. The people seemed really nice and it was interesting to note how my first interviewer was given a speech on open source and was impressed about the essay I wrote about the same topic when my freshman in school ended.

It just pisses me oof when I think about how I was being interviewed on the 18th and the damn denial notice was sent out on the 18th. This is the same day. To me it feels like they were not interested from the start or maybe they were, but when they saw me at the company I probably was not what they wanted. It could have been my attire, my mother never lets me leave the house a mess and neither would my girlfriend. She saw me before I left. Even my professors can attest to me wearing a suit or shirt & tie to classes on several occasions. I dressed for this occasion.

I highly doubt that it was a qualification issue. Besides, this was for an internship and not the purpose of a full-time position, at least not yet. My academics cover the position I was brought in for, Programmer Analyst. And, my interest and personal projects cover most of what I would have done as an intern.

I could keep going down the list. One more thing that tops it off is this: The denial letter says "If a suitable opening does occur in the near future, you will receive every possible consideration."

Let's think about this one. I would be a fool to believe the above is true. For one and one reason only, if a suitable opening does occur in the future and I was not selected for this internship opportunity which allows for (free labor + a change to get familiar with staff and the company or even runny errands), why would I even be highly considered in the future? What stopped them from highly considering me now? Fascinating…

After all this I sent this company (those involved with the interview) a thank you letter for their time and consideration a day after the interview and even after receiving the denial letter I sent a thank you to the source of the denial letter.

Everyone I told this to said "not me!”. So tell me, who said "it does not pay to be nice?"

``Making the world'' your own

This is a good site to read for system documentation. Since it is getting late I'll leave the URL to read up on at a later time. http://home.san.rr.com/freebsd/upgrade.html#TOC-548

Friday, May 21, 2004

"war-gamin"

Just registered my nick on irc.pulltheplug.com when I was on #vortex and I also registered the same nick while on eureka.rootxero.org (lameindustries)

Custom Kernel (SIDEKICK)

My Custom Kernel

machine i386
cpu I686_CPU
ident SIDEKICK
maxusers 0

options VFS_AIO

#
options IPFILTER

#
options IPFILTER_LOG

#
options IPFILTER_DEFAULT_BLOCK

options MATH_EMULATE #Support for x87 emulation
options INET #InterNETworking
options INET6 #IPv6 communications protocols
options FFS #Berkeley Fast Filesystem
options FFS_ROOT #FFS usable as root device [keep this!]
options SOFTUPDATES #Enable FFS soft updates support
options UFS_DIRHASH #Improve performance on big directories
options MFS #Memory Filesystem
options MD_ROOT #MD is a potential root device
options NFS #Network Filesystem
options NFS_ROOT #NFS usable as root device, NFS required
options MSDOSFS #MSDOS Filesystem
options NTFS #NTFS Filesystem
options NWFS #NetWare Filesystem
options NCP #NetWare Core Protocol
options CD9660 #ISO 9660 Filesystem
options CD9660_ROOT #CD-ROM usable as root, CD9660 required
options PROCFS #Process filesystem
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI
options UCONSOLE #Allow users to grab the console
options USERCONFIG #boot -c editor
options VISUAL_USERCONFIG #visual boot -c editor
options KTRACE #ktrace(1) support
options SYSVSHM #SYSV-style shared memory
options SYSVMSG #SYSV-style message queues
options SYSVSEM #SYSV-style semaphores
options P1003_1B #Posix P1003_1B real-time extensions
options _KPOSIX_PRIORITY_SCHEDULING
options ICMP_BANDLIM # Rate limit bad replies
options KBD_INSTALL_CDEV # Install a CDEV entry in /dev
options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~128k to driver.
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.
options USER_LDT # Allow user-level control of i386 ldt
options SC_DISABLE_REBOOT # Disable reboot key sequence

options MAXDSIZ="(256*1024*1024)"
options MAXSSIZ="(256*1024*1024)"
options DFLDSIZ="(256*1024*1024)"

# To make an SMP kernel, the next two are needed
options SMP # Symmetric MultiProcessor Kernel
options APIC_IO # Symmetric (APIC) I/O

# To support HyperThreading, HTT is needed in addition to SMP and APIC_IO
# options HTT # HyperThreading Technology

device isa
device eisa
device pci

# Floppy drives
device fdc0 at isa? port IO_FD1 irq 6 drq 2
device fd0 at fdc0 drive 0
device fd1 at fdc0 drive 1
#
# If you have a Toshiba Libretto with its Y-E Data PCMCIA floppy,
# don't use the above line for fdc0 but the following one:
#device fdc0

# ATA and ATAPI devices
device ata0 at isa? port IO_WD1 irq 14
device ata1 at isa? port IO_WD2 irq 15
device ata
device atadisk # ATA disk drives
device atapicd # ATAPI CDROM drives
device atapifd # ATAPI floppy drives
device atapist # ATAPI tape drives
options ATA_STATIC_ID #Static device numbering

# SCSI Controllers
device ahc # AHA2940 and onboard AIC7xxx devices
device ahd # AHA39320/29320 and onboard AIC79xx devices
options SYM_SETUP_LP_PROBE_MAP=0x40
# Allow ncr to attach legacy NCR devices when
# both sym and ncr are configured

device adv0 at isa?
device adw
device bt0 at isa?
device aha0 at isa?
device aic0 at isa?

device ncv # NCR 53C500
device nsp # Workbit Ninja SCSI-3
device stg # TMC 18C30/18C50

# SCSI peripherals
device scbus # SCSI bus (required)
device da # Direct Access (disks)
device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct SCSI access)

# RAID controllers interfaced to the SCSI subsystem
device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID
device dpt # DPT Smartcache - See LINT for options!
device iir # Intel Integrated RAID
device mly # Mylex AcceleRAID/eXtremeRAID
device ciss # Compaq SmartRAID 5* series

# RAID controllers
device aac # Adaptec FSA RAID, Dell PERC2/PERC3
#device aacp # SCSI passthrough for aac (requires CAM)
device ida # Compaq Smart RAID
device amr # AMI MegaRAID
device mlx # Mylex DAC960 family
device twe # 3ware Escalade

# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc0 at isa? port IO_KBD
device atkbd0 at atkbdc? irq 1 flags 0x1
device psm0 at atkbdc? irq 12

device vga0 at isa?
options VESA

# splash screen/screen saver
pseudo-device splash

# Devices to use for snooping on shells
pseudo-device snp 7

# syscons is the default console driver, resembling an SCO console
device sc0 at isa? flags 0x100

# Enable this and PCVT_SIDEKICK for pcvt vt220 compatible console driver
#device vt0 at isa?
#options XSERVER # support for X server on a vt console
#options FAT_CURSOR # start with block cursor
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
#options PCVT_SCANSET=2 # IBM keyboards are non-std

device agp # support several AGP chipsets

# Floating point support - do not disable.
device npx0 at nexus? port IO_NPX irq 13

# Power management support (see LINT for more options)
device apm0 at nexus? disable flags 0x20 # Advanced Power Management

# Serial (COM) ports
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
device sio1 at isa? port IO_COM2 irq 3
device sio2 at isa? disable port IO_COM3 irq 5
device sio3 at isa? disable port IO_COM4 irq 9

# Parallel port
device ppc0 at isa? irq 7
device ppbus # Parallel port bus (required)
device lpt # Printer
device plip # TCP/IP over parallel
device ppi # Parallel port interface device
#device vpo # Requires scbus and da

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device dc # DEC/Intel 21143 and various workalikes
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
device tl # Texas Instruments ThunderLAN
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# ISA Ethernet NICs.
# 'device ed' requires 'device miibus'
device ed0 at isa? disable port 0x280 irq 10 iomem 0xd8000
device ex
device ep
device fe0 at isa? disable port 0x300
# Xircom Ethernet
device xe

# PRISM I IEEE 802.11b wireless NIC.
device awi

# WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
# exists only as a PCMCIA device, so there is no ISA attachment needed
# and resources will always be dynamically assigned by the pccard code.
device wi

# Aironet 4500/4800 802.11 wireless NICs. Note: the declaration below will
# work for PCMCIA and PCI cards, as well as ISA cards set to ISA PnP
# mode (the factory default). If you set the switches on your ISA
# card for a manually chosen I/O address and IRQ, you must specify
# those parameters here.
device an

# The probe order of these is presently determined by i386/isa/isa_compat.c.
device ie0 at isa? disable port 0x300 irq 10 iomem 0xd0000
#device le0 at isa? disable port 0x300 irq 5 iomem 0xd0000
device lnc0 at isa? disable port 0x280 irq 10 drq 0
device cs0 at isa? disable port 0x300
device sn0 at isa? disable port 0x300 irq 10

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device loop # Network loopback
pseudo-device ether # Ethernet support
pseudo-device sl 1 # Kernel SLIP
pseudo-device ppp 1 # Kernel PPP
pseudo-device tun # Packet tunnel.
pseudo-device pty # Pseudo-ttys (telnet etc)
pseudo-device md # Memory "disks"
pseudo-device gif # IPv6 and IPv4 tunneling
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device bpf #Berkeley packet filter

# USB support
device uhci # UHCI PCI->USB interface
device ohci # OHCI PCI->USB interface
device usb # USB Bus (required)
device ugen # Generic
device uhid # "Human Interface Devices"
device ukbd # Keyboard
device ulpt # Printer
device umass # Disks/Mass storage - Requires scbus and da
device ums # Mouse
device uscanner # Scanners
device urio # Diamond Rio MP3 Player

# FireWire support
device firewire # FireWire bus code
device sbp # SCSI over FireWire (Requires scbus and da)
device fwe # Ethernet over FireWire (non-standard!)

# Sound
device pcm

# For Creative Labs SoundBlaster
device sbc

device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x15

# DRM options:
# mgadrm: AGP Matrox G200, G400, G450, G550
# tdfxdrm: 3dfx Voodoo 3/4/5 and Banshee
# r128drm: ATI Rage 128
# radeondrm: ATI Radeon up to 9000/9100
# DRM_DEBUG: include debug printfs, very slow
#
# mga requires AGP in the kernel, and it is recommended
# for AGP r128 and radeon cards.
# device mgadrm
# device "r128drm"
# device tdfxdrm
# options DRM_DEBUG
device radeondrm

Pulltheplug.com

I was just on hackerslab.org and followed the link to pulltheplug.com. Pulltheplug.com like hackerslab.org also provides war-games for users to better learn computer security through hands on experience.

This is my first time at pulltheplug.com so I have to start from the beginnig. This seems a little more involved than hackerslab.org being that you have to figure out the login and pass to even continue. It is not given right off like hackerslab.org.

Thursday, May 20, 2004

Getting Started, it has been a while

It has been some time now since I created this blog and yet I have not written anything.

I take it that my FreeBSD system is not going to last too long so I need to start moving faster and document my system setup, just in case my Harddrives "kick the bucket." I have made many modifications to the system since I installed FreeBSD 4.9-Release a week after it came out. I know pretty soon I may be upgrading to the 5.0-Release once it becomes stable, but for now lets get to documentating and backing up important system configuration files.

System Information
I have a custom build machine that houses the following components inside of a Antec PLUS1080AMG Metallic Gray SOHO file server.

RAM: Real Memory = 536870912 (524288K bytes), aka 512MB.

Hard Drives:

  • ad0: 57241MB [116301/16/63] at ata0-master UDMA33

  • ad1: 114473MB [232581/16/63] at ata0-slave UDMA33

  • ad6: 76319MB [155061/16/63] at ata3-master UDMA100



I/O Media:

  • acd0: DVD-ROM

  • acd1: CD-RW

  • sbc1: Sound Card

  • fdc0: Floppy



System Tuning

  • Partitioning


  • I have one hard drive that I dedicate espicially to FreeBSD, and here is the modified output from fstab and mount:

























































Device Mountpoint Size
/dev/ad6s1b none
/dev/ad6s1h none
/dev/ad6s1a / 500 Megabytes
/dev/ad6s1d /home 4.0 Gigabytes
/dev/ad6s1f /tmp 200 Megabytes
/dev/ad6s1g /usr 33 Gigabytes
/dev/ad6s1e /var 400 Megabytes
/dev/ad6s2e /storage 34 Gigabytes

Blog Archive