• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1773
  • Last Modified:

dd if=/dev/sda | nc 192.192.0.145 1234 ( this does nto work ) debian 4.0

hi
its 3rd day.. .i am stuck ...

its works with almost every server but few server ist not working

Server 2 :(destinatioin )

nc -l -p 1234 | dd of=/dev/sda

Server 1: (Source Server)
dd if=/dev/sda | nc 192.168.0.12 1234


Problem is :

when i am adding dd if=/dev/sda    as pipe with  nc 192.168.0.12 1234
its does nto do anything, it does not establisehd any connection with destination pc

example :

Server 2 :(destinatioin )

nc -l -p 1234 | dd of=/dev/sda

Server 1: (Source Server)
 nc 192.168.0.28 1234

output

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State

tcp        0      0 192.0.0.145:1234        192.0.0.28:42837        ESTABLISHED   -------------------------


now if i try

Server 2 :(destinatioin )

nc -l -p 1234 | dd of=/dev/sda

Server 1: (Source Server)
dd if=/dev/sda | nc 192.0.0.28 1234


it does not established the connection

Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:1234            0.0.0.0:*               LISTEN  ---------


but note : if i end the process at Server 2 (Source ) it will end the process in Server1 so there is a link between this 2 server, but it does not established anything..


please read my example.. ..


Note , bellow works
 

Server2 (Destination)
nc -l -p 1234 > index.html

Server1 (Source)

cat index.html | nc 192.0.0.145 1234


pipe does not work ..


i belived this is eithetr bug or the command ... for debian 4.0







0
fosiul01
Asked:
fosiul01
  • 3
  • 2
1 Solution
 
woolmilkporcCommented:
Hi again,

no real idea, but perhaps you should try an alternate netcat implementation,
netcat-bsd or netcat-traditional, depending on what you have now.

http://packages.debian.org/sid/netcat-openbsd
http://packages.debian.org/sid/netcat-traditional


wmp
0
 
fosiul01Author Commented:
i tryed to install netcat-traditional last night for 6 hours

and at last broke the whole sytem

its debian 4.0  

i just updated nc to  1.10.38

do you think its a bug or something ??

as i said, bellow works

Server2 (Destination)
nc -l -p 1234 > index.html

Server1 (Source)

cat index.html | nc 192.0.0.145 1234

but | dd would not work
0
 
Sikhumbuzo NtsadaCommented:
Can you confirm the IP addresses are correct and you can ping the destination server from the source?
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
woolmilkporcCommented:
Must be a bug or something, because the method you describe is quite commoIs it the pipe, or is it dd?

Did you try

Server2 (Destination)
nc -l -p 1234 | cat

Server1 (Source)
echo "hello" | nc 192.0.0.145 1234

(just to exclude dd as the culprit).

wmp

0
 
woolmilkporcCommented:
... and you should really add "-w10" or something at the sending side to have netcat come to an end after the final net read!

0
 
fosiul01Author Commented:
Hi thanks

its not the | , its dd  is the culprit

as i said, cat command works...

i will try your method tomorrow , as today i am using live Cd (knopsis) on both server and destination
and using nc + dd  ..

its working
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now