Tuesday, October 12, 2010

EuroBSDCon Report

I love attending BSD conferences, but I haven't been to any lately.  The best I get to do is read the reports that others write when they get back.  Peter Hansteen, who happens to be the author of "The Book of PF" wrote a blog article on his adventures to EuroBSDCon.  I'm a long time user of PF in both OpenBSD and FreeBSD.

It sounds like there is a lot of good stuff going on in BSD.  I particularly liked the reports about Poul-Henning Kamp and Dru Lavigne, two people I admire for their dedication and "can do" attitude.

I was really intrigued by the pkg_add -u additions by Marc Espie on OpenBSD. I can see that being very useful in some of my projects.    Publish Post

bsdtalk200 - The mg text editor with Kjell Wooding



Also Available via Phone: +1 (210) 957-5481

Kjell Wooding is the maintainer of the mg text editor.  Its a lightweight emacs text editor.  Normally you use emacs in small environments.  This solves that problem.  The mg editor is in the public domain and is now in the base system of OpenBSD.

Emacs is a lisp interpreter that just happens to have a text editor attached to it.  The mg editor is just an editor and won't have any extra bloat in it.  There really aren't any extras, its just a text editor.

The mg editor is written in C and its very tiny in terms of source code.  There have been lots of people who have ported it to many places.  Its been around a long time, maybe since 1986.

Kjell began running a computer security company and just happened to live in the same town as Theo DeRaadt.  It didn't take long to get involved in OpenBSD and is still an OpenBSD developer and is involved with the OpenBSD Foundation.

The latest source code for mg is really only available in OpenBSD.  There are a lot of todo's in the source code, but most of it is just maintenance.

As an April fools joke, he compiled in a vi mode, which to everyones surprise compiled and worked for many things.

Theo mode spits out quotes from Theo and is the only code not in the public domain.

All the modes in the code are documented now and the documentation is probably bigger than the source code.

Monday, October 11, 2010

FreeBSD Install Recipe

Awang Apandy has just posted a quick and dirty install guide for FreeBSD. It helps you navigate through the different install screens.

There isn't much explanation to how things work, just a guide to help you pick what worked for him. All in all, a nice guided approach to installation.

Examples are often as much help as an explanation and if pictures are worth a thousand words, he has a lot of them.

My favorite thing about FreeBSD is that you get to learn what is really going on.  If you are looking to install FreeBSD to try it out, now would be a good time.

Sunday, October 10, 2010

Lourival Vieira Neto, Lunatik for NetBSD

Lourival Vieira Neto has just completed his Google Summer of Code project -- NetBSD kernel scripting with Lua.    He describes this as "port of the Lua interpreter to the kernel" which means that NetBSD now has a scripting language embedded directly in the kernel.

Lunatik allows regular scripts to run and execute directly in the kernel.  It even includes an interactive command line.

He seemed to have quite a bit of fun with naming.  From the documentation: "This instance is called Lunatik State."

I'm not entirely sure what I'd do with an interactive command line into the kernel, but it sure sounds fun.

Saturday, October 9, 2010

Setting up PFSense for redundant failover

Network Security Monitoring

I just finished watching this security video. I got a lot of good ideas for increasing security on my network. Its probably a year old, but still very relevant.

Thursday, October 7, 2010

PF Sense Book.

Michael Lucas wrote an interesting review of the PF Sense book.  I use PFSense for my corporate firewall and really like it.  I have it installed on two servers and set it up to fail over using CARP.  The best part is that it works.  I've been using FreeBSD for years and all of my servers are FreeBSD, so I feel comfortable using PFSense because it runs FreeBSD underneath.

Wednesday, October 6, 2010

Command Line Too Long

I spent the weekend writing scripts to handle various situations where a very long command line was necessary. Usually it was handling one command that had to be repeated for each file in a directory.

For example, pkg_add on FreeBSD doesn't handle more than 200 packages at a time on the command line. So I spent the first part of the evening writing little scripts like:

# sh
 for pkg in *
 do
 pkg_add $pkg
 done

Those scripts work, but later I found a utility designed just for this particular difficulty: xargs. 

According to the man page:

The xargs utility reads space, tab, newline and end-of-file delimited arguments
from the standard input and executes the specified utility with them as
arguments.

Basically it means you pipe a list of "arguments" to xargs. Xargs sucks up the list and then feeds them back one (or more) at a time to the specified program until they are all gone. For my application, this worked like a charm. My already small script was reduced to:

ls | xargs  -n1 pkg_add

Tuesday, October 5, 2010

bsdtalk199 - PC-Sysinstall with John Hixson



Also Available via Phone: +1 (210) 957-5481

John Hixson has been hacking on the PC Sysinstall from PC-BSD to make it work on FreeBSD.  He has also been working on a curses based front end to it for both PC-BSD and FreeBSD.  The new changes for this front end work will allow any front end to work with the PC Sysinstall backend.  He is also working on implementing PC Sysinstall into FreeNAS.

FreeBSD Sysinstall works as an admin tool, but PC Sysinstall isn't quite ready to be used as a sysadmin tool to reconfigure a system.  However, support for that is in the plans.  There are also plans for creating scripted install support for installing on an identical setup on multiple machines and netbooting.

PC Sysinstall handles many more disk setups during install than the traditional FreeBSD sysinstall.  It also supports installs over FTP.

ISO image installers are not available yet, but should be soon.

You can currently install FreeBSD using the graphical installer from PC Sysinstall.

FreeBSD's sysinstall is pretty dated and ugly.  There has been a lot of features added to FreeBSD that aren't supported by sysinstall.  So this new installer is long over due for FreeBSD.

Monday, September 27, 2010

Dynamic Routing with Opensips

Opensips is a Sip Express Router software. It lets you route phone calls to different media servers. The solutions discussed in this tutorial uses a MySQL database to route phone calls based on rules loaded in a DB table.

Opensips is the example here, but Kamalio, another Sip Express Router software solution can be substituted with only a very few modifications.

The most important features of this solutions are:
1) Easily modified routes.
2) Fail over in case a route goes down.

This solution doesn't cover load balancing. This guide also assumes that you have Opensips and MySQL already installed and working.
Setting up either is outside the scope of this article. Its best to add dynamic routing to your setup after you have tested that the routes work, otherwise you may be fighting unresolved NAT or other issues and not know it.

Sunday, September 19, 2010

Ramon Tancinco - meetBSD 2010 Welcome Intro