Łukasz Antoniak's Homepage

Menu

About me

My Certificates:

My Projects:

My HowTo's:

Other pages:

Page was visited by

guests

Apache module

mod_auth_MAC

     This module gives you an opportunity to authorize by MAC address. It is possible to use currectly only in LAN connections (because of routing). I suggest using it, for example with Webmin directory, where security is very important.

Download

Requirements:

1. Apache 1.3 or higher.
2. mod_perl.
3. DBI.
4. Database (tested on MySQL).
5. Net::ARP

Installation:

1. Download and install module:

perl Makefile.PL
make
make install

2. Edit /etc/httpd.conf.

< Directory "/www/secret" >

Authtype Basic
AuthName MySecret

PerlAccessHandler Apache::auth_MAC
PerlSetVar Base DBI:mysql:maclist
PerlSetVar User myuser
PerlSetVar Password mypass

< /Directory >

Base -> specify the database.
User -> user that can login to database (permission to read).
Password -> DataUser's password.

3. Create database, table and user account (MySQL):

CREATE DATABASE maclist;

CREATE TABLE maclist (
mac CHAR(17) NOT NULL,
PRIMARY KEY (mac)
) TYPE=MyISAM;

GRANT SELECT ON maclist.maclist TO myuser@localhost IDENTIFIED BY 'mypass';

4. Put MAC addresses, that should be allowed, into database:

INSERT INTO maclist.maclist(mac) VALUES('XX:XX:XX:XX:XX:XX');

Copyright by Lukasz Antoniak (L.Antoniak@stud.elka.pw.edu.pl). All rights reserved.