Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just installed VSFTPD, which I always liked for its ease of use, but I can't find something... Can anyone give me instructions on how I can specify which IP addresses are allowed to connect?

Basically what I want as a result is this:

  • You can only login with the user robin, with the correct password.
  • You can read, but not write anything.
  • Only 192.168.1.7 is allowed to connect.
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Edit your /etc/vsftpd.conf so it looks like this:

For allowing local users to log in:

local_enable=YES

For limiting the users logging in:

userlist_enable=YES

For only allowing users in userlist, instead of denying:

userlist_deny=NO

Defining the userlist file:

userlist_file= /etc/vsftpd.user_list

Add the 'robin' username to the /etc/vsftpd.user_list file.

Add the IP address 192.168.1.7 to your /etc/hosts.allow file so it looks like:

vsftpd: 192.168.1.7

Restart vsftpd and you should be good to go.

share|improve this answer
    
Thanks, I'll try that out tomorrow :) –  RobinJ May 5 '12 at 22:20
1  
Sorry, I forgot to mark your answer as accepted >.< I've done so now. –  RobinJ May 23 '12 at 13:27
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.