Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Ubuntu Help > How to ban IP in vsftpd

Forgot Password?
 Ubuntu Help   Discussion and help about Ubuntu, Kubuntu, Xubuntu, and all the Ubuntu family

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 12-08-2006   #1 (permalink)
Just Joined!
 
Join Date: Dec 2006
Location: Turkiye
Posts: 9
Send a message via MSN to kardelen
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?
kardelen is offline  



Reply With Quote
Old 12-09-2006   #2 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
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.
anomie is offline   Reply With Quote
Old 12-09-2006   #3 (permalink)
Just Joined!
 
Join Date: Dec 2006
Location: Turkiye
Posts: 9
Send a message via MSN to kardelen
I am new to linux, so can you tell me how to do these?
kardelen is offline   Reply With Quote
Old 12-09-2006   #4 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
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.
anomie is offline   Reply With Quote
Old 12-10-2006   #5 (permalink)
Just Joined!
 
Join Date: Dec 2006
Location: Turkiye
Posts: 9
Send a message via MSN to kardelen
Thank you, that seems to have solved the problem.
kardelen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 02:44 PM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1