- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem of user restriction with TCP-WRAPPER
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2005 09:58 PM
02-15-2005 09:58 PM
I have correctlly installed tcpwrapper and it works. Now, I want to edit a rule to restirct the telnet access for an unique user from all computers.
For this, I have tiped this line in the /etc/hosts.deny
telnetd : user@ALL
My probleme is that this rule doesn't work. Have you any idee why?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2005 10:04 PM
02-15-2005 10:04 PM
Re: Problem of user restriction with TCP-WRAPPER
What entry do you have for telnet in the /etc/inetd.conf file?
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2005 10:22 PM
02-15-2005 10:22 PM
Re: Problem of user restriction with TCP-WRAPPER
Make sure the telnet line in /etc/inetd.conf resembles the following:
telnet stream tcp nowait root /usr/lbin/tcpd /usr/lbin/telnetd telnetd
and you have restarted inetd using:
inetd -c
Let us know how you get on - Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2005 10:29 PM
02-15-2005 10:29 PM
Re: Problem of user restriction with TCP-WRAPPER
Having read your post again, I'm not sure that you can use that syntax in the hosts.deny file. According to the tcpd man page, the format should include daemon,client. So you can only restrict/allow the telnetd daemon to IP addresses or domain names.
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 12:52 AM
02-16-2005 12:52 AM
Re: Problem of user restriction with TCP-WRAPPER
The syntaxe in the /etc/inetd.conf is good.
Now, I have tried to take the problem by another way :
echo "ALL: ALL" > /etc/hosts.deny
echo "ALL: ALL EXCEPT user@ALL" > /etc/hosts.allow
It doesn't work.
I tried to replace "user@ALL" by an IP addess, and it works.
My problem is the restriction by users and normally it is possible with tcpwrapper (I had a look in my HPUX security training book) !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 01:01 AM
02-16-2005 01:01 AM
Re: Problem of user restriction with TCP-WRAPPER
This option can't be available for telnetd - how would Unix know the connecting user before allowing a telnet login prompt? It would obviously know what the user was when they logged in, but the idea of the wrapper is to obviously refuse/allow the telnet session in the first instance. On the other hand, this option IS available for some r services (rsh/remsh etc.). You can deny IPs and domain names, but with telnet, you will need to provide user filtering at the OS level.
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 01:22 AM
02-16-2005 01:22 AM
Re: Problem of user restriction with TCP-WRAPPER
Final stab!! If the Unix server has the ability to query the incoming user through their host (be interested to know if it works with telnet), you may need to check a few entries in /etc/tcpd.conf. You may not have this file on the system, if not, copy it from /usr/newconfig/etc/tcpd.conf and set the rfc931_timeout setting to 20 seconds (for example):
# Timeout value for client's user name lookup
##
rfc931_timeout 20
Good luck and let us know how you get on!!
Keith Bryson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 01:44 AM
02-16-2005 01:44 AM
Re: Problem of user restriction with TCP-WRAPPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 01:51 AM
02-16-2005 01:51 AM
Re: Problem of user restriction with TCP-WRAPPER
Well, I can only suggest trying this with remsh then (as a test). You will need to modify the login and shell /etc/inetd.conf entries to support the wrapper, then add a rlogind and remshd entry to the /etc/hosts.allow. If it works, you know that the syntax can't be used for telnet.
Hope it helps - Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 02:46 AM
02-16-2005 02:46 AM
Re: Problem of user restriction with TCP-WRAPPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 03:02 AM
02-16-2005 03:02 AM
Re: Problem of user restriction with TCP-WRAPPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 03:10 AM
02-16-2005 03:10 AM
Solution...
trap "" 1 2 3
...rest of profile...
trap 1 2 3
This tells the login shell to do nothing if the user tries to escape using CTRL-C, etc. Standard HP profile has this (see /usr/newconfig/etc/profile). In /etc/profile, near the top, create the disallowed user code. In it's simplest format:
BADUSER=billh
[ $(id -un) = $BADUSER ] && exit
Now, you may have a list of bad users in a file so the code becomes:
BADUSERFILE=/etc/baduser
if [ -r $BADUSERFILE ]
then
cat $BADUSERFILE | while read BADUSER
do
[ $(id -un) = $BADUSER ] && exit
done
fi
And you might want to log these attempts in case there is a security problem:
BADUSERFILE=/etc/baduser
if [ -r $BADUSERFILE ]
then
cat $BADUSERFILE | while read BADUSER
do
if [ $(id -un) = $BADUSER ]
then
REMOTE=$(who -muR | awk '{print $NF}')
logger -t /etc/profile -p daemon:warn "User $BADUSER tried to login from $REMOTE"
fi
done
fi
Bill Hassell, sysadmin