1833767 Members
2324 Online
110063 Solutions
New Discussion

Block Telnet and FTP

 
SOLVED
Go to solution
musaddaq_2
Frequent Advisor

Block Telnet and FTP

Hi Guys.
I have 9i Rac database(9.2.0.5) with HP-UX platform. I dont want any of my end users to use FTP and Telnet accept few recomanded once.
Is there any way with which i can block Telnet and FTP for all users and just allow 2 to 3 people to use these feature.

Regards
Musaddaq
6 REPLIES 6
Muthukumar_5
Honored Contributor
Solution

Re: Block Telnet and FTP

If you want to completly block ftp and telnet then use /var/adm/inetd.sec as,

telnet deny
ftp deny

reconfigure inetd as inetd -c

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Block Telnet and FTP

If you want to block telnet per user basis then,

-- /etc/profile
# Telnet blocking
ps | grep -q 'telnet'
if [ $LOGNAME != "root" || $LOGNAME != "musad" || $LOGNAME != "test" ]
then
echo "User login with telnet is not allow to $LOGNAME user"
echo "Contact @ ..."
sleep 5
exit 1
fi

To block user basis in ftp then,

/etc/ftpd/ftpusers

Put user name with this file and restart ftpd(aemon).

See more in ftpusers man page.

hth.



Easy to suggest when don't know about the problem!
Robert-Jan Goossens
Honored Contributor

Re: Block Telnet and FTP

Hi Musaddaq,

To block ftp users is easy, use the /etc/ftpd/ftpusers and add the user you allow to use ftp.

Restricting telnet is more difficult.

Check this link for more info.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbdb879bffde7d4118fef00902
79cd0f9,00.html

Regards,
Robert-Jan
Arunvijai_4
Honored Contributor

Re: Block Telnet and FTP

You can achieve this using Xinetd.
http://www.xinetd.org/
You can download for HP-UX from
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Ranjith_5
Honored Contributor

Re: Block Telnet and FTP

Hi,

Telnet you can be restricted according to IP address also.

the file is /var/adm/inetd.sec

ftp can be restricted in /etc/ftpd/ftpusers
add the login name in this file for those users you want to deny ftp access.

Regards,
Syam
Borislav Perkov
Respected Contributor

Re: Block Telnet and FTP

Hi Musaddaq,

You can also use tcp wrapper for restricting or allowing telnet or ftp access on your machine.

Here is the link for free SW:

http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/tcp_wrappers-7.6/

Regards,
Borislav