LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-30-2008, 02:07 AM   #1
SteveT
Member
 
Registered: Oct 2003
Location: South East UK
Distribution: Fedora Core 16
Posts: 69

Rep: Reputation: 15
/etc/hosts.allow with a specific user


I want to be able to allow a specific user to login from any host.

Currently I use the TCP WRAPPERS /etc/hosts.allow and deny to restrict access to my servers, but I have a problem whereby I want a roaming user to have access. I had thought that I could simply set up a user such as 'roaming_user' then allow that user on ALL hosts.
IE
ALL: roaming_user@ALL

Is such a syntax allowable, is it recommended, is there a better (more secure) way of doing it etc?
 
Old 01-30-2008, 06:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by SteveT View Post
Is such a syntax allowable, is it recommended, is there a better (more secure) way of doing it etc?
It is technically allowable if you respect the requirements and limitations. See "man 5 hosts_access" start at "One should not get carried away with username lookups" (which kinda sets the tone). As you can see from that lookups are unreliable and not trustworthy, as goes for tcp_wrappers in general wrt its susceptibility to spoofing.

If you want it to work for roaming users it depends on what type of access you need to provide them with. If it's just shell logins then forcing OpenSSH to only accept pubkey auth (no passwords) will do. If it's web-based services you could make it switch to only provide services over TLS/SSL (or wedge a stunnel in front of it, or use SSH's forwarding?). If you need to provide more than that you may need something like OpenVPN. It depends on what type of access you need to provide them with and your approach (lazily providing everything *and* the kitchensink or restricting access to only those who need it).
If you add details we'll probably be able to work out advice tailored to your specific setup.
 
Old 01-30-2008, 06:47 AM   #3
SteveT
Member
 
Registered: Oct 2003
Location: South East UK
Distribution: Fedora Core 16
Posts: 69

Original Poster
Rep: Reputation: 15
Ssh.....

OK - I want the user to be able to access a shell - so in effect an SSH connection.
Currently I have hosts.allow and deny resticting all access to the server to 'known' IPs, so I thought that would also stop a roaming user. If I get rid of the hosts allow/deny restrictions, them I'm just left with SSH password protection aren't I? I had that originally, but that led to loads of hacking attempts. Now, the hack attempts get blocked by the allow/deny rules.
 
Old 01-30-2008, 08:13 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
See the sticky thread http://www.linuxquestions.org/questi...tempts-340366/
 
  


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
limit specific proces to a specific user Tux-Slack Linux - Software 3 02-23-2007 11:38 PM
User hosts file. elprawn Linux - General 2 01-18-2007 06:24 AM
rm specific user files Longinus Linux - Newbie 1 04-27-2004 01:09 PM
Allow specific hosts with iptables (jay's firewall) TheOneAndOnlySM Linux - Networking 2 04-04-2004 06:52 PM
OpenSSH - allow access to specific hosts? trouby Linux - Security 7 09-25-2003 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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