LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-16-2016, 03:14 AM   #1
fery_s
LQ Newbie
 
Registered: Jan 2016
Location: Germany
Distribution: Centos
Posts: 4

Rep: Reputation: Disabled
Failed Telnet login attempts


hello everyone
i have an redhat base server that was not support iptables.
by default when somebody telnet to server and enter wrong password , his access is blocked for 15s , i want to now how can i increase this time or block his ip automaticly .
i try to do this with xinetd and pam but it's not work or my way is wrong.
can anybody help me?
 
Old 01-16-2016, 04:03 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Two details surprise me. All Red Hat Enterprise Servers support a firewall. What is your version number? And what kind of system is using telnet nowadays?

What you want can be achieved with an intrusion prevention system like fail2ban.
 
Old 01-16-2016, 05:08 AM   #3
fery_s
LQ Newbie
 
Registered: Jan 2016
Location: Germany
Distribution: Centos
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Two details surprise me. All Red Hat Enterprise Servers support a firewall. What is your version number? And what kind of system is using telnet nowadays?

What you want can be achieved with an intrusion prevention system like fail2ban.
my server is an telephony server (not elastix or free pbx) and many features of redhat was delete from it.
i can do it with faillog command but its for one fail login. after that i must run command again. or run it with cron.
 
Old 01-16-2016, 02:05 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
tellnet should not even be enabled by default .It should be disabled

Quote:
my server is an telephony server
what Version of RHEL ( if this is rhel) is this running or is it based on the long dead and long unsupported RH
( redhat did a name change in 2003 "RH" became "RHEL" )
to check
Code:
cat /etc/redhat-release
RedHat Enterprise Linux ( rhel) is not really free you HAVE to buy the required support contract

so i would suggest you contact Redhat and use the support contract you ARE paying for

Last edited by John VV; 01-16-2016 at 02:06 PM.
 
Old 01-18-2016, 04:50 PM   #5
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by John VV View Post
tellnet should not even be enabled by default .It should be disabled

Agreed, you should never use Telnet.

The only time to use Telnet, is when troubleshooting connectivity. Can a distant user establish connection and say get the login banner? Even then, just use PuTTY.

Other then than, Telnet is worthless...
 
Old 01-18-2016, 06:38 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
there are still uses for telnet -- not many

i use one service from JPL/NASA for orbital data
the horizons telnet service

but it should NEVER be used for administrating a remote server or for loging in to a server
 
Old 01-18-2016, 07:40 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,647
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Always remember this one thing about "stock distros": they often "enable everything but the kitchen sink." (Just as I well remember a RedHat distro that was prepared to offer hardware support for a "DecSystem token-ring network card," just in case you happened to have one in slot #3.)

You need to troll through these various lists. Be sure that the distro is not "automatically launching" (always, or in response to a port-connection request) any daemon process that you do not actually intend to use. Likewise, be sure that (a) the firewall is running, and that (b) it does not open any port that you do not intend to use.

Unless you intend to be using telnet, this port should not be open, and Linux should not be monitoring it and launching anything when anyone attempts to connect to it.
 
Old 01-18-2016, 08:11 PM   #8
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by sundialsvcs View Post
Always remember this one thing about "stock distros": they often "enable everything but the kitchen sink." (Just as I well remember a RedHat distro that was prepared to offer hardware support for a "DecSystem token-ring network card," just in case you happened to have one in slot #3.)
IMO, telnet, ftp and vsftpd are not installed on the RHEL systems, so less chance of risk.

However on RHEL5 a number of daemons come on by default (atd, bluetooth, cups and ISDN). Potential Risk.

RHEL6 samething, except no ISDN. At least iptables and ip6tables are set to start automatically.
 
Old 01-18-2016, 10:57 PM   #9
fery_s
LQ Newbie
 
Registered: Jan 2016
Location: Germany
Distribution: Centos
Posts: 4

Original Poster
Rep: Reputation: Disabled
guys thank you for your answers . i know that telnet is not scure and i use it for a user with limited access to server.
 
Old 01-19-2016, 02:17 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,647
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
... then eventually someone will use it to get in, and your server will be rooted, and you'll be whining.
 
Old 01-19-2016, 03:42 PM   #11
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 fery_s
(..) i have an redhat base server that was not support iptables. (..) my server is an telephony server (not elastix or free pbx) and many features of redhat was delete from it. (..) i use it for a user with limited access to server.
OK, I think it should go like this then:
0) put Telephony server in DMZ,
1) ensure SIP and other Telephony protocols get through the firewall properly,
2) put bastion host in DMZ,
3) enable TCP/22 white list (or fail2ban + ipset) and SSH with pubkeys on bastion host,
4) allow the user telnet only from bastion host (OK, or SSH tunnel) to only Telephony server.
 
  


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
failed sshd login attempts saba85 Linux - Security 5 07-17-2015 12:27 AM
Change # of telnet login attempts Redhat Enterprise cloverit Linux - Security 5 05-29-2011 01:58 PM
failed login attempts smilemukul Linux - Newbie 7 12-16-2010 12:46 PM
Timeout between failed login attempts wuicci Linux - Security 3 06-01-2006 04:40 AM
Failed SSH login attempts Capt_Caveman Linux - Security 38 01-03-2006 03:22 PM

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

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