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 08-26-2004, 02:25 AM   #1
aroop
Member
 
Registered: May 2004
Location: Kolkata, India
Distribution: Red Hat 9
Posts: 50

Rep: Reputation: 15
Access control for telnet and ftp


Can someone tell me how to control the telnet and ftp access to a Red Hat Machine?
I want to know how to ensure that the machine accepts telnet and ftp from only a particular range of IP addresses.
Thanks,
 
Old 08-26-2004, 06:07 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
there i haven't done this before but i think u can have a look at
/etc/hosts.allow, /etc/hosts.deny

regards
 
Old 08-26-2004, 06:34 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
I'd strongly recommend using ssh/scp/sftp instead.... You do know that ftp, telnet (and the r* cmds) send usernames/pwds/data unencrypted ?
 
Old 08-27-2004, 03:32 AM   #4
aroop
Member
 
Registered: May 2004
Location: Kolkata, India
Distribution: Red Hat 9
Posts: 50

Original Poster
Rep: Reputation: 15
I got the solution. Editing /etc/hosts.allow and /etc/hosts.deny works only with tcpd working along with xinetd.
For simply controlling access to telnet and ftp, I edited the files /etc/xinetd.d/telnet and /etc/xinetd.d/gssftp and included aline something like this:

only_from = 20.43.0.0

This allowed telnet/ftp only from the network specified and denied access from other networks.
 
Old 08-27-2004, 04:24 AM   #5
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Rep: Reputation: 30
why use telnet?
 
Old 08-27-2004, 04:35 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
i too agree
use ssh instead

regards
 
Old 08-27-2004, 09:50 AM   #7
aroop
Member
 
Registered: May 2004
Location: Kolkata, India
Distribution: Red Hat 9
Posts: 50

Original Poster
Rep: Reputation: 15
Can someone tell me how to set up ssh?
 
Old 08-27-2004, 10:00 AM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hey
u just ned to start the ssh service ,if ssh installed

and use from remote machine as

ssh [-l login_name] hostname | user@hostname [command]

regards
 
Old 08-27-2004, 04:24 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
ssh comes as std on RH9, so just use
service sshd restart
(it may already be running).
and don't forget to set it on the Services menu as well so it restarts on next boot.
Remember to set
PermitRootLogin no
in /etc/ssh/sshd_config
 
  


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
only FTP access to user not ssh or telnet farhank Linux - Security 3 10-27-2005 09:30 AM
I lose ftp access when I disable shell access for user captainObvious Linux - General 3 11-13-2004 05:49 PM
telnet login control with sockets...how the heck does this work? ooagentbender Programming 2 08-19-2004 09:14 PM
FTP and Telnet Access Flossie Mandriva 5 10-23-2003 10:37 AM
Telnet for remote control, how do I set it up? bripage Linux - Networking 5 08-01-2002 08:02 PM

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

All times are GMT -5. The time now is 01:28 AM.

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