howdy slackers:
Although my question doesn't pertain specifically to the installation or evaluation of slackware, my home network has multiple servers which all run slackware, and I have a problem for which I wish for a slackware-specific solution, so I post here instead of a broader LQ forum.
In a nutshell, I need help with a cgi script. The details: I live in the mountains, and am fortunate to have DSL in a region where cellular phones do not work. My neighbor is currently hosting an event that brings about 800-1200 folks camping out on his land, all withing wifi range of my home. They asked me to share my DSL via wifi with general public.
I want to take it a step further, and provide a welcome page, with map of area, local land use regulations, etc., as well as some other terms and conditions that they must consent to to use my wifi (standard legal disclaimer, etc.)...
To accomplish this, my network is arranged thus:
Code:
(DSL-ROUTER)
|
bridge
/
public switch priv.switch
/ \ |
static dhcp-server
addresses: \
www \
asterisk wifi bridge 1
mysql \
bind \
wifi bridge 2
this could be all wrong... I'm just a hobbiest...
But... I created an html page on the apache web server, www, that is listening on a LOCAL address on the private switch. This page informs the guests of the rules, and then offers up simple html form button to click on if they agree to terms.
My plan is to use IPTABLES on the dhcp-server to route all oubound port 80 traffic that is not on a list contained in a file somewhere to the local welcome page.
I need help with the choice of a solution for a cgi script to process the html form when they click "agree" on the local welcome page. This script should get their ip address or MAC address, and add it to the list contained in the file somewhere. Thus once they're on the list, they will no longer get the welcome page, but will have NAT...
what is a quick and dirty way with tools that are in a default full install of slackware (perl, php, lisp, javascript, whatever) to create a cgi script to get the ip address or mac address to add to the file for ip tables...
or am I completely off base and there be some more efficient way of doing this, or software that already does it that I can just install...
thanks in advance for any input