Entries in FreeBSD (3)

Wednesday
22Jul2009

pfSense: Captive Portal

Disclosure: I am not connected with pfSense/BSD Perimeter LLC in any business manner, I am just a user. I created this feature focus for my own reasons but decided to publish it anyway.

Introduction

For the uninitiated pfSense is a standalone firewall/router the is based on FreeBSD which is designed for use on standard PC hardware. It uses the OpenBSD Packet Filter (hence the pf) for the firewall as well as advanced features such as hardware redundancy via CARP, VPN and Load balancing. However I will be talking about an interesting feature called the captive portal on pfSense 1.x and I will also be having a quick look into pfSense 2.0 which is yet to be released.

A captive portal normally sits between the client hosts on the network and the Internet. It normally requires a login from the user before permitting access. This is useful if you wish to allow/deny some people getting online with your wireless at your house party, stop visitors accessing the internet at the office or simply for displaying an acceptable use policy.

Captive portals will normally permit access to a IP/MAC address pair that has been authenticated by the device. As anyone that knows about networking will tell you both MAC and IP address can be easily spoofed by an attacker on a LAN to an already authenticated pair permitting the attackers traffic through the Portal. This weakness is something to keep in mind when thinking of using a captive portal.

Click to read more ...

Wednesday
08Apr2009

Introduction to FreeBSD for Newbies

This makes no attempt to replace the most excellent FreeBSD Handbook and simply provides a quick overview of how things work with FreeBSD for new people.

FreeBSD Installation

Here are some of the important points to bare in mind when installing FreeBSD.

FreeBSD can run on both 32 bit and 64 bit processors. If you are unsure what version to use, the 32 bit version can run on both 64 bit and 32 bit processors however the 64 bit version can only run on 64 bit processors. I would recommend people to read more about the x86 and x86-64 architectures if they are unsure. Other processors architectures like PowerPC and Sparc64 are supported by FreeBSD but most people are not likely come across these without knowing what they are.

Hardware requirements are expected to be at least in this general area, FreeBSD can be run on lower spec hardware but roles are limited.

  • Any modern processor (Pentium or better)
  • 64+ MB of RAM
  • 500+ MB of Disk space

Click to read more ...

Sunday
08Mar2009

FreeBSD: System Disk Mirroring (Raid1)

I wanted to set up a Raid 1 Mirror of the boot disk on my newly installed FreeBSD system. For some reason I thought this would be hard but in reality it was only a few commands and an edit of the fstab file at the end of the system installation.

All these commands are used as ROOT and could destroy EVERYTHING.

The Following command gives the OS access to the disk.

# sysctl kern.geom.debugflags=17

Then we create the mirror array with the following command.

# gmirror label -vb round-robin gm0 /dev/ad0

We then add a line to the loader so that the mirror kernel module is loaded at boot time.

# echo 'geom_mirror_load="YES"' >> /boot/loader.conf

We have to find each /dev/ad0 entry in the fstab and change it to the mirror device. The original entries would look something like this /dev/ad0s1b. We need to take out each 'ad0' entry and replace it with '/mirror/gm0' as shown below.

/dev/mirror/gm0s1b

We then have to reboot the system to make sure the system will boot from the array.

# reboot

Then finally we add the second disk to the raid array, this will copy the contents of the first disk to the second and keep them synched.

# gmirror insert gm0 /dev/ad2

For more information the FreeBSD Handbook page on RAID1 Mirroring.