LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   telnet localhost 106 (https://www.linuxquestions.org/questions/linux-server-73/telnet-localhost-106-a-936307/)

franklin.sucre 03-25-2012 04:53 AM

telnet localhost 106
 
Dear all,

I am testing poppassd on my freeBSD machine, my poppassd is working fine but i cant telnet to the localhost with port number 106.


# telnet localhost 106
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

Please suggest.

Thaank You..

Ser Olmy 03-25-2012 08:19 AM

Have you added a poppassd entry to /etc/services?

Is your distribution using inetd or xinetd?

chrism01 03-25-2012 09:06 PM

Indeed, this is what my /etc/services file looks like
Code:

# unfortunately the poppassd (Eudora) uses a port which has already
# been assigned to a different service. We list the poppassd as an
# alias here. This should work for programs asking for this service.
# (due to a bug in inetd the 3com-tsmux line is disabled)
#3com-tsmux    106/tcp        poppassd
#3com-tsmux    106/udp        poppassd

note the lines are commented out by default ...

franklin.sucre 03-26-2012 01:34 AM

Re: telnet localhost 106
 
Dear sir,

My /etc/services entry from my freeBSD machine is as follows.

poppassd 106/tcp poppassd
poppassd 106/udp poppassd
#3com-tsmux 106/udp

And i dont have a xinetd.d entry and made myself like /etc/xinetd.d/poppassd.c and while compiling this using:

# gcc poppassd.c -o poppassd -lcrypt

I receive the following errors:
-------------------------------------------------------------------
poppassd.c:1: error: syntax error before "poppassd"
poppassd.c:2: error: syntax error before '{' token
poppassd.c:4: error: `no' undeclared here (not in a function)
poppassd.c:4: error: syntax error before "socket_type"
-------------------------------------------------------------------

thank you for your concerns and i expect a quick help again. My version is 6.2-RELEASE FreeBSD 6.2-RELEASE.


Thank You again.

Ser Olmy 03-26-2012 04:14 PM

You're not supposed to put the poppassd executable in /etc/xindetd.d, and the service config file does not need compiling.

You need to do the following:
  • Compile poppassd (or download a precompiled version)
  • Install poppassd to a directory in the path, like, say, /usr/bin
  • Add a service entry to /etc/service (you've done this)
  • Create /etc/xinetd.d/poppassd (google 'poppassd xinetd' for more information)
  • Restart xinetd

webaccounts 04-30-2012 11:19 AM

It sounds like your server is blocking you because you're trying to connect as ::1 instead of 127.0.0.1. With IPv6 you need to allow poppassd to receive from your IPv6 localhost IP.

Edit /etc/xinetd.d/poppassd

Change:
Code:

only_from              = 127.0.0.1
To:
Code:

only_from              = 127.0.0.1 ::1


All times are GMT -5. The time now is 09:22 AM.