LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-23-2005, 05:50 PM   #1
hivtop
Member
 
Registered: Jan 2005
Location: In the Desert
Distribution: RedHat 9
Posts: 33

Rep: Reputation: 15
port 25 question???


when I try the following:
# telnet localhost 25
the machine responds with:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Then it just hangs there doing nothing, until I hit enter and return to a root prompt.

I used a port checker from another server (not on my network) and it replyed "port 25 open and ready for connections"

I tried:
# telnet relay-test.mail-abuse.org

and recieved:
telnet: telnet: bad port

I tried:
# telnet localhost 110
and recieved, with no delay:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK POP3 localhost.localdomain v2001.78rh server ready

can anyone tell me what is up with port 25???
Does localhost need a reverse dns entery in the bind zone for this port to work???
where do I check open or closed ports for telnet???

hivtop
 
Old 04-23-2005, 06:30 PM   #2
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
Port 25 is smtp, thats your "outgoing" mail server. It's not "hanging there" when you connect, it's waiting for input

telnet in and issue:
HELO local.domain.name
MAIL FROM: your@emailaddy.net
RCPT TO: anotheruser@emailaddy.net
DATA
Type a test message ...anything will do, then hit enter.
type a "." on a blank line to tell the server you're done, it will attempt to send the message...
issue the command "QUIT" to exit from the terminal...

congrats, you've just sent your first email via a telnet connection

110 is your pop3 server, you can:
USER username
PASS password
LIST
UIDL # where # is the number of the message in the list to view

Last edited by zeos; 04-23-2005 at 06:31 PM.
 
Old 04-23-2005, 06:46 PM   #3
hivtop
Member
 
Registered: Jan 2005
Location: In the Desert
Distribution: RedHat 9
Posts: 33

Original Poster
Rep: Reputation: 15
did the telnet localhost 25
and received the same reply. ANYTHING I type in gives me the following as soon as I hit enter:

Connection closed by foreign host.

the telnet localhost 110
worked as expected, USER, PASS and List...

Any more Ideas????

Hivtop
 
Old 04-30-2005, 03:13 AM   #4
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
If you telnet to port 25, you should see a header that states what smtp server you are using. What smtp daemon are you running?

-twantrd
 
Old 04-30-2005, 07:02 AM   #5
hivtop
Member
 
Registered: Jan 2005
Location: In the Desert
Distribution: RedHat 9
Posts: 33

Original Poster
Rep: Reputation: 15
This is what I get:

# telnet my.ip.add.ress 25
Trying my.ip.add.ress...
telnet: connect to address my.ip.add.ress: Connection refused

Would someone PLEASE show me what a "/etc/xinetd.d/telnet" file should look like. I made one up using a copy of the one for ipop3 and can not fine one anywhere I search on the net.

telnet localhost 25 will now send out mail (following ZEOS's example...thanks zeos) because I uninstalled postfix and reinstalled sendmail 8.12.8.. so my web pages would send out signup emails again and it works as it should.

maybe now it is not a telnet problem but a firewall problem.
does any know about the congif file for:
APF (Advanced Policy Firewall) - 0.9.4 from r-fx.org ???

Thanks all
Top
 
Old 04-30-2005, 01:57 PM   #6
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quote:
Would someone PLEASE show me what a "/etc/xinetd.d/telnet" file should look like
This telnet file will only enabled telnetd, a telnet daemon, which you don't want. So, you don't need to do anything to this file.

-twantrd
 
Old 04-30-2005, 03:00 PM   #7
RickyRockRat
LQ Newbie
 
Registered: Apr 2005
Location: boise
Distribution: Red Hat - 6.2,7.3,9.0,FC3,FC4, FC5, Debian-3.1, Ubuntu 7x,8x,10x, DSL
Posts: 14

Rep: Reputation: 0
hivtop,

check out /etc/services

This contains the standard ports for use in networking.

telnet normally uses port 23, which means that a telnet server will listen on port 23 for incoming connections (actually, it's not telnet, it's inetd or xined, the super server).

When you telnet <name> <port>, it connects to the forced port you specify instead of port 23, so you are establishing a connection to a service that telnet does not normally connect to.

if you want to check out the ports that are configured for use on your computer, check out
/etc/inetd.conf or /etc/xinetd.d/*

Exceptions to this are posgresql, sendmail, and ssh, samba (I am sure I am missing a few).

I am not sure I answered your question. If you want to close the ports, fire up ipchains. There are many good firewall rules to lock your box down tight if that is your desire.
 
Old 04-30-2005, 03:01 PM   #8
RickyRockRat
LQ Newbie
 
Registered: Apr 2005
Location: boise
Distribution: Red Hat - 6.2,7.3,9.0,FC3,FC4, FC5, Debian-3.1, Ubuntu 7x,8x,10x, DSL
Posts: 14

Rep: Reputation: 0
Here's my telnet file
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = yes
}
 
  


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
question about port alvi2 Linux - Networking 5 05-24-2005 03:29 PM
a port question bosewicht Linux - Newbie 2 01-04-2004 07:32 PM
Port question intoxikate Linux - Security 4 05-26-2003 03:23 PM
Port 80 question. hubergeek Linux - Hardware 1 01-06-2003 08:18 AM
Port question Yawmark Linux - Networking 7 10-11-2001 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:44 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
Open Source Consulting | Domain Registration