cd /etc/ ; wget ;ipf -Fa -f /etc/ipf.rules

#ifconfig wi0 ssid 1000101
#ifconfig wi0 broadcast netmask
#route add default
#ifconfig wi0 up
#hostname# ./getip-wireless
#add net default: gateway

Notes for FreeBSD Unix.
started October 2003



stalled FreeBSD 4.8. These are my notes since then.
2. first, X didn’t work. Had to edit my /usr/X11R6/lib/x11/XF86Config file. See Added the Section “Screen” at the bottom to allow

fowr 24-bit color display. Was stuck at 256 colors.
3. used pkg_add -r lynx, snort, queso, xmms, gkrellm. they all worked! Sweet.
4. ifconfig xl0 for the first ethernet interface.
5. pkg_add -r wget also worked. Love that.
6. partition scheme:

$df -h on FreeBSD 7
Note the huge size of /usr in this version:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    193M    128M     50M    72%     /
devfs          1.0K    1.0K      0B   100%     /dev
/dev/ad0s3d     13G    746K     12G     0%     /home
/dev/ad0s1d     29M     38K     26M     0%      /tmp
/dev/ad0s1e    2.9G    2.9G   -234M   109%   /usr
/dev/ad0s2d    290M     21M    246M     8%    /va

Recommended Slice Sizes
/  =  300 megs.            1
/tmp = 30 megs             2
/usr = 6  gigs             2
/var = 300 megs             2
/home = the rest           4
swap = 512MB              3

FreeBSD 6 (I think)
$ df -h
Filesystem    Size   Used  Avail Capacity  Mounted on    Partition
/dev/ad0s1a   197M    35M   146M    19%    /         1
/dev/ad0s1h   5.3G    13M   4.9G     0%    /home        4
/dev/ad0s1e    29M   1.6M    26M     6%    /tmp          2
/dev/ad0s1f   2.9G   1.1G   1.6G    41%    /usr          2
/dev/ad0s1g   295M   9.3M   262M     3%    /var          2
/dev/ad0s1i   512M   9.3M   262M     3%    swap           3

7. The partition table was half the battle. Couldn’t decide on the best use of my drive.
8. sudo pkg_add -r pico, added this nice text editor. vi on bsd is a bit of a pill :/
9. sudo pkg_add -r irssi
– pkg_delete everybuddy.1.2.4 to remove a package.
10. pkg_add -r screen, minicom and whatever other binaries I wanted.
11. /etc/rc.conf: edit that plus /etc/inetd.conf file to turn off uneeded
– Example: sshd_enable=”NO”
– Do this in /etc/rc.conf to disable unneeded services.
12. ran visudo, added my user account to those who can sudo.
13. Security subsection:
– disabled sshd and sendmail in rc.conf
14. man kldload to load modules into the kernel. insmod for FreeBSD.
15. sockstat to view open/closed sockets.
16. /usr/ports: here is your set of ports to install:
– insert ports usage here:
17. ~.xinitrc= added “exec startkde” to have kde as my default windows manager. Could put gnome in there too maybe =)
18. pkg_info to see what packages are installed.
19. added bash to ~.profile to have bash load as my default shell.
20. cirrus logic 4281 model is the L400 sound card:
– snd_cs4281_load=”YES”           # cs4281 pci
– That’s the module for this soundcard =)
21. fstat |grep dsp – I was trying to use mpg123 but it errored saying can’t open /dev/dsp – found the process holding /dev/dsp and killed it
22.  337  sudo pccardd – That started the pc card daemon giving power to the pcmcia card slot for my wireless card – now, airsnort
23. netstat -rn to show routing table
24. sudo route add default added my default gateway which alter the routing table
25. pkg_add -r apache: copied Oreilly bookshelf cdrom to /home/apache/.
– recall: apachectl start|stop|restart|status|graceful|etc.
– Edited httpd.conf to point to /home/apache/index.htm.
26. httpd.conf: Significant entries;
– Listen: allows you to bind apache to a specific IP address. You can also add a virtual
IP Address to your NIC and have apache listen to that address on 80 or whatever port.
– DocumentRoot “/usr/local/www/data” Changed to /home/apache
– Make your changes and restart apache (apachectl restart)
– User www, left that default. Advisable not to use nobody account. Nobody becomes
somebody if you use it enough.
27. /usr/local/etc/apache/httpd.conf is the default loc for the conf file.
28. Ok, this is important. Apache was failing to start. Couldn’t gethostbyname. /etc/hosts didn’t have an adddress for the local apache server. added a

mapping “” which apparently mapped correctly. Apache works but now have an issue wtih permissions.
29. httpd.conf didn’t have a pointer to default document. Fixed permission problem mentioned above by doing a # chmod a+x apache/ . Looks like must be able

to execute webpage. makes sense.
30. /usr/local/etc has some interesting .conf files for programs i use
31. replaced instances of index.html for index.htm. I seem to recall there being a defaultDocument variable that i couldn’t find this time :/
32. kill artsd to play xmms
33. <link rel=SHORTCUT ICON href=/images/favicon.ico> to add a n incon to your shortcuts in a browser
34. Here’s how I get my Enterasys card running on bsd. (At least before I add some startup options to do it automatically.)
– System starts, I start the pccardd pcmcia card daemon with sudo pccardd
– Ifconfig an IP address and add a route with “route add default”
– Ifconfig shows that the card is associated because the base station has this MAC address is trusted.
35. Start services in /etc/defaults/rc.conf.
36. /etc/defaults/rc.local, add an entry to start the pccard daemon
37. /etc/defaults/rc.conf is for reading only. edit your /etc/rc.conf for your real system changes
38. man ata to read about disk controller driver. like hdparm on linux
39. /fset format_public [$0] %b<%n$1%b>%n $3- in BitchX.sav to timestampt. That’s a classic.
40. snort -dev -i wi0 |grep PASS
41. wow! There’s a utility called “dict”. It is a command-line dictionary. Usage: $ dict apropos and it returns what it knows or closest matches.
42. /var/db/dhclient.leases to see some dhclient leases
dmesg |tee dmesg – That would dump dmesg to the screen and to the dmesg file
43. maybe use the bios to set disk timeout variables. Otherwise, check man apm.
44. Ok, here’s how ntpd works. First I installed ntpd with pkg_add -r ntp. Installed properly. Went to google, did a search on ntp servers and
found There are others. That one is in die Schweitz.
– Usage: $ntpdate and it states “adjust time server offset 0.011171 sec” or whatever your local clock is off by.
45. Copy your timezone info to /etc. cp /usr/share/zoneinfo/America/New_York /etc/localtime (note the new name.)
– Used the “date” command, view how it says “EDT” instead of GMT.
– Restarted X and it re-read the local time and was correct. Now to cron it to set the time hourly.
46. Added a cron job to run hourly in /etc/crontab
# Added an hourly time update. Greg.
0       *       *       *       *       root    /home/clams/tools/set-time
47. <zi> clams: you do crontab -e <username> to edit a users crontab
48. /var/cron/tabs to view crontab history. Shows things like user viewed crontab, user listed, user edited etc.
49. cron usage
-l to list conrents of an installed crontab
-r to remove all crontab entries. Sweet
-u user for whom to show crontab entries.
50. $ sudo crontab -l -u root to view roots crontab w/o being root.
51. Basically; crontab: as root, issue a crontab -r to remove all crontab entries. Edit /etc/crontab to your needs, then crontab /etc/crontab to
import your added crontab entries. Looks like /etc/crontab is only used as the template. Edit it, then import it into your cron list.
52. sudo su to su to root whilst not being in the sudoers group.
53. ncftp3 for FreeBSD works just like ncftp. Sweet unix goodness 🙂
54. unrar: to unrar .rar files. Sweet
55. apachectl startssl
56. XF86Config creates a default XF86Config. Edit that until it works.
57. crontab -u root -e
58. rm -rf directory/
59. /usr/X11R6/lib/X11/XF86Config is the location of the config file in fbsd.
61. system configuration things like ifocnfig entries to be persistent should go in /etc/rc.conf like this:
62. for good mac osx software
63. gdm/xdm == gui logon for X
64. best to remove moused_enable=YES in /etc/rc.conf and put it in the XF86Config under Section InputDevice
– device for the mouse will be /dev/psm0 I think.
– I did that and these bad mouse error messages to the stdout/term/console went away but the mouse worked in kde
65. X -config is a tool for configuring X
66. /stand/sysinstall for install process, useful for post-install configuration. the gui setup thing.
67. xf86config is that fugly utility to configure X. Be sure you select the right monitor, video card else kde looks ugly.
68. added DefaultDepth 23 to my XF86Config to fix the ugly grainy X desktop in kde.
– see
69. ls -FAG, simple dir list.
70.0ngrep -O dump ‘string to watch for’ or ngrep -O dump ‘whatever’ tcp dst port 8080
71. ~/.BitchX/BitchX.sav isn’t created until you enter /save in BitchX whilst logged on
72. Install apache:
Download $ lynx
Extract $ gzip -d httpd-2_0_NN.tar.gz
$ tar xvf httpd-2_0_NN.tar
Configure $ ./configure –prefix=PREFIX
Compile $ make
Install $ make install
Customize $ vi PREFIX/conf/httpd.conf
Test $ PREFIX/bin/apachectl start
73. /usr/local/etc/apache/httpd.conf for apache config file
74. wheel:*:0:root,clams in the /etc/group to be able to su
75. make install clean from /usr/ports/network/whatever to install a port. It’s nice.
76. irc servers:

77. de-dict [german word] for the german version of dict
78.  alias l=’ls -alt’  to make a nice alias for ls -alt
79. alias and unalias to remove aliases. Also, enter ‘alias’ to see a list of your current aliases
80. make deinstall to remove installed applications whilst in the folder. (/usr/ports/directory/)
81. ncftp2 is a nice windowed automatic ftp program
82. /usr/X11R6/lib/X11 is the direcoty for XF96Config
83. /usr/local/etc/sudoers is the sudoers file and edit it with visudo
84. /etc/rc.conf to setup persistent IP addresses on freebsd
85. /usr/X11R6/bin/gnome-session to start gnome on boot from ~/.xinitrc
86. sudo tar -xvf konstruct-stable.tar
87. env to see your current environmental variables: interesting
88. usb drive: sudo mount -t msdos /dev/da0s1 /mnt/usb
89. /dev/da0s1 on /mnt/usb (msdosfs, local)
90. /usr/ports/x11-wm/kde/ is where new kde 3.3 is
91. time stamp BX stuff /fset format_public [$0] %b<%n$1%b>%n $3-
/fset format_version Hi, this is my version reply =-)
92. camcontrol to control hdparms
93 .man atacontrol for a disk controller on fbsd
94. put arpwatch into /usr/local/etc/rc.d to have it start auto
95 .man vidcontrol to see how to control the size of fonts in runlevel 3 /
console tty.
96. ditch system beeps in X with ‘xset b off’
97. Wow! I know this is simple but just cd to /usr/ports/whatever and do a
98. make install to get the package there installed. It appears to go to the ftp site to get the latest. Wonderful.
99. bgput or bgget to put or get things from an ftp site. Automate for even more fun.
100. psybnc to bounce and encrypt irc traffic.
101. ps -waux |grep whatever to see a process on FreeBSD. Linux is different
102. -a my.remote.ip/32: for /etc/syslogd to configure to where to send incoming logs
103. <sokan> clams, /etc/rc.conf settings override /etc/default/rc.conf
104. Meeded to enable remote logging with syslog. Added these to /etc/rc.conf to configure syslog then did a restart like /etc/rc.d/syslogd restart. parses
the /etc/rc.conf file.
– One note, I had to rem out the second .1.1 entry to get it to work. I think they need to be on the same line.
# syslogd_flags=”-a*”

105. sudo /etc/rc.d/syslogd restart to restart syslogd and reparse the /etc/rc.conf file
106. /usr/local/apache2/ is the apache dir
107. /usr/local/apache2/htdocs is the apache content directory
108. portupgrade is the util to upgrade ports in your tree. automate.
109. look into /etc/ssh/sshd_conf and ssh_conf config files
110. for tutorials on eggdrop
111. /etc/ssh/sshd_config is the config file for ssh
112. pkg_add package.tgz to add packages through tgz files. sweet
113. ee is a neat little editor for text.
114. unix file system allows running processes to have ‘shadow’ copy of a file that gets changed out at whatever point you restart the service the new binary is used
– courtesy shbrngdo on #freebsdhelp
ctrl+U to erase an entire line at a bash prompt rather than one char at a time. nice
/stats -p or /stats -p [servername] to see attached server ops
115. you can change the 404 page wtih a .htaccess
116. mail -u [user] to view someone elses mail
117. consider /etc/crontab for entries causing problems
118. krss for steaming news to kde application
119. /etc/ipfrestart to restart your firewall after making changes to rc.firewall
120. ipmon to watch traffic. logs ip connect.
ipmon_enable=”YES”                # Start IP monitor log
ipmon_flags=”-Ds”                 # D = start as daemon
121. /sbin/ipmon -D /var/log/firewall.log to restart ipmon to log to different log.
122. /etc/rc.d/ipfilter restart
123.  use the command ‘time’ to time commands
124. You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
125. You can use “vidcontrol -i mode | grep T” for a list of supported text modes.
126. Changed sendmail_enable=NO to YES, ran /etc/rc.d/sendmail restart and did an nmap
-sT localhost and now 25 and 587 are open accepting mail conenctins 🙂
– is a nice access to put in /etc/mail/ to block spammers. Generated daily.
127. lo0 is used for local daemons which do not need to listen on internet IP addresses.
128. lo0 services local processes without exposing them to network-based attacks
129. ipfstat to view ipf statistics like ins, outs, blockeds. good stuff
130. load sound card modules in /boot/loader.conf.
131.  /usr/local/etc/snort.conf for the snort config file
132. r-click in the konsole windows to unhide the menu bar after you hide it
133. make restart-mta whilst in /etc/mail/ to have it reparse whatever changes you make to that directory. Like when adding a user alias to virtusertable
where goes to clams.
134. Snort stuff:
/usr/local/share/snort/ contains the rules directory for snort
pico /usr/local/etc/snort.conf snort config plus other config files
snort -dev -l /var/log/snort/001dec04/ -h -c /usr/local/etc/snort.conf

135. Useful nmap switches:
-sA: ACK Scan. Used to map out firewall rulesets to determine stateful-ness of a fw
or whether the target is a simple stateless packet filter that blocks incoming SYN packets
like ipchains on linux or XP weak-ass incoming-firewall.
-b: ftp bounc attack using a ‘feature’ of ftp.
# nmap -b ftp
-sT: TCP connect scan. If listening, target port is supposed to respond.
-sF: FIN scan. Works nicely when nothing responds.
-sI: Idlescan. bounces TCP scans off a remote host so you don’t appear in logs.
-sN: NULL scan
-sS: SYN Scan or half-open scan. Doesn’t log cause the connection isn’t established.
-sW: window scan. like ACK scan, detects open ports and filter/unfiltered due to an
anomaly in the TCP windows size reported by some OSes. (LIke AIX. BeOS, OpenBSD etc)
-sF -sX -sN:
-sP: Ping scan. Who’s up, who’s down.
-sV: Version detection.
-sU: UDP Scan. detects which udp ports are open.
-sO: IP protocol scan. Sends ip headers with empty transport protocol field data.
-sR: RPC Scan. takes all TCP/UDP ports found and floods them with null commands in an
attempt to determine whether they are RPC ports, if so what program an dversion number they
are serving. THus you can effectively get the same info as ‘rcpinfo -p’ even if the target’s
port mapper is behind a firewall.
-sL: List scan, generates a list of ip address or hostnames without actually pinging
or port scanning them. DNS name resolution will be used unless you us -n
-p0: don’t not try to ping hosts at all before scan. Allows scanning of networks that
don’t allow ICMP echo requests or responses.

136. Other nmap options:
nmap -sF -p 23 to scan for open telnet ports or ‘-p 135’ for Win32 RCP ports.
nmap -sT -p U:53,111,135,T:22-25,80,110 to scan for specific port with types
~ -D decoy1,decoy1,decoy makes remote logs ‘see’ different source ip addresses.
-S set the source IP address.
-e xl0 specify the interface to use
-source_port [number] set source port.
-n never do reverse lookup. speeds things up
-R always to reverse DNS lookups.
-r don’t randomize order in which ports are scanned.
-ttl [value] sets the default ipv4 defalt ttl
-randomize_hosts shuffleees each group of up to 2048 hosts before it scans them.
-H [number] max number of sockets.
-T {paranoid | sneaky | polite | normal | aggressive | insane} to set the interval at
which targets are scanned. sneaky scans are slow and likely not picked up by ids sensors.
– Other options, see man nmap.
136.5 man hier to see how bsd filesystems are laid out
137. According to Darious on #freebsdhelp kldload snd_driver.ko attempts to ID your sound card.
Then check /dev/snd/stat to see which card it found.
Darius_> clams: kldload snd_driver.ko will load the driver
<Darius_> clams: cat /dev/sndstat to see if it found anything
<clams> pcm0: <Creative EMU10K1> at io 0xd000 irq 18 kld snd_emu10k1 (4p/2r/0v channels duplex
<Darius_> clams: so put snd_emu10k1_load=”YES” in /boot/loader.conf
[08:00am] <Darius_> it will lioad the right driver only instead of everything next boor
dd if=/dev/random of=/dev/null for CPU load testing
138. If you are sshed into a box and in bx, you can /detach from bitchX to leave the session/tty running in the #
– to re-attach type scr-bx

139. set -o emacs or set -o vi to enable command-line editing
140. – play location in xmms
141. is an open-source web content management system. Looks nice

142. <Wonko> ipf -Fa -f /etc/ipf.rules to reparse your now-edited ipf.rules file.

143. /home/clams/.mozilla/default/3zqkvfjo.slt/lock was locked and I couldn’t start mozilla
without losing my profile. renamed lock to lockBU and it worked after power off.
144. virtusertable is the file in /etc/mail we use to configure email aliases like
goes to clams. Nice to setup email aliases for temporary use.
145. whois -h to view whois info about taht ip address. sweet
146. Fighting spamm:
[08:44am] <leeb>  ipfw add deny tcp from to telnet
[08:45am] <leeb> ipfw add deny ip from to
147. Secure an apache/htdocs folder, requiring a password:
– create a users file in /usr/local/apache2/ or whatever the apache dir is.
– add an .htaccess file to the directory you want to secure:
AuthName “a moose once bit my sister”
AuthUserFile /usr/local/apache2/users
AuthType Basic
require valid-user
– The above points to the users file which has the passwords.
– generate passwords with ./htpasswd -c /apachedir/private/.htpasswd greg
#enter password for user greg (Enter password)
– A password is generated in hash form in the users dir as above.
– htpasswd -c /usr/local/etc/httpd/users martin creates a user ‘martin’

148. “export PS1=”[$HOSTNAME:\$PWD]”
149. snort -c /usr/local/etc/snort.conf
150. perl -p -i -e ‘s/’ index.htm to replace with in a file
151. ./configure –enable-so –prefix=/usr/local/apache2 to configure apache with shared objects (each modules can be added after apache is compiled)
151. in a browser to observe server stats. Requires editing the httpd.conf – change ServerInfo and ServerStatus to

152. snorAlog wasn’t working. GD Imaging package was installed but dependencies were not.
– installed GD with CPAN module using
# perl -MCPAN -eshell ‘install GD::Graph’
– Built the GD library with all depencies (Which were downloaded on the fly the CPAN module.)

153. edit /etc/crontab directly, it will be parsed automatically for changes. no needs to
crontab -r

154. Snort misc:
– pico /usr/local/etc/snort.conf – snort config file
– /usr/local/share/snort/local.rules for rules directory

155. /usr/local/etc/ for some nice config files for FreeBSD
156. iftop -interface to view network statistics and other coo info
157. locate httpd.conf to find the file or other item on the system
158. Keep your system updated wtih  cvsup/buildworld/buildkernel/installkernel/reboot to
single user/mergemaster/installworld/reboot.
– Check /usr/src/UPDATING for these
159. find / -type f \( -perm -2000 -o -perm -4000 \) -print | to find setuig and setgid files
on your system
– Currently 65 setuid/segid files. (30MAY05)
160. ServerSignature Off in httpd.conf to hide apache version when people call up a
non-existant document. Usually it says “Apache version 2.0.54 or whatever. TMI.
161. IP Filter programs:
– ipf used to manipulate the filter, like this:
– ipf -Fa -f /etc/ipf.rules
– ipfstat: shows ipf statistics, blocked, dropped packets.
– ipftest: reads in an ipf rule set for testing
– ipmon reads buffered data from logging devices. (/dev/ipl)
– ipsend: generates arbitary IP packets.
– ipresend: reads in a data file of saved IP packets.
– iptest: set of test “Programs” which send out IP packets aimed at testing the
strength of the TCP/IP Stack. (May crash the targeted machine.)
– ipnat: reads in a rule set from either Stdin or a file and adds them to the
kernel’s current list of active NAT rules.
– See /etc/ipfrestart – restarts ipf and ipnat. (Caution.)
162. sed -i.bak s/e/o/g foo
– replaces every e with o and makes a backup.
– sed -i s/e/o/g foo
– doesn’t make a backup
163. vi /usr/share/examples/cvsup/stable-supfile to read about updating 5.3 to 5.4 for example
164. Use sed(1) to edit a file in place?  Well, to replace every ‘e’
with an ‘o’, in a file named ‘foo’, you can do:
# sed -i.bak s/e/o/g foo
And you’ll get a backup of the original in a file named ‘foo.bak’, but if
youwant no backup:
# sed -i ” s/e/o/g foo
165 egrep -v ’10\.5\.1\.10′ /var/log/apache/access_log
– greps log for all except
166. tail -f /var/log/apache/access_log |egrep -v ’10\.5\.1\.10′
– egreps for all but my own IP!
167. lynx –dump to dump all links to a file
– Take it further: lynx –dump |grep \@ to get all email addresses from that page.
– Run it through sed/awk to strip the junk  23.

168. control access to an apache directory
– There are also websites with htpassword generators.
– Create the folder in the htdocs directory.
– in that folder create a file called .htaccess
– AuthName “a moose once bit my sister”  (You can put whatever you want here.)
– AuthUserFile /usr/local/apache2/users (Can be any file in apache2)
– AuthType Basic
– require valid-user
– To generate the password enter this:
–  htpasswd -c /usr/local/apache2/users [username]
– Don’t forget this will overwrite the existing users file so #cat users>/tmp/clip
– Run that then cat /tmp/clip >>users to append the new account creds to the users file

169. Snort: Start with custom conf file:
#snort -c /usr/local/etc/snort.conf
– Sigs are stored in /usr/local/share/snort/
– Included in snort.conf at the end as:
include /usr/local/share/snort/rulname.rules
170. Use ifconfig to associate a card with a basestation not broadcasting an SSID.:
#ifconfig wi0 ssid 1000101
#ifconfig wi0 broadcast netmask
#route add default
#ifconfig wi0 up
#hostname# ./getip-wireless
#add net default: gateway
– Stick that in a rwx file to execute.

171. man wicontrol to see various wireless control options likw #wicontrol -L to list available nets.
172. man tuning
173. Need to quickly empty a file? Use “: > filename”.
174. man mount_ntfs
# mount_mtfs -o ro /dev/<device> /mountpoint
175. mplayer mplayer-plugin
176. grep 160\.136 /var/log/apache/access_log | egrep -v 160\\.136\\.111\\.148 | egrep -v 160\\.136\\.111\\.250 >/usr/local/apache2/htdocs/to-160.txt
– search for 160.136 but ignore 111.148 and 111.250. Dump to file in web server.
177. sockstat
178. Look in: /usr/share/examples/ – nice system exampls of config files
179. screen is cool. you can split screen into two halves and switch between the two.
– read the man page but bassically it’s ^a then S then some other cmd to move  between the halves.
– start screen
– create split screen with ctrl+a then capital S
– Do this several times and you will have several separate screen windows.
– Hit ctrl+a then P to active the other screens with shell.
– Hit ctrl+a then tab to move between screens. Sweet.

180. /dev/acd0 – the first cdrom
181. send the contents of stuff to an emial recipient
– echo /etc/resolv.conf |mail greg at madlinux,com
182.  echo “/parse” | sendmail -bt apachectl configtest
– something
183. remove html tags from an html page.
– awk -f dehtml.awk dianedevorecnn.html > diane-notml.txt
– ask google about dehtml.awk but I have a copy in ~/tools
184. Tar, create a file.
– tar -cvzf file.tar.gz inputfile1 inputfile2
– example #tar -cvzf file.tar.gz fie|dir|*.jpg
185. Consider roundcube for webmail. Nice web mail
186. Changing default route:
– route flush
– route add default
– had to first flush the old route, then add new one.

New FreeBSD Install January 26, 2007. FreeBSD 7RC1
Had some issues:
– pkg_add -r kde
– X wouldn’t start b/c xorg was not installed. pkg_add -r xorg.
– Added startkde into ~/.xinitrc and ran startx, loaded KDE nicely.
187. fakeident, to spoof ident:
– /usr/local/etc/rc.d/
– Edit config file to your needs.
188. ipf didn’t work. had to modify /etc/rc.conf with this:
ipfilter_enable=”YES”             # Start ipf firewall
ipfilter_rules=”/etc/ipf.rules”   # loads rules definition text file
ipmon_enable=”YES”                # Start IP monitor log
ipmon_flags=”-Dsv”                 # D = start as daemon
# s = log to syslog
# v = log tcp window, ack, seq
# n = map IP & port to names
189. perl -p -i -e ‘s/DD0000/00FFFF/g’ *.html
190. pkg_version -v compares locally installed ports with what’s available
191. /usr/local/etc/ – config files for stuff
192. add users to the wheel line in /etc/group to allow them to su to root
193. – a nice cmdline irc/icq/gaim type client
194. BitchX – /orignick yournick – get your nick back bx
195. /etc/syslog.conf to manage to where log files are sent
196. run id in a shell to see info about the user
197. see /usr/ports/sysutil/fastest-cvsup for the fastest cvs mirror closest to you
198. run fastest-cvsup with switches to determine fastest cvsup mirror

FreeBSD 7 Install notes: 26 January 2007
199. Installed FreeBSD 7RC1 from CD. Learned on #freebsdhelp that it’s
better to install via FTP. Boot from the CD next time and do an FTP
200. After install I couldn’t start X to run KDE. It just crashed.
201. MamaTried advised that I do a pkg_info |grep for xorg, which wasn’t
installed. Did a pkg_add -r xorg which installed X.
202. Ran xtartx from a shell and kde started. Was nice.
203. sound card problem? (Thanks easymac on #freebsdhelp)
– kldload snd_driver
– put the sound driver in /boot/loader.conf
– if it doesn’t return anythying look in your dmesg
– /dev/sndstat reveals info about your sound card.
204. cvsup for ports updating
– run fastest-cvsup with switches to determine fastest cvsup mirror
– Results for cvsup -r -c us
– 1st:   45.28 ms
– 2st:   46.65 ms
– 3st:   53.25 ms
205. unrar to unzip rar files. Found in /usr/ports/archivers/unrar
206. /etc/rc.d/sshd onerestart to restart sshd
207. /etc/rc.d/sshd reload also works for reloading sshd.
208. having a weird password for root can cause Eterm not to let you su/sudo to root
209. add port 443 to /etc/ssh/ssh_config and restart sshd. Port is now on 443
210. for a public DNS servers. Thanks fluxion on #linuxhelp on efnet
210. Testing DNS, and (Level3)
211. Enable ipfilter:
ipfilter_enable=”YES”             # Start ipf firewall
ipfilter_rules=”/etc/ipf.rules”   # loads rules definition text file
ipmon_enable=”YES”                # Start IP monitor log
ipmon_flags=”-Ds”                 # D = start as daemon
# s = log to syslog
# v = log tcp window, ack, seq
# n = map IP & port to names
212. IRC Servers:
213. Configure X for FreeBSD. It’s a pain.
# cd /usr/ports/x11/xorg
# make install clean
or    # pkg_add -r xorg
– Once installed, you’ll have to gather some info about your hardware like:
– Monitor specifications like refresh rate
– Video Adapter chipset and memory
– More info here:

214. Install Enlightenment Window Manager.
– #cd /usr/ports/x11-wm/enlightenment-devel && make install clean
215. wget
216. wget; copy ipf.rules /etc/ipf.rules
217. echo “ntpdate″ >set-time;chmod 700 set-time
218. vlc also for FreeBSD
219. dmesg
220. pciconf -lv (ListVerbose pci devices)
– Results for my wireless card which was absent:
none1@pci0:2:3:0:       card=0x12f5103c chip=0x42208086 rev=0x05 hdr=0x00
vendor     = ‘Intel Corporation’
device     = ‘driverIntel PRO/Wireless 2200BG (MPCI3B)’
class      = network

221. Auto accept defaults for make install operations
– make BATCH=yes install clean
222. fix a BSD MBR:
– fdisk -B -b /boot/boot0 /dev/ad0s1a
– ad0s1a or whatever your boot drve partition is.

222. FreeBSD 9.1 – Working with the Dell C400 Wireless card:
– Determine wireless card: #pciconfig -lv dumps that info
– It’s an Intel Pro Wireless 2200BG
– Added if_ath_load=”YES” to /boot/loader.conf
– alt+F1 or F2 or F3 to select a terminal to use. Console messages go to F1 for some dumb reason which interrupts typing and editing
– in /etc/syslog.conf uncommented /var/log/console.log (so it doesn’t go to the fkn term. derp)
– Installed /usr/ports/security/nmap and dsniff (lol) Those are fun but mischievous
Stop in /usr/ports/security/dsniff Install error code 1.
portsnap fetch update. This command downloads the latest version of the Ports Collection and updates the local version under /usr/ports.