TCP Wrappers and restricting users


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users TCP Wrappers and restricting users
# 1  
Old 01-21-2010
TCP Wrappers and restricting users

I'm using vsftpd which is being controlled by inetd.

I have a user that I want to only be able to connect from one specific IP address on the same internal network so I can backup files on a separate system.

Is this possible with TCP wrappers? I got the notion that it was because of a few posts on the web in other places.
Namely:

VSFTPD: Only One IP Address allowed for one user - Linux / UNIX Forum

Reading through the TCP Wrappers documentation, it doesn't make mention of usernames being present in other hosts.allow or hosts.deny. Is this wrong? Or am I going about this the wrong way?
# 2  
Old 01-22-2010
I'm not too clear on how tcpd would tell the difference between users either, since it would seem to happen before it hands over the connection! Some of its documentation hints about IDENT protocol or RFC931, which could mean having to do custom configuration on the client not just the server. And that probably assumes the username on the client machine matches what they want to login as in the first place.

All in all it would be much better to do it cleanly inside vsftp, but that doesn't look possible either! It does have per-client configuration settings, cheerfully ignored whenever they specify limits on things already happened -- like specifying an IP to connect from. Its user allow/deny list cannot specify IP addresses either, it's just a dumb text file of one user per line.

If you absolutely have to use vsftpd, you might need to set up a separate daemon for that one user, restricted to some internal subnet. Or, if the user's not internal, over some VPN.
# 3  
Old 01-22-2010
I kept reading after I posted and pretty much found that out too.

As far as setting up a seperate ftp daemon goes: I think there would be too little pay off for that much work and usage of cpu cycles.

The whole point of this was to backup the MySQL database directories in /var/lib/mysql this way we could have both a dumped backup of the database, and a hard copy that we could easily just replace the ones that were present with.

I think we'll just stick with a redundant backup of dumped databases, because it's easier to secure MySQL than to secure FTP.


Oh and one more thought... PAM couldn't be configured to do something like that?

Last edited by mashiox; 01-22-2010 at 06:46 PM.. Reason: Added some PAM.
# 4  
Old 01-22-2010
Quote:
Originally Posted by mashiox
Oh and one more thought... PAM couldn't be configured to do something like that?
I believe redhat at one point added proprietary extensions to PAM to do that. These were ill-received and I'm not sure if they're still there. Checking incoming IP address for a login process isn't as obvious as it appears at first blush.
# 5  
Old 01-22-2010
Gotcha. Thanks for the pointers!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

TCP Wrappers on AIX 5.3

Hi, I have in my organization varied OS types (AIX,RHEL,Solaris) My need was to block ftp connections from some addresses on my organization, but to not disable the protocol. In the linux servers i did that with the hosts.deny file that used by the vsftpd deamon. In my AIX servers, i have... (6 Replies)
Discussion started by: moshesa
6 Replies

2. AIX

aix tcp wrappers hosts.allow hosts.deny?

hi all just installed the netsec.options.tcpwrapper from expansion pack, which used to be a rpm, for my aix 6.1 test box. it is so unpredictable. i set up the hosts.deny as suggested for all and allow the sshd for specific ip addresses/hostnames. the tcpdchk says the hosts allowed and... (0 Replies)
Discussion started by: wf201626
0 Replies

3. Red Hat

Restricting multiple users to run only sftp server

Hello, can someone please provide steps, can I restrict a multiple users to only access only sftp on a server, to perform upload and download of files on their home directories. 1. I have updated their login shell as /sbin/nologin. anything else do I need to update. Thanks, (3 Replies)
Discussion started by: bobby320
3 Replies

4. Shell Programming and Scripting

restricting users

how can i make my users to not use particular commands in the network like:wall....... pl z help me regarding this (1 Reply)
Discussion started by: yashwanthguru
1 Replies

5. AIX

TCP wrappers

With things installed and wrapping ftpd on AIX 5.1 in hosts.deny I have; ALL: ALL in hosts.allow; ftpd: x.x.x.x ALL: x.x.x.x I get this on connect via ftp; 421 Service not available, remote server has closed connection So its working as far as blocking but the hosts.allow seems to be... (1 Reply)
Discussion started by: traken
1 Replies

6. Solaris

TCP Wrappers - again

has anyone ever tried using a client list in thier hosts.allow file Example of hosts.allow) in.ftpd: /etc/ftp.hosts "ftp.hosts" has my list of IP address that are allow access.... However I cant get this work...Any Comments or Help? (0 Replies)
Discussion started by: dodge_man
0 Replies

7. Solaris

logging solaris 10 tcp-wrappers

I want to log tcp-wrapper events Solaris 10. I researched and saw that I could make a syslog entry in the hosts.deny, which I did below. After restarting syslog and having ssh blocking, I see nothing logging. I also do not get the email that should be generated. The file was taken from a... (2 Replies)
Discussion started by: csgonan
2 Replies

8. Solaris

restricting users privileges and logging their activities

Hello, I'm administrating new installed cluster that runs Legato Networker and Oracle 9. And I want to restrict the use of root to my self and givr the application and DBA the proper and needed privileges to do their duties without hassle in addition I would like to log users activities. my... (0 Replies)
Discussion started by: sh_ksa
0 Replies

9. IP Networking

All tcp/ip users are logged out

I have an RS6000 server running AIX and on occasion all users are logged out of the server "connection closed by foreign host" is the error message. Normally a user can press enter and get a Login prompt, but they get the message "connection refused" and then the users can wait a minute or so and... (2 Replies)
Discussion started by: Docboyeee
2 Replies

10. Cybersecurity

TCP Wrappers

I have installed TCP wrappers , Good package ... I have a problem with the hosts_options part ... I am not able to use the twist command .. It just dosent respond I have compiled wrappers 7.6 for Solaris 8 with ipv6 support ... Everything works fine except the twist doesnt work I have... (1 Reply)
Discussion started by: DPAI
1 Replies
Login or Register to Ask a Question