LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-30-2009, 02:37 PM   #1
zergling
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
Talking How to prevent ftp from 1 IP


How can I prevent ftp access from 1 IP?

I'm new to this forum, please help.
 
Old 11-30-2009, 02:54 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
You could explicitly deny access using any of:
Also, if your ftp daemon has baked-in access control, you could handle it from there.
 
1 members found this post helpful.
Old 11-30-2009, 02:54 PM   #3
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
Code:
iptables -I INPUT -s 68.213.160.174 -p tcp --destination-port 21 -j DROP
Will keep them from connecting on all ports.

If your ftp daemon supports hosts.allow/deny you can add an entry like:

Code:
ftpd:x.x.x.x:DENY
 
1 members found this post helpful.
Old 11-30-2009, 03:51 PM   #4
zergling
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by anomie View Post
You could explicitly deny access using any of:
Also, if your ftp daemon has baked-in access control, you could handle it from there.
Thanks for help and I'll try it when I'm back to my office.
 
Old 11-30-2009, 03:53 PM   #5
zergling
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by rweaver View Post
Code:
iptables -I INPUT -s 68.213.160.174 -p tcp --destination-port 21 -j DROP
Will keep them from connecting on all ports.

If your ftp daemon supports hosts.allow/deny you can add an entry like:

Code:
ftpd:x.x.x.x:DENY
Thanks for your help.
 
Old 12-01-2009, 01:55 PM   #6
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 478

Rep: Reputation: 30
Quote:
Originally Posted by rweaver View Post
If your ftp daemon supports hosts.allow/deny you can add an entry like:

Code:
ftpd:x.x.x.x:DENY
Is the easiest imo. Put it in (on slackware) /etc/hosts.deny
 
  


Reply

Tags
ftp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent directory browsing in ftp, but still download from folder rpfrimmer Linux - Security 3 07-29-2007 02:07 AM
FTP Server: Prevent user from getting out of their root directory Swakoo Linux - General 4 03-02-2007 01:42 AM
Changing File Permission in a FTP directory to prevent deleting of files shawnbishop Linux - Software 3 01-10-2006 05:41 AM
FTP users prevent browsing to other directories mephesto Linux - Software 2 05-07-2005 10:03 AM
how do i prevent ftp connection timeout? doublefailure Linux - General 5 11-22-2002 11:18 PM


All times are GMT -5. The time now is 09:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration