Find the answer to your Linux question:
Results 1 to 3 of 3
Im trying to copy a full disk over a network using dd and netcat, using a live CD with backtrack4 on it Im on virtual machines and i have [T]arget ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    1

    Help with NC and dd


    Im trying to copy a full disk over a network using dd and netcat, using a live CD with backtrack4 on it

    Im on virtual machines and i have [T]arget machine (98 windows) and [S]erver (Ubuntu ip-127.0.0.1)

    Heres what im doing

    [S] nc -l -p 7000 > disk.dd

    Have the linux server listen on port 7000 and pipe everything it receives into disk.dd

    On the target machine

    [T] dd if=/dev/hda bs=6k | nc 127.0.0.1 -p 7000

    When i try this though i get the error " no port[s] to connect to". I really know nothing about Linux networking. Can anyone see what im doing wrong?

    Everything i read says this should work and doesn't mention anything about this error. I originally tried

    [T] dd if=/dev/hda bs=6k | nc 127.0.0.1 7000

    like some books say but it gives the error " (unknown) [127.0.0.1] 7000 Connection refused"

  2. #2
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6
    Quote Originally Posted by ekirts View Post
    Im trying to copy a full disk over a network using dd and netcat, using a live CD with backtrack4 on it

    Im on virtual machines and i have [T]arget machine (98 windows) and [S]erver (Ubuntu ip-127.0.0.1)

    Heres what im doing

    [S] nc -l -p 7000 > disk.dd

    Have the linux server listen on port 7000 and pipe everything it receives into disk.dd

    On the target machine

    [T] dd if=/dev/hda bs=6k | nc 127.0.0.1 -p 7000

    When i try this though i get the error " no port[s] to connect to". I really know nothing about Linux networking. Can anyone see what im doing wrong?

    Everything i read says this should work and doesn't mention anything about this error. I originally tried

    [T] dd if=/dev/hda bs=6k | nc 127.0.0.1 7000

    like some books say but it gives the error " (unknown) [127.0.0.1] 7000 Connection refused"
    What you did is very cool.
    Those commands are correct except that the IP address is wrong. If you use 127.0.0.1 you will connect to your own Ubuntu server, not the target windows 98.
    First of all you need spend some time to set up the network for your target windows 98 on virtual machine. There are many ways to set up the network to enable your target and your server communicate with each other. For example you set the IP addresses like this:
    Ubuntu server: 192.168.1.10
    Target windows 98: 192.168.1.11
    Make sure they can ping each other, and then you can use 192.168.1.11 in your commands.

    Jeffrey

  3. #3
    Linux User
    Join Date
    May 2009
    Location
    Big River, Sask, Canada
    Posts
    342
    Somebody may correct me on this, but wouldn't the address you tried be sent as 127.0.0.1:7000? Not that it would have worked, since it is the loopback address.
    Registered Linux User #420832

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •