Slashdot Mirror


Make a PC Look Like a Firewire or USB Drive?

buckinm asks: "Here's the problem: I have a Windows laptop that I use for work. When I'm at home though, I much rather use my Mac. Since we use Cisco's VPN client at work, I can't mount the drives on the PC from the Mac. What I'd like to know, is there any software out there that would make the PC act like a Firewire or USB drive? I'd want to be able to mount it read/write. I know I could do some sort of rsync of thing when not connected to the VPN, but that seems like too much trouble. I wouldn't be against writing something like that, if I could get some idea of what is required to listen / respond to traffic on the Firewire or USB ports."

15 of 122 comments (clear)

  1. You'll want .... by Muad'Dave · · Score: 3, Informative

    ...the gadget device driver and API. From the linked page:
    The API makes it easy for peripherals and other devices embedding GNU/Linux system software to act in the USB "device" (slave) role. The drivers implementing and using that API combine to make a useful driver framework for Linux systems that implement USB peripherals.

    --
    Tiller's Rule: Never use a word in written form that you've only heard and never read. You will end up looking foolish.
    1. Re:You'll want .... by enigmatichmachine · · Score: 2, Informative

      firewire != USB.
      mac fanboys: yes, firewire drive mode is great, but has nothing to do with this problem. he wants a way to access the files over USB. I looked into it myself when i had a bad case of mac envy, but usb is a master/slave model, devices are classified either as masters, or slaves, not both, and as far as i know, 2 of the same type are not able to communice via the usb protocol. it looks like the above poster has software to allow a server to emulate a slave device, but firwire is more of a peer to peer technology, and any device can issue command to any other device, which is why it can implement tcp-ip over it.

      p.s. i wish USB were more like firewire, as i've always wanted my pda's (palm or ppc) to be able to use other slave usb devices (really just joysticks) but alas...

      --
      -and occasionaly a giant moose.
  2. Re:Possible, I think by nuxx · · Score: 4, Informative

    For what it's worth, you hold T and it puts it in 'T'arget disk mode. This is so damn handy for when you've got a b0rked OS install, but you want to recover the data. It's so much easier than pulling the disk and sticking it in an external enclosure, especially in laptops...

  3. Easy on a mac by elliotj · · Score: 1, Informative

    Hold down COMMAND+T when you boot for "target disk mode". Makes your computer into a firewire drive.

    This is great if you want to use the HDD of your Powerbook G4 on your friend's G5 tower. I think you can even set it to be the boot disk.

    Macs rule.

  4. Re:Make sense man!! by hawkstone · · Score: 3, Informative

    > You want to mount drives form a Mac?
    > Share the drives and mount them.


    He can't, because VPN usually shuts off the other network connections.

    > You want to mount vpn mapped drives from a Mac?
    > Same deal, share them and mount them. If you can't share them, them subst them and share the subst.


    Sharing won't work at all over TCP/IP while VPN is in use.


    > You want to access your network from the Mac via the laptop?
    > Enable routing on the laptop.
    > Better yet, why not install the VPN client on the Mac and leave the laptop out of the question?


    He did install VPN on the Mac -- his data is on the Windows laptop.

    > What do you want?

    He wants to get at all his work data, which is on his work laptop, while using his home desktop machine to connect with his servers at work. Since he can't use a normal TCP/IP connection to have the two machines talk to each other, but they are both at home with him, he thought using USB or Firewire to connect them would avoid the issues with trying to share data between them while the Mac is hooked up to VPN.

  5. Re:Simplest way: by FreeLinux · · Score: 3, Informative

    they set the VPN interface to be the default route, and then they remove any other routes.

    Too true. and adding a host route or two resolves the issue.

    route add mac'sIP mask 255.255.255.255 eth0'sIP

    It may also be necessary to add a host route for the local eth0 interface as well, depends on how far your VPN client goes. I'd put it in a batch file so that I could run it each time I bring up the VPN.

  6. Comment removed by account_deleted · · Score: 4, Informative

    Comment removed based on user account deletion

  7. Re:The windows laptop has a different disk format by Jeremiah+Cornelius · · Score: 2, Informative
    OS X doesn't WRITE to NTFS! FAT32 - Yes.

    You're making the Doctor happy/not happy.

    --
    "Flyin' in just a sweet place,
    Never been known to fail..."
  8. Just use a Linux Live CD by Taladar · · Score: 2, Informative

    Use a Linux-Live-CD or USB-Boot or even Floppy to boot a minimal Linux with Samba, NFS or whatever fits your Mac best and share the files with that. Switching is as easy as removing the CD from the Drive and rebooting.

  9. Re:Possible, I think by Ster · · Score: 3, Informative

    Actually, the kernel isn't involved at all. It's all done in OpenFirmware.

    Back when PowerBooks used SCSI, it turned the 'Book into a SCSI drive. I believe there was a Control Panel you could use that would set the SCSI ID that it would use.

    It's not just for PowerBooks anymore, though. Any[*] Mac with built-in FireWire can do Target Disk Mode.

    [*] I'm pretty sure it's "Any", but it might just be "Most". Certainly works for old "Sawtooth" PowerMac G4s on up, and iMac DVs on up, in addition to the laptops.

    -Ster

  10. Re:Simplest way: by bill_mcgonigle · · Score: 2, Informative

    A Google search turned up this document that shows that the Cisco VPN client is cabable of split tunneling.

    The AskSlashdotter needs to RTFM.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  11. Re:Simplest way: by Tintivilus · · Score: 3, Informative

    adding a host route or two resolves the issue.

    This likely won't work either... the Nortel client, for example, automatically disconnects if *any* routing table changes are made after the client connects. Makes it a real pain to use networked printers at home, too.

  12. That doesnt work... but this does by Anonymous Coward · · Score: 1, Informative

    The Cisco client does some low level stuff that if I understand it correctly, actually installs a new low level IP stack under the OS's that you have no control over or access to. The OS's stack is fully under the control of the VPN client since all traffic has to pass through it's private stack. It's funny, you can't even ping your own defaut gateway, the one the VPN traffic is traveling through.

    The way around it is to use another stack. IPX might work but the simplest one i've found the IPv6 stack. It's completely separate from the V4 stack and the Cisco client I've used doesn't touch it. You can use all kinds of fun tricks with that. Hmm... better post this as AC. We all know "freedom of speech" doesn't mean what it used to these days.

  13. Hack the damn thing by JackAsh · · Score: 2, Informative
    The Cisco client does some low level stuff that if I understand it correctly, actually installs a new low level IP stack under the OS's that you have no control over or access to. The OS's stack is fully under the control of the VPN client since all traffic has to pass through it's private stack. It's funny, you can't even ping your own defaut gateway, the one the VPN traffic is traveling through.

    The way around it is to use another stack. IPX might work but the simplest one i've found the IPv6 stack. It's completely separate from the V4 stack and the Cisco client I've used doesn't touch it. You can use all kinds of fun tricks with that. Hmm... better post this as AC. We all know "freedom of speech" doesn't mean what it used to these days.


    AC, you are absolutely right. This is exactly what he needs to do. I've done the IPX trick on the Cisco VPN client many times to print from my work laptop to my home printer (via a second windows box). I'm not sure about IPX support in the Mac (or even worse Netbios over IPX) so I'd go with the IPv6. A second trick that no longer works that well (used to work on older Cisco clients) was to add a second NIC (i.e. a PCMCIA 802.11 card) after the tunnel was established, or to have it deactivated at least, don't remember the exact details.

    As a funny note, I notified Cisco of this problem with the Split Routing protection about 5 years ago (through the proper support channels, being as my company were customers of the product). They claimed it wasn't a bug or vulnerability.

    Last but not least, you can always just go and get the damn VPN client for the Mac, and share the files the long way - over your tunnel into the office :).

    -Jack Ash
  14. USB Bridge Cable Was What I Used by WhyCause · · Score: 3, Informative
    I needed to do this when I upgraded from an old Win98 desktop to my current WInXP laptop. The best solution (cost wise) that I found was a USB to USB bridge cable.

    I purchased an IOgear Smartlink cable. I had to use USB 1.1 due to OS and hardware inadequacies, but there may be a USB 2.0 option (though I don't see it on the IOgear site). The connection software is pretty crummy-looking, but it works, and their site claims that it supports Macs as well Windows (although I have not used it on a Mac). Since it's USB 1.1, it is as slow as molassass for entire-drive transfers, and you may prefer a different method.

    Another option I looked into was an ethernet crossover cable, which, I believe swaps two of the wires over the course of the cable run. This was available at RadioShack (and I am sure other places). I decided not to go down this route, and it sounds like a no go for you as well, but I'm including it for the sake of completeness.

    The third thing that might work is an external harddrive. I didn't use one because of the expense, but it may be worth it if you don't want to wait while your files transfer via USB. If you're doing smallish (less than 1GB) transfers, a thumb-drive may be the easiest way to do this.

    It is VERY important that you do not try a straight USB to USB connection without the bridge cable. I understand that it can fry the USB ports on the machines. If you look at the image of the Smartlink cable on the page linked above, you'll see a bulge in the middle of the cable. That's the USB 'slave' that allows both computers to act as masters when doing the file transfer. FireWire may be a different story though, as you may just be able to plug it right in (no guarantees, though).