Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-10-2008, 12:04 PM
|
#1
|
LQ Newbie
Registered: Jun 2007
Posts: 10
Rep:
|
Can I disable reverse lookups in vsftpd?
Hi all,
I'm using Fedora 8 in a machine at work and I have set up a vsftpd server. I need to limit access to it to only a few clients which I have put in my hosts.allow file. One of them is a client having a dynamic IP from an ISP, so he uses dynamic DNS to map his IP to his hostname every time.
vsftpd does a reverse lookup which of course fails, and denies access. Is there any way to disable r-lookups either in vsftpd or in xinetd to remedy this?
thanks.
|
|
|
03-10-2008, 12:33 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
What do your logs indicated? I never heard or know of an option in vsftpd that denies access due to reverse dns lookups. I would believe the issue is something else and not due to a dynamic IP.
|
|
|
03-10-2008, 11:59 PM
|
#3
|
LQ Newbie
Registered: Jun 2007
Posts: 10
Original Poster
Rep:
|
Mar 11 06:48:15 myserver xinetd[4719]: START: ftp pid=4721 from=11.22.33.44
Mar 11 06:48:15 myserver xinetd[4721]: libwrap refused connection to ftp (libwrap=vsftpd) from 11.22.33.44
Mar 11 06:48:15 myserver xinetd[4721]: FAIL: ftp libwrap from=11.22.33.44
Mar 11 06:48:15 myserver xinetd[4719]: EXIT: ftp status=0 pid=4721 duration=0(sec)
I believe this is a rererse lookup failure. When I dig the client hostname from the server I get the right IP (in my example 11.22.33.44). But when I reverse the dig (dig -x 11.22.33.44) I get the hostname of the client's ISP, which is logical. libwrap fools vsftpd into balieving this is a spoofed hostname, and so rejects the connection.
When I put the IP 11.22.33.44 into hosts.allow, vsftpd accepts the connection.
Just to clarify: When I said "dynamic IP" in my first post I did not mean "private (eg 192.168.x.x), I meant it as an address allocated dynamically by the ISP each time the client's computer boots. The address is public, it just isn't the same accross boots.
|
|
|
03-11-2008, 12:11 AM
|
#4
|
LQ Newbie
Registered: Jun 2007
Posts: 10
Original Poster
Rep:
|
I think I solved it. I just put the hostname that came up from the reverse lookup in hosts.allow and it works! I think this is the hostname given to the clients rooter by the ISP, so it is static to his account. If so, problem solved.
|
|
|
03-11-2008, 02:36 PM
|
#5
|
LQ Newbie
Registered: Jun 2007
Posts: 10
Original Poster
Rep:
|
Nope... The hostname is not static either, which makes sense. I wish there was some option as there is in proftpd to disable reverse lookups.
|
|
|
03-11-2008, 02:58 PM
|
#6
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Well, libwrap ties in with TCPWrapper which is probably blocking these users since you're using the hosts.allow and probably the host.deny.
Are you trying to limit the connections to the hosts with anonymous logins? Why not create actual accounts and drop the wrappers with trying to deny or allow access. Or just setup a good iptables firewall rules for the hosts you want to have access to ftp.
|
|
|
03-12-2008, 12:28 AM
|
#7
|
LQ Newbie
Registered: Jun 2007
Posts: 10
Original Poster
Rep:
|
Yes, I'll probably follow one of the alternatives you propose. This is just a temporary ftp server, I wanted it to have as simple a configuration as possible and not affect the rest of the system. Thanks for your answers anyway!
|
|
|
12-19-2010, 02:15 PM
|
#8
|
LQ Newbie
Registered: Dec 2010
Posts: 11
Rep:
|
To turn off reverse DNS on my vsftpd server, I added this to the .conf file:
reverse_lookup_enable=NO
It got rid of the slow 20 or 30 second ftp login I was getting before.
|
|
|
All times are GMT -5. The time now is 09:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|