It sounds like what you want is a shell script for the user to run after connecting to the server with PuTTY. ipfw_addip
to do this:
#! /bin/sh
echo "\$IPF 460 allow all from $1 to any 22 in" >> /etc/ipfw.rules
and ipfw_removeip
:
#! /bin/sh
grep -v "allow all from $1" /etc/ipfw.rules > /tmp/ipfw.$$
mv /tmp/ipfw.$$ /etc/ipfw.rules
Those are very simplistic examples, and in a production environment should make more sanity checks, but they may help you get started.