ip binding to ftp account

van helsing

Verified User
Joined
Aug 23, 2012
Messages
40
I want to implement security in my domain.
I have domain name domain.com , and I binded its directadmin panel domain.com:2222 with ip using the ip binding script provided in help desk link is as below

http://help.directadmin.com/item.php?id=349

If I want to bind ftp account in it with particular ips then is it possible ?
My scenario is
[email protected] will open from IP 1.1.1.1 only
[email protected] will open from IP 2.2.2.2 only

I tried various method available for limit binding in proftpd but not work . Suggestion Please
 
http://www.proftpd.org/docs/contrib/mod_ifsession.html#IfUser
Using the above link I tried this script for ftp accounts accessible by specefic ip's:

<IfUser = [email protected]>
<Limit LOGIN>
Allow from X.X.X.X
Deny from all
</Limit>
</IfUser>

<IfUser = [email protected]>
<Limit LOGIN>
Allow from Y.Y.Y.Y
Deny from all
</Limit>
</IfUser>

On restarting the proftpd service I encountered this error:
Fatal: unknown configuration directive '<IfUser>' on line 80 of '/etc/proftpd.conf'

Following the same link I installed mod_ifsession but same error after restarting service.What else need to be done?
 
Does the following command show that mod_ifsession is loaded.:

Code:
proftpd -vv
 
yup......after running that i got the the list of loaded module.
mod_ifsession/1.1
It is written at first position
 
Well the = sign is not needed it should just be <IfUser username> or <IfUser "username">

Did you put it at the bottom of the /etc/proftpd.conf file?

You might want to try starting proftpd in debug mode to see whats going on.

1. stop proftpd in directadmin services

2. start it with the following command so it stays in foreground

Code:
proftpd -d10 -n

Then look for any errors as to why it might not be working right.
 
yup...the script is written at the bottom of the proftpd.conf file.

After running command :
proftpd -d10 -n

No error found but still ftp service not working and displaying same error :
Fatal: unknown configuration directive '<IfUser>' on line 80 of '/etc/proftpd.conf'
 
hey...I rebuild the services in custombuild file.
My problem is solved.
Thanx for your support.
 
Back
Top