A way to block FTP access?

mvtimes

Verified User
Joined
Jan 10, 2011
Messages
27
Hello all,

I'm trying to only allow FTP access for my work's static IP address, but am having trouble figuring out how.

I've tried using host.allow and hosts.deny to do this the same way as I had for SSHD, but it is not working. After restarting the exim and proftpd services, I am still able to log in via FTP.

hosts.deny
Code:
sshd : ALL
proftpd : ALL
hosts.allow
Code:
sshd: xx.xx.xx.xx
proftpd: xx.xx.xx.xx

Is there something I am missing, or an easy way to restrict FTP access to certain IP addresses, blocking all others?

Thank you for your time.
 
I also suggest you to use csf (you can find on this server) for have an easy-to-use interface for firewall (iptables).

Regards
 
Its extremely simple to install iptables through yum.

I've actually found it on the server. I had only looked by doing a "iptables -L" which didn't recognize the command.

So it's there, I'm trying to find out how to get it up and running.
 
Did you try to run it as root, or as the root user? If it's on your server it should run.

What specific error message did you get?

What is the output of:
Code:
# whereis iptables
Jeff
 
Did you try to run it as root, or as the root user? If it's on your server it should run.

What specific error message did you get?

What is the output of:
Code:
# whereis iptables
Jeff

iptables: /sbin/iptables /lib/iptables /usr/share/man/man8/iptables.8.gz

When running the command like "/sbin/iptables -L" it worked. I just couldn't do iptables -L without the path
 
Jeff, I wasn't at the root level, just the root user.

Using "su -" let me use the commands in the more normal way.

At this level, /sbin was indeed part of the $PATH variable.

Thanks everyone.
 
Using su doesn't change paths to your root path; using su - does.

I always use su -.

Jeff
 
Back
Top