Forum Moderators: bakedjake
I'd like to configure server so that I can block any specific user from logging into port 21 FTP and only allow them to login to port 22 via SFTP. I may also want to allow one user to have port21 access. How would I do that? IP chains? Can anyone give me a snippet example command to do this, or do I need to RTFM for the whole weekend - are there config files to edit or can I do this via CLI? ..:) Or can anyone point me to a clear concise tutorial on this specific subject?
This is for a RH 8 box running Apache 2.x VSFTPD.
Thanks anyone.
Yes thanks, I know how to allow certain users to have FTP access using the config files in vsftp. But I want to allow certain users to only be able to log in using Secure FTP, which is port 22. Right now they can get in by both port 21 which is non secure ftp and port 22 which is secure ftp (SFPT). I want them only to get in via port 22 which is secure FTP.
Port 22 works fine and I am all set up with secure connections on the server, that all works fine. I can get encryped connections via port 22. Now I just want to only allow port 22 connections.
How would I do that anyone?
The iptables way is
iptables -A INPUT -p tcp --dport 21 -j REJECT
If you selectively wanted to allow access by IP address, you could precede it with
iptables -A INPUT -p tcp -s 192.168.0.0/16 --dport 21 -j ACCEPT
which would allow anything from the 192.168.0.0/16 space.
Sean