Hi,
I want to make linux gateway to authenticate every connection passing
through it... I have an Windows 2003 domain, so user account are
managed by Active Directory. I'm to make a basic authentication using
IPTABLES + CRONTAB + PHP....
it will work like that: I make a new IPTABLES chain like "FullAccess",
and put any machine with FullAccess there, an make a chain
"AuthUsers"... when a new machine without full access try to use
gateway, it checks for source IP at AuthUsers, and if it was not found,
redirects any connection and any ports to a PHP page... even if access
is not an HTTP, users have first to authenticate before any access...
at PHP page, user enter login/password an then a run a script something
like " iptables -I AuthUsers -s 192.168.0.77 -j ACCEPT ", where IP
Address can be retrieved by PHP.... at same transaction, adds a Crontab
registry to remove that authentication after 2 hours, executing
something like "iptables -D AuthUsers -s 192.168.0.77 -j ACCEPT"...
it is very simple, I guess, and if I can do this at a first moment, a
wish to make an Active Directory integration, and maybe make some AD
groups, and add some specific IPTables rules based on that groups, like
FTP Access, Bank sites Access, Messenger Access, etc...
I have this idea, but don't know what the best way to do that securely
and stable...
|