LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2010, 10:02 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
Add allowed IP address to FTP server


I have a RHEL FTP server, which i'm told is setup to only allow certain IPs to connect to the FTP site. I have two questions though.

1) what file would show me what IPs are currently allowed?
2) what command do I do to add another IP to it?
 
Old 01-13-2010, 10:08 AM   #2
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 18.04 / CentOS 7.6
Posts: 397

Rep: Reputation: 62
/etc/hosts.allow and /etc/hosts.deny?
 
Old 01-13-2010, 10:09 AM   #3
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
those files are empty. could it be somewhere else? like beneath sysconfig or something?
 
Old 01-13-2010, 10:39 AM   #4
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 18.04 / CentOS 7.6
Posts: 397

Rep: Reputation: 62
Depends where the restriction happens - at the FTP server level, in which case we'd need to know which FTP server daemon you're running or at the firewall level. Iptables perhaps? Under /etc/sysconfig/iptables
 
Old 01-13-2010, 10:45 AM   #5
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
vsftpd is the ftp server i'm running. looks like iptables has some accepts statements in there. maybe that's where I add them? or could there be something in the vsftpd config also?
 
Old 01-13-2010, 12:42 PM   #6
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Ubuntu 16.04.7 LTS, Kali, MX Linux with i3WM
Posts: 299

Rep: Reputation: 30
The best bet would be to edit your /etc/host.allow and /etc/hosts.deny files to control access. A prerequisite is to make sure tcp wrappers in enabled in your /etc/vsftpd.conf file :

Code:
# TCP Wrappers
tcp_wrappers=YES
Deny all incoming connections by default in /etc/hosts.deny by adding:
Code:
vsftpd: ALL
Specify the allowed connection in /etc/hosts.allow by adding:

Code:
vsftpd: 192.168.0.,209.223.0.124
The above example only allows ftp access from the local network ( 192.168.0.* ) and the IP 209.223.0.124

If there are no /etc/hosts.allow|deny files then you can just create them but make sure that they are rw only by root.

Last edited by uncle-c; 01-13-2010 at 12:49 PM.
 
Old 01-13-2010, 12:48 PM   #7
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
I'm just helping maintain the server, i'm not at liberty to reconfigure it like you're suggesting. I do see lines in my iptables like this, so I think I just need to add a new one, but how?

-A INPUT -s 1.2.3.4 -d 5.6.7.8 -j ACCEPT
 
  


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
How to add Proxy IP address in DHCP Server cheesewizz Linux - Networking 1 07-23-2009 06:44 AM
Sending WAN IP address to FTP server sloik2000 Linux - Networking 2 02-08-2005 02:59 PM
trusted ip address access to ftp server i_am_so_kittle Linux - Security 3 05-08-2004 10:41 AM
ftp server not finding my ip address fideli Linux - Software 7 02-18-2004 11:47 AM
FTP Server IP address problem johnk Linux - Networking 2 08-21-2003 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:38 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