LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-15-2015, 06:59 AM   #1
a.ankursarkar
LQ Newbie
 
Registered: Jan 2015
Posts: 2
Blog Entries: 1

Rep: Reputation: Disabled
Wink Linux FTP Server


Is it possible that we restrict User on a perticular IP Addess in FTP or another Server. Ex. FTP User A able to login on it’s allow IP A.A.A.A, And FTP User B able to login on it’s allow IP B.B.B.B. User A not able to login from User B allow IP B.B.B.B.
 
Old 01-15-2015, 09:07 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by a.ankursarkar View Post
Is it possible that we restrict User on a perticular IP Addess in FTP or another Server. Ex. FTP User A able to login on it’s allow IP A.A.A.A, And FTP User B able to login on it’s allow IP B.B.B.B. User A not able to login from User B allow IP B.B.B.B.
Yes, it is, depending on which FTP server you're using. You don't tell us what version/distro of Linux or what FTP server you're talking about, but this is covered in both the ProFTP and VSFTP manuals.
 
Old 01-15-2015, 09:12 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i think sftp with keys is what you are after.
 
Old 01-15-2015, 09:16 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by schneidz View Post
i think sftp with keys is what you are after.
I agree about using SFTP rather than FTP...but ProFTPD can set access restrictions based on address/user combinations.
 
Old 01-15-2015, 09:17 AM   #5
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
sftp is the way to go.

It's fairly easy to restrict users to ip addresses, key or not.

In the sshd_config at the bottom you can write who is permitted to access from where.
If you want to define by user & restrict bob to 132.647.546.2 & alice to 435.765.245

Code:
AllowUsers bob@132.647.546.2 alice@435.765.245
Or if you have a group ftp connecting from anywhere in 345.643.3

Code:
AllowGroups ftp@345.643.3*
More ssh config with matching / allow

edit:

This deals with ssh, not ftp - sorry if that wasn't clear

Last edited by Miati; 01-16-2015 at 10:33 AM.
 
Old 01-16-2015, 01:23 AM   #6
a.ankursarkar
LQ Newbie
 
Registered: Jan 2015
Posts: 2

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Thanks to all for your reply.

@TB0ne :- OS - centos6.3
FTP Server - vsftpd

And I also AllowUsers username@IP in my sshd_conf file. But it's not helpful foe m.
 
Old 01-16-2015, 09:58 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by a.ankursarkar View Post
Thanks to all for your reply.

@TB0ne :- OS - centos6.3
FTP Server - vsftpd
Great...so did you check/read the documentation on vsftpd yet? Pay particular attention to the tcp_wrappers directive. Also, again, proftpd has such things built in as well.
https://security.appspot.com/vsftpd/vsftpd_conf.html
Quote:
And I also AllowUsers username@IP in my sshd_conf file. But it's not helpful foe m.
Changing ANYTHING for your SSH configuration won't change anything for FTP...they're two different services. The AllowUsers directive for SSH is for SFTP.
 
Old 01-17-2015, 07:21 AM   #8
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Enable tcp_wrappers in vsftpd.conf file
Edit /etc/host.allow
Vsftpd: xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx

And in host.deny

Vstpd : ALL

Last edited by zafar_dandoti; 01-17-2015 at 08:09 AM.
 
  


Reply



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
LXer: Setup FTP server using VsFtp and Configure Secure FTP connections on Ubuntu 14.04 Server LXer Syndicated Linux News 0 08-20-2014 07:00 PM
ftp from windows 7 to linux ftp server shenno Linux - Newbie 6 12-26-2011 09:34 AM
ftp from LInux to Serv-U ftp server problem csross Linux - General 2 11-07-2005 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration