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"
What you did is very cool.
Originally Posted by ekirts
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.
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.