LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2010, 02:47 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
telnet 192.168.0.4 1000 failed


I have a temlnet problem -telnet 192.168.0.4 1004 failed.

At 192.168.0.2, "telnet 192.168.0.4" make connection successfully at port 23, however "telnet 192.168.0.4 1000" does not make connection at port 1000.

Please let me know how to solve this problem.

Thanks in advance.
 
Old 07-20-2010, 02:59 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

Is anything listening on port 1000 (or 1004, both are mentioned in your post)? If nothing is listening, you cannot connect to it.

If something is listening on either of those ports, please tell us a bit more (what is listening for example).

Hope this helps.
 
Old 07-20-2010, 02:59 AM   #3
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Allow traffic over port 1004.

Sorry the simple answer, but I have a hard time understanding your problem. You are giving to few informations.

Cheers
 
Old 07-20-2010, 04:02 AM   #4
Filip_Kv
LQ Newbie
 
Registered: Mar 2010
Location: Thessaloniki, Greece
Distribution: Debian, Ubuntu, CentOS, Fedora
Posts: 11

Rep: Reputation: 2
At first, you will have to change the port, or add the additional 1000-number port that the telnet server will listen to.
At the moment your telnet server is listening on 23 port only, which is the default. You can add another port on which the
server will listen to and you will be able to have telnet to listen on both ports 23 and 1000 if you like.

At first, you will have to install xinetd, if you do not already have it installed. Inetd (the older version), is highly insecure and I would not recommend its use. The following example is based on the xinetd package.

Assuming you are using Ubuntu, or a Debian like Distro, in the console type:

root# apt-get install xinetd

in order to install the package. Then, edit the /etc/services file and put an entry for your modified telnet server
like this:

mytelnet 1000/tcp # My Telnet server

Then, go to /etc/xinetd.d/ directory and create a file called mytelnet containing the following:

service mytelnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
port = 1000
}


After that execute in the console:

root# /etc/init.d/xinetd restart

to restart xinetd and all should be in order. I would also suggest, if you were using inetd BEFORE installing xinetd, to go
to the /etc/inetd.conf file and commnent-out the line that looks like this:

telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

To comment it out simply put a '#' at the beginning of the line, making it look like this:

#telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

Then go to the /etc/xinetd.d/ directory and in there create a file called telnet containing
the following:

service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}


and again restart xinetd with

root# /etc/init.d/xinetd restart

Now, verify that your telnet servers are running with the command:

root# netstat -a | grep telnet

it should return something like this:

tcp 0 0 *:mytelnet *:* LISTEN
tcp 0 0 *:telnet *:* LISTEN


meaning that all your telnet servers are running.

Now try to telnet to port 1000 from another machine. In order to disable one of the telnet
services, simply go to the corresponding file in /etc/xinetd.d/ and change the line
disable to 'yes'.

Hope that I have helped

-Fk

Last edited by Filip_Kv; 07-20-2010 at 04:23 AM.
 
Old 07-20-2010, 04:17 AM   #5
Filip_Kv
LQ Newbie
 
Registered: Mar 2010
Location: Thessaloniki, Greece
Distribution: Debian, Ubuntu, CentOS, Fedora
Posts: 11

Rep: Reputation: 2
To add something to my previous post. If in the file /etc/services you see another service using port 1000, then choose another number for mytelnet. You will know if another service is using port 1000 if you see a line in the file looking
like this:

anotherService 1000/tcp # Another service comment or

anotherService 1000/udp # Another service comment

If you change the port number in here, then you must change it also in the /etc/xinetd.d/mytelnet file by
changing the 'port' section to the other number that you put in the /etc/services file in the mytelnet line.

-Fk
 
Old 07-20-2010, 04:33 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Filip_Kv/

Thanks a lot!

I followd your kid and detailed guide, and connected successfully!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
telnet: connect to address 192.168.15.3: No route to host mohammedahmed86 Linux - Networking 13 11-03-2009 11:30 PM
[root@wlxxb ~]# telnet 192.168.192.12 25 Trying 192.168.192.12... telnet problem cnhawk386 Linux - Networking 1 10-10-2007 03:50 PM
pinging 192.168.0.10 from 192.168.2.101 cov Linux - Networking 12 05-03-2007 11:21 AM
What route to access daisy chained 2d router 192.168.1.1 after 192.168.0.1 (subnets?) Emmanuel_uk Linux - Networking 6 05-05-2006 02:47 AM
Is someone on my network?! ::ffff:192.168.0.10:ssh ::ffff:192.168.0.:38201 ESTABLISHE ming0 Linux - Security 4 04-12-2005 02:04 AM


All times are GMT -5. The time now is 01:47 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration