- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Login with valid client IP to HP-UX11i
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
Discussions
Discussions
Discussions
Forums
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
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
тАО03-16-2004 11:20 PM
тАО03-16-2004 11:20 PM
Login with valid client IP to HP-UX11i
i want to check, if a user comes from a valid client after login.
In .profile: check if client ip <> 192.168.x.x
then exit
Anny ideas ?
Regards Bernd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2004 11:32 PM
тАО03-16-2004 11:32 PM
Re: Login with valid client IP to HP-UX11i
Could you please elaborate a little more on what you are trying to achieve?
Are you trying to limit the users logging into your server based on a pattern of client ip addresses like 192.168.x.x
rgds
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2004 11:40 PM
тАО03-16-2004 11:40 PM
Re: Login with valid client IP to HP-UX11i
i want to check, if the user "ABC" is not telnet 'ing from the clients ip (e.g)
192.168.1.35, then exit in .profile.
I don't want to block a range of IP's.
Is there a system variable for the client IP ?
Regards Bernd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2004 12:01 AM
тАО03-17-2004 12:01 AM
Re: Login with valid client IP to HP-UX11i
grep `who -R am i | cut -c39-`
echo "Invalid ip address"
exit
}
Look at the output of who -R to see where this is going.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2004 12:27 AM
тАО03-17-2004 12:27 AM
Re: Login with valid client IP to HP-UX11i
who -Rm | read line
FROM=${line##*\(}; FROM=${FROM%%\)*}
if [[ $FROM != [0-9]*.[0-9]*.[0-9]*.[0-9]* ]]; then
FROM=$(nslookup $FROM | grep Address | tail -1 | awk -F '[^0-9.]+' '{print $2}')
fi
if [[ "$FROM" != [0-9]*.[0-9]*.[0-9]*.[0-9]* ]]; then
echo "Unknown Source IP."
exit
fi
if [[ "$FROM" = 192.168.1.35 ]]; then
echo "Forbidden Source IP $FROM."
exit
fi
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2004 12:57 AM
тАО03-17-2004 12:57 AM
Re: Login with valid client IP to HP-UX11i
Don't use .profile... use /var/adm/inetd.sec inestead:
telnet deny 192.168.1.35
ftp deny 192.168.1.35
shell deny 192.168.1.35
login deny 192.168.1.35
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2004 01:11 AM
тАО03-17-2004 01:11 AM
Re: Login with valid client IP to HP-UX11i
it's o.k. in .profile !
I'll do the following:
..........
if [["$FROM" <> 192.168.1.116]]; then
echo "Wrong client / User combination"
exit
fi
Regards Bernd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2004 01:23 AM
тАО03-17-2004 01:23 AM
Re: Login with valid client IP to HP-UX11i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2004 02:47 AM
тАО03-17-2004 02:47 AM
Re: Login with valid client IP to HP-UX11i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2004 06:40 PM
тАО03-18-2004 06:40 PM
Re: Login with valid client IP to HP-UX11i
i've coded the following. But everytime the script does the "else" statement with tis message.
checkip_dittbern[16]: [[192.168.1.36: not found.
------------------------------------------
who -Rm | read line
FROM=${line##*\(}; FROM=${FROM%%\)*}
echo "$FROM"
sleep 2
if [[ $FROM != [0-9]*.[0-9]*.[0-9]*.[0-9]* ]]; then
FROM=$(nslookup $FROM | grep Adress | tail -1 | awk -F '[^0-9.]+''{print $2}')
fi
#if [["$FROM" = 192.168.1.116 ]]; then
if "$FROM" = 192.168.1.36
then
echo "Right IP $FROM"
sleep 2
exec ba6.1
else
echo "Wrong IP $FROM"
exit
fi
------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2004 07:02 PM
тАО03-18-2004 07:02 PM
Re: Login with valid client IP to HP-UX11i
if [[ $FROM = "192.168.1.36" ]] ; then
you really should use inetd.sec this is what it is designed to do.
John.