HylaFAX faxaddmodem Funny

This is kinda funny as I was reading along while adding a modem…

Now we are going to probe the tty port to figure out the type
of modem that is attached.  This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).

Was just a bit comical for me, I s’pose.

Postfix, MailScanner, SpamAssassin, ClamAV and Baruwa — Oh My!

I spent a better part of Thursday doing a fresh install of Debian GNU/Linux along with MailScanner, SpamAssassin, ClamAV and Baruwa web interface for MailScanner.  I also have MailWatch 1.0.5 setup and installed side-by-side with Baruwa.
Below is the web interface to MailScanner (http://www.baruwa.org/) which allows for adding Users and Domains.

Postfix version 2.7.1-1+squeeze1
MailScanner version 4.83.5
Baruwa version 1.1.0
ClamAV 0.97.1/13296/Thu Jul  7 22:28:42 2011
SpamAssassin version 3.3.1
I used quite a bit of information from http://www.spamtips.org/ to help with configuration/update/architecture of the antispam server.

Something I learned about FreeNAS Today

I discovered today during an installation of FreeNAS 8.0 (http://www.freenas.org/) on a VMware ESX virtual machine that FreeNAS 8 does not include pv drivers for ParaVirtual disks.  So if you happen to get stuck at the following screen during install (when you try to choose option 1) it is because no disks were detected.

FreeNAS 8.0 Console Setup Screen – Unable to proceed when choosing Option 1

Also note that the install script for this is in /etc/install.sh – I had to read through it a bit to see exactly what/why this was doing nothing when I tried choosing option 1.  It was confirmed in #freenas on irc.freenode.org also.

Valkyrie's Wireless Point-to-Point Bridge

Photos courtesy Rick Nash

  • NL-2511MP Plus 802.11b miniPCI
  • Soekris 4511-30
  • Cutting Board (for mounting in NEMA)
  • NEMA Box (with cut holes for adapters)
  • Connector
  • NEMA + Soekris 4511-30

Background

Currently, I’m setting this up on a Soekris 4511-30 board, with a 128MB CF flash card. The system is using HostAP drivers for the prism2 NL-2511 MP Plus 802.11b miniPCI card.

Objective

There are two phases I’m going to go through: Manual creation, and Automatic creation.

  1. Create a local bridge (br0) on each AP of wlan0 and eth0.
  2. Successfully bridge each AP together using WDS (Wireless Distribution System)

Network1: eth0 <-> wlan0 = br0 <—–> br0 = wlan0 <-> eth0

Network2: eth0 on each AP is connected to a network, in turn, they get bridged together once both APs have been bridged

PHASE 1: MANUAL

Step 1: Local Bridge Creation# brctl addbr br0

brctl addif br0 eth0
brctl addif br0
brctl addif wlan0

I have now created a bridge (br0) device and added eth0 interface to it along with (wlan0) interface. Now, I’m ready to move on.

To create the AP to AP bridge, I’ll need both MAC address of the radio cards, and then I can issue a command that will tell wlan0 to only allow the other AP’s wlan0 interface access via it’s MAC address.

iwpriv wlan0 wds_add 00:02:6F:37:FB:DA
brctl addif br0 wlan0wds0

I have now added the MAC address of the other AP radio card to it’s list of APs. Being this is a point-to-point AP bridge, I’ll only add one. I’ve also added the newly created wlan0wds0 interface to my bridge (br0). Now, I can tell it I only want one WDS point.

iwpriv wlan0 max_wds 1

(NOTE: I have done this on both APs at this point)

Now, I need to assign the interfaces IPs.

ifconfig eth0 0.0.0.0
ifconfig wlan0 0.0.0.0
ifconfig wlan0wds0 0.0.0.0
ifconfig br0 10.0.0.100 netmask 255.255.255.0 broadcast 0 up
route add default gw 10.0.0.1

I have only assigned the bridge interface (br0) an IP of 10.0.0.100. On the second AP, I have assigned br0 an IP of 10.0.0.200. Also, the up portion of the last command there tells the interface to come “up”, e.g., start-up now.

At this point, I am able to now ping 10.0.0.200 from 10.0.0.100, e.g., AP1 to AP2!

PHASE 2: AUTOMATIC

Phew, that was fun. Now, I don’t want to have to do that everytime the AP is turned off then back on! So, what I am going to do is add a start-up script. I have done it this way, via /etc/rcS.d/, instead of /etc/network/interfaces because I had some issues MYSELF. You DON’T have to do it this way if you know what you’re doing — but I don’t. I created a file called S99network.

!/bin/sh
echo "MAC FILTERING: 00:02:6F:37:FB:DF"
iwpriv wlan0 wds_add 00:02:6F:37:FB:DF
echo "Creating bridge…"
brctl addbr br0
echo "Adding eth0 to bridge"
brctl addif br0 eth0
echo "Adding wlan0 to bridge"
brctl addif br0 wlan0
echo "Adding wlan0wds0 to bridge"
brctl addif br0 wlan0wds0
echo "Configuring eth0 IP: 0.0.0.0"
ifconfig eth0 0.0.0.0
echo "Configuring wlan0 IP: 0.0.0.0"
ifconfig wlan0 0.0.0.0
echo "Configuring wlan0wds0 IP: 0.0.0.0"
ifconfig wlan0wds0 0.0.0.0
echo "Bringing bridge UP"
ifconfig br0 12.156.71.228
netmask 255.255.255.192 broadcast 12.156.71.255 up
ifdown eth0
ifdown wlan0
ifup eth0
ifup wlan0
ifup br0
sleep 20

I now have a script that will automatically configure my interfaces for me so I don’t have to manually do it.

The last step for me is to edit my /etc/resolv.conf to reflect my nameservers, and that’s it!

Tue Apr 8 22:35:48 EDT 2008

Pebble Wireless Installation Readme

  Title:  General Wireless Inter/Networking Readme
 Author:  Richard J. Kreider
Contact:  https://techish.net/contact
   Date:  July 11, 2005
   $REV:  1.0.0
##############################################################################
----------------------------------INDEX---------------------------------------
A] Pebble Installation (v41) HOWTO
B] Post-Installation Set-up (Valkyrie Specific)
		------------------------------------------
############### Section A: PEBBLE INSTALLATION (v41) HOWTO ###################
		------------------------------------------
A1] Format CF card
A2] Create filesystem on CF card
A3] Create needed directories
A4] Untar pebble distribution
A5] Run pebble install script
	------------------
	A1] FORMAT CF CARD
	------------------
You'll need to fdisk the compact flash card accordingly:
	# fdisk /dev/hde
NOTE:  If you can't figure out which device the card was mounted to,
	please check by executing:
	# dmesg
	At the bottom, you should see what it was mounted as.  Usually,
	it's mounted as /dev/hde, but could be a number of points such as
	/dev/hdg, /dev/hdh and so on.  It's even possible to see it mounted
	as /dev/sda, /dev/sdb and so on.
Once inside the fdisk program, you'll be presented with options.  You'll need
to delete any existing partitions.  Press "d" to delete partition.  Next, you
will need to create a PRIMARY partition.  Type "n" (new), and select primary
by pressing "p".  Use the defaults by just pressing enter when asked for start
point, and end points.  Once you have done that, you can either print out the
tables by pressing "p".  That will just show you what you're about to write to
that device.  After you do that, you can press "w" to write/sync the CF card.
Once that has completed, you have successfully fdisk'd your CF card.  Continue
on to the next step.
	--------------------------------
	A2] CREATE FILESYSTEM ON CF CARD
	--------------------------------
Now that you have fdisk'd the card, you'll need to create a filesystem on it.
The recommend is EXT2, and that is what I use on my 128mb CF card.  If you
have a larger card, such as a 256mb, or 512mb, you can use ext3 -- but it's
not necessary.
To create the filesystem:
	# mkfs.ext2 /dev/hde1
NOTE:  Remember, replace "/dev/hde1" with YOUR device name.  I'm just using
	"/dev/hde1" for continuity.
	-----------------------------
	A3] CREATE NEEDED DIRECTORIES
	-----------------------------
You'll need to create 2 directories now.  One directory will be the mount
point for your CF card, and the other is where we'll unpack and install the
Pebble Linux distribution from.
	# mkdir /mnt/cf
	# mkdir /mnt/pebble
"/mnt/cf" is where your CF card will be mounted.
"/mnt/pebble" is where you'll be unpacking your Pebble distribution in prep.
for the installation to your CF card.
	-----------------------------
	A4] UNTAR PEBBLE DISTRIBUTION
	-----------------------------
The last step before installation can begin, is to unpack your Pebble Linux
distribution you downloaded.
	# cd /mnt/pebble
	# tar --numeric-operator -jxvf pebble.v41.tar.bz2
NOTE:  pebble.v41.tar.bz2 can be replaced with the version you have, such
	as pebble.v39.tar.bz2.
	If it's not a .bz2 format, but possibly .gz or .tgz, take out the "j" and
	replace it with a "z":
	# tar --numeric-operator -zxvf pebble.v41.tar.gz
	----------------------------------
	A5] RUN PEBBLE INSTALLATION SCRIPT
	----------------------------------
Now all that's left is the easy part; running the install script.  Make sure
you're in "/mnt/pebble" directory.  You can check this by:
	# pwd
It should echo back "/mnt/pebble".  If not, simply change to the "/mnt/pebble"
directory.
	# cd /mnt/pebble
Next, you'll simply run the install script.
	# ./pebble.update
Follow the on-screen instructions.
If all goes well, you'll have a fresh install of Pebble Linux on your CF card
ready to go!
		----------------------------------------------
############### Section B: Pebble Configuration (POST-INSTALL) ###############
		----------------------------------------------
1] /etc/fstab
2] /etc/inittab
3] /etc/network/interfaces
4] /etc/rcS.d/S99local
5] /etc/motd
6] /etc/modules
	B0] IMPORTANT! IMPORTANT! IMPORTANT!
	------------------------------------
	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	!!Before ANY changes, you need to run this command:!!
	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	# remountrw
NOTE: That remounts the filesystem to have read/write access, so that anything
	we make changes to is saved!
UPDATE: I will be making a finalized POST-INSTALL script that will be run
	AFTER installing a FRESH copy of Pebble Linux to a CF card.
	--------------
	B1] /etc/fstab
	--------------
Change the tmpfs entry's "size=" to your CF card size.
tmpfs           /rw     tmpfs   defaults,size=128M       0       0
	----------------
	B2] /etc/inittab
	----------------
Comment out the last line that has nocat in it.
	---------------------------
	B3] /etc/network/interfaces
	---------------------------
This will be the interfaces file:
# # # START COPY # # #
# /etc/network/interfaces
#
# Richard J. Kreider
# _ADMIN_EMAIL_LINK_
# lo
auto lo
iface lo inet loopback
# eth0
auto eth0
iface eth0 inet static
	address 10.0.0.10
	netmask 255.255.255.0
	broadcast 10.255.255.255
	gateway 10.0.0.1
# eth1
auto eth1
iface eth1 inet static
	address 10.0.0.11
	netmask 255.255.255.0
	broadcast 10.255.255.255
	gateway 10.0.0.1
# wlan0
iface wlan0 inet static
	address 10.0.0.12
	netmask 255.255.255.0
	broadcast 10.255.255.255
	gateway 10.0.0.1
# # # STOP COPY # # #
	-----------------------
	B4] /etc/rcS.d/S99local
	-----------------------
Create a file in /etc/rcS.d/ called S99local using nano or vi:
	# nano /etc/rcS.d/S99local
Enter the following:
	#!/bin/sh
	ifup --force -v wlan0
Save it, then run:
	# chmod 777 /etc/rcS.d/S99local
	-------------
	B5] /etc/motd
	-------------
Change /etc/motd to something neat-o.
	----------------
	B6] /etc/modules
	----------------
Uncomment "hostap_pci" module if it's commented out.
	-------------
	X] FINAL STEP
	-------------
	# remountro
	# shutdown -r now
You'll be remounting your filesystem to read-only, and rebooting the machine.
If all goes well, you should come up and everything should be configured
accordingly!
Enjoy.
==============================================================================
MISC	MISC	MISC	MISC	MISC	MISC	MISC	MISC	MISC	MISC
==============================================================================
Bring wlan0 down on boot-up
Assign ap mode
assign channel
assign txpower
make sure eth0 is up and eth1 is up (TESTING ONLY) but eth1 down eth0 up for
distribution

Tue Apr  8 22:35:48 EDT 2008