I need bsd authpf like tool for Linux. The user should authenticate himself through ssh or some web application and iptables rules specified for the user will be executed after authentication in my plan.
Can you suggest me some pointers to start.
Regards,
You could code something like this yourself. The /etc/sudoers file would be a great resource, but I think fundamentally what you are looking for is: http://www.nufw.org/
It adds user based authentication to IPtables rules. So only after a user has authenticated will they be able to get past your firewall.
You can also use the .bashrc or .bash_profile files in the home folder of the user.
Every time a user logs in, bash (if in use) will read those files (don't know the order).
You can place your iptables rules there. Every user has it's own.