Find the answer to your Linux question:
Results 1 to 5 of 5
I have been providing ftp server for a closed(to outside) network, and someone is troubling me. I have found the IP adress of the client, and now I want to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Location
    Turkiye
    Posts
    9

    How to ban IP in vsftpd


    I have been providing ftp server for a closed(to outside) network, and someone is troubling me. I have found the IP adress of the client, and now I want to prevent it from reaching the server, but I don't know how. Can someone help?

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Someone on your internal, private network is giving you trouble? Make him sit in the corner for one hour.

    You can add a DROP rule for his IP to your iptables INPUT chain. Or you can deny him with the tcp_wrappers mechanism - /etc/hosts.deny.

    Both very effective.

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Location
    Turkiye
    Posts
    9
    I am new to linux, so can you tell me how to do these?

  4. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Depending on how you manage iptables/netfilter, the easier of the two is probably denying with tcp_wrappers.

    Step 1
    Run the command whereis -b vsftpd. Make a note of the first path it returns. In my case, that is /usr/sbin/vsftpd.

    Next, using that path, run the command ldd /usr/sbin/vsftpd | grep 'libwrap.so'. Did you see any results? If so, vsftpd has been compiled with tcp_wrappers support. If not, the rest of the steps won't do anything.

    Step 2
    Edit /etc/hosts.deny and add a line that looks like:
    Code:
    vsftpd : 10.0.0.1
    where "10.0.0.1" is the IP of the person you want to deny.

    That should take care of it. If the person you're trying to deny is sufficiently clever, though, there are probably going to be more steps to take.

  5. #5
    Just Joined!
    Join Date
    Dec 2006
    Location
    Turkiye
    Posts
    9
    Thank you, that seems to have solved the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •