maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   socat/telnet connection error to n900 (https://talk.maemo.org/showthread.php?t=94456)

impeham 2015-01-13 21:26

socat/telnet connection error to n900
 
I am trying to test access to ports on the n900 device. Running the following command:

socat - TCP-LISTEN:30,crlf

After that, I am able to use the following commands successfully and connect:
Telnet
Open localhost 30

But if I try to telnet from another machine on the same network, I get connection error.

Is there something I should change on the device to make this port accessible from the outside?

reinob 2015-01-14 08:38

Re: socat/telnet connection error to n900
 
@impeham,

AFAIK TCP-LISTEN only binds to localhost (127.0.0.1). You'd need something like:

Code:

socat - TCP-LISTEN:30,bind=192.168.2.2,crlf
Replace "192.168.2.2" with a suitable address.
Note that I haven't tested this, but it "should" work :)

impeham 2015-01-14 13:58

Re: socat/telnet connection error to n900
 
Quote:

Originally Posted by reinob (Post 1456518)
@impeham,

AFAIK TCP-LISTEN only binds to localhost (127.0.0.1). You'd need something like:

Code:

socat - TCP-LISTEN:30,bind=192.168.2.2,crlf
Replace "192.168.2.2" with a suitable address.
Note that I haven't tested this, but it "should" work :)

Thanks - tries it and getting an error:
"Cannot assign requested address"

i used the external ip address (the one i am getting from the cell 3G provider - might this error be related to a NAT of the provider?)

will test this in internal network also.

reinob 2015-01-14 14:30

Re: socat/telnet connection error to n900
 
Quote:

Originally Posted by impeham (Post 1456550)
Thanks - tries it and getting an error:
"Cannot assign requested address"

i used the external ip address (the one i am getting from the cell 3G provider - might this error be related to a NAT of the provider?)

will test this in internal network also.

With "suitable address" I meant one you can actually control. You most likely cannot bind to a 3G address (which may not even be a routable address). Try with your LAN address and see if that does it.

impeham 2015-01-14 22:32

Re: socat/telnet connection error to n900
 
For router address internal network it works fine - thanks :)


All times are GMT. The time now is 12:10.

vBulletin® Version 3.8.8