Tuesday, September 21, 2004
Get Java Plugin to work with FreeBSD with this link
URL: http://archive.pilgerer.org/mharc/html/freebsd-stable/2004-07/msg00280.html
Monday, September 20, 2004
VIM takes forever to start!
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...
root@:/usr/ports> portupgrade -ar
[Updating the pkgdb
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! :)
Instead I created oodwithbaliga.blogspot.com and invited my two partners, Dave and Steven. :)
Wednesday, September 15, 2004
Two Editors added for OOD
Tuesday, September 14, 2004
Sunday, September 05, 2004
List the 10 largest files in a directory
du /partition_or_directory_name | sort -rn | head
-- Dru
Saturday, September 04, 2004
Free Virus Protection for Windows
http://www.grisoft.com/us/us_index.php
http://www.avast.com/
Tuesday, August 24, 2004
Desktop Printing w/ FreeBSD
The article URL: http://www.ofb.biz/modules.php?name=News&file=article&sid=321
Encrypt GAIM Conversations
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
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
Protect the USB PenDrive at all Cost!
This article from BSDNews.org talks just about that.
Monday, August 23, 2004
Convert to Hex in VIM
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)
Thursday, August 12, 2004
1and1 Linux Hosting Setup
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 ....
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
- 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
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
Blog Archive
-
►
2005
(19)
- ► 12/04 - 12/11 (2)
- ► 11/13 - 11/20 (1)
- ► 11/06 - 11/13 (2)
- ► 07/17 - 07/24 (1)
- ► 05/22 - 05/29 (1)
- ► 04/17 - 04/24 (4)
- ► 04/03 - 04/10 (1)
- ► 03/27 - 04/03 (3)
- ► 03/20 - 03/27 (1)
- ► 03/06 - 03/13 (1)
- ► 02/27 - 03/06 (1)
- ► 02/06 - 02/13 (1)
-
►
2004
(47)
- ► 11/28 - 12/05 (1)
- ► 10/31 - 11/07 (1)
- ► 10/17 - 10/24 (2)
- ► 09/19 - 09/26 (4)
- ► 09/12 - 09/19 (2)
- ► 09/05 - 09/12 (1)
- ► 08/29 - 09/05 (1)
- ► 08/22 - 08/29 (6)
- ► 08/15 - 08/22 (1)
- ► 08/08 - 08/15 (3)
- ► 08/01 - 08/08 (6)
- ► 07/25 - 08/01 (7)
- ► 05/23 - 05/30 (3)
- ► 05/16 - 05/23 (9)