Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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,

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.