You are not logged in.

#1 2010-09-21 18:00:49

phoenigs
Member
From: Munich - Germany
Registered: 2010-09-03
Posts: 16

ip not reachable with netcat

Hi,

my roommate and I looked for a quick solution for sending a file between our pcs. He is running Ubuntu 10.04, me is running arch.
Yesterday I accessed a samba share from him (only this way), which worked, today we tried netcat with the archbox using

netcat -l 9999

and on the ubuntu machine

netcat archip 9999

which does not work (arch still listening, ubuntu netcat quitting without any message). If we change roles (ubuntu listening, arch connecting) it works without any problems.

I know it is an easy problem, but I don't know where to start searching because after long time using ubuntu I don't know all the configs yet wink

I tried adding the following line to hosts.allow... (I know maybe I missed the real function of the config file, but that was the only place where I thought that connections could be restricted...)

netcat: ALL: ALLOW

also I tried

ALL: ALL: ALLOW

Another thing I recognized: I can ping my roommate by his hostname, but not the other way around (using an avm router, both getting ips by dhcp).

Thank you for your help, and make me learn new stuff wink

Last edited by phoenigs (2010-09-21 18:01:17)

Offline

#2 2010-09-21 19:18:40

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: ip not reachable with netcat

phoenigs wrote:
netcat -l 9999

I just found that it worked if I added the -p option before the port number, as exemplified in the man page.

Offline

#3 2010-09-21 21:15:53

phoenigs
Member
From: Munich - Germany
Registered: 2010-09-03
Posts: 16

Re: ip not reachable with netcat

Ok, with the -p option, we get a connection and can write each other thank you for the hint Nichollan.
But now another problem arises...

arch:

netcat -l -p 9999 > test.out

ubuntu:

netcat archip 9999 < test.in

instantly quits the processes without any message, but only with bigger files (a text file with one line works, but no .mp3 for example).

We also found out, that we were using different versions of netcat. The ubuntu machine uses netcat-openbsd, and arch a traditional one, so I installed the openbsd-netcat package, which didn't change anything.

Also tried the -q option (read anywhere that there might be a problem without it).

Any further suggestions?

Offline

#4 2010-09-21 21:39:07

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: ip not reachable with netcat

I have no other suggestion but to use FTP instead. But what do I know? I just send an email to myself whenever I want to transfer files between computers. Not the most elegant solution, but it works.

Offline

#5 2010-09-21 21:41:46

phoenigs
Member
From: Munich - Germany
Registered: 2010-09-03
Posts: 16

Re: ip not reachable with netcat

We tried the netrw package and it is the same issue here. netread on arch, netwrite on ubuntu does not work. The other way around it does.

EDIT: Using an FTP or SSH would be an option, I will try that anyway for learning purposes wink but I want to know why that does not work...

Last edited by phoenigs (2010-09-21 21:47:00)

Offline

#6 2010-09-22 19:22:16

ByteTemplar
Member
Registered: 2010-09-21
Posts: 12

Re: ip not reachable with netcat

I really recommend reading: SSH
Setup SSH server on either computer and then use SSHFS to mount a folder on that server. Its easy and all the transfer will be encrypted as bonus!

Last edited by ByteTemplar (2010-09-22 19:23:05)

Offline

#7 2010-09-23 09:57:14

phoenigs
Member
From: Munich - Germany
Registered: 2010-09-03
Posts: 16

Re: ip not reachable with netcat

Yes, thank you, I know about SSH and/or ftp and I will test them both, I was just interested why the netcat solution does not work and if there are maybe any issues with my network setup or sth like that.

Offline

Board footer

Powered by FluxBB