LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to prevent ftp from 1 IP (http://www.linuxquestions.org/questions/linux-networking-3/how-to-prevent-ftp-from-1-ip-772508/)

zergling 11-30-2009 02:37 PM

How to prevent ftp from 1 IP
 
How can I prevent ftp access from 1 IP?

I'm new to this forum, please help. :newbie:

anomie 11-30-2009 02:54 PM

You could explicitly deny access using any of:
Also, if your ftp daemon has baked-in access control, you could handle it from there.

rweaver 11-30-2009 02:54 PM

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

zergling 11-30-2009 03:51 PM

Quote:

Originally Posted by anomie (Post 3774778)
You could explicitly deny access using any of:
Also, if your ftp daemon has baked-in access control, you could handle it from there.

:hattip: Thanks for help and I'll try it when I'm back to my office.

zergling 11-30-2009 03:53 PM

Quote:

Originally Posted by rweaver (Post 3774779)
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.

cereal83 12-01-2009 01:55 PM

Quote:

Originally Posted by rweaver (Post 3774779)
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


All times are GMT -5. The time now is 06:00 AM.