FreeBSD: Difference between revisions
| Line 49: | Line 49: | ||
files or displays them in the terminal, and so it is useful to sniff files | files or displays them in the terminal, and so it is useful to sniff files | ||
that are transmitted via ftp or http. | that are transmitted via ftp or http. | ||
For example, to intercept and view a POP3 login via the rl1 interface, use the following command: | |||
tcpick -i rl1 -p -bU -T1 "port 110" | |||
=== ports-mgmt/portaudit === | === ports-mgmt/portaudit === | ||
Revision as of 17:51, 7 March 2008
Servers
Inferno
Maintenance
2005-05-14 Hard Drive Upgrade
Installed Maxtor DiamondMax Plus 9 (6Y120L0) and reinstalled OS. Based on the date this was likely FreeBSD 5.3.
2007-07-12 6.2-RELEASE-p5
Added serial console for easier management. Performed source upgrade from 6.1 to 6.2-RELEASE-p5. Not sure when the upgrade was done from 5.3 to 6.1 or how many increments were in between. Such details are lost to history.
2008-01-09 Heat Sink and Fan Replacement
Replaced Heat Sink and Fan (Evercool Socket A). Previous fun died. Inferno didn't like this much.
2008-02-18 Hard Drive Upgrade
Previous hard drive Maxtor DiamondMax Plus 9 (6Y120L0) serial: Y35AK8PE was quickly failing. Added Promise SATA300 TX4 4-port SATA II PCI controller card and Seagate Barracuda 7200.11 SATA 3Gb/s NCQ 750GB 32MB Cache (ST3750330AS)
During the upgrade, updated the system from FreeBSD 6.2 to FreeBSD 7.0 RC2.
2008-02-26 Upgrade to FreeBSD 7.0-RELEASE
Upgraded from FreeBSD 7.0-RC2 to 7.0-RELEASE. First successful cross-release upgrade using the new freebsd-update utility. Nice!
Essential Ports
ftp/wget
- Retrieve files from the Net via HTTP and FTP
misc/gnuls
I miss the colorized output of ls seen on most Linux systems... Installing the gnuls port and adding the following to /etc/csh.cshrc will add this missing convenience to FreeBSD:
alias ls gnuls --color=auto -h
net-mgmt/net-snmp
- An extendable SNMP implementation
net/tcpick
tcpick is a textmode sniffer libpcap-based that can track, reassemble and reorder tcp streams. Tcpick is able to save the captured flows in different files or displays them in the terminal, and so it is useful to sniff files that are transmitted via ftp or http.
For example, to intercept and view a POP3 login via the rl1 interface, use the following command:
tcpick -i rl1 -p -bU -T1 "port 110"
ports-mgmt/portaudit
- Checks installed ports against a list of security vulnerabilities
ports-mgmt/portupgrade
- FreeBSD ports/packages administration and management tool s
security/sudo
- Allow others to run commands as root
sysutils/screen
- A multi-screen window manager
sysutils/smartmontools
Adds S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) disk monitoring tools. This suite of tools is extremely handy to allow the administrator to be aware of disk problems before they result in a catastrophe.
See the following links for more information:
- smartmontools Home Page
- Monitoring Hard Disks with SMART (Linux Journal)
Example commands:
- smartctl -l selftest /dev/ad0
- smartctl -t long /dev/ad0
- smartctl -Hc /dev/ad0
Technical Notes
Disk image via dd
dd bs=512 if=/dev/rXX# of=/some_dir/foo.dmg conv=noerror,sync
tar over netcat
- nc -v -v -w 40 -l -p 8888 > foo.tar
- tar cjvf * | nc remotehost 8888
Updating root DNS
dig @a.root-servers.net . ns > /etc/namedb/named.root
Portupgrade
Rebuild Package and all dependent packages
portupgrade -rfx openssl openssl
Disable Vulnerability Checking
DISABLE_VULNERABILITIES=yes
Qmail log Timestamps
Can be converted to human readable using the tai64nlocal command.
Name Services
Retrieving Database Entries
As of FreeBSD 7 the getent utility can be used to retrieve entries from the various administrative databases.
Name Service Caching Daemon
The nscd daemon added in FreeBSD 7 improves performance of nsswitch type lookups (users, groups, etc) but can cause some surprising results with new users not being found in the system. The cache can be cleared for all users by running:
%nscd -I cachename
Using IDE CD Burners
Place the following in /boot/loader.conf for IDE CDRW support:
atapicam_load="YES" hw.ata.atapi_dma=1
Using Memory Disks
FreeBSD >= 5.x have a memory disk utility that can be utilized to mount file system images.
To setup a memory disk
mdconfig -a -t vnode -o readonly -f /path/to/image.iso -u 1 mount -t cd9660 /dev/md1 /mnt/cdrom
To reverse the process:
mount -u /mnt/cdrom mdconfig -d -u 1