Tunneling samba over SSH - SMB

This is a discussion on Tunneling samba over SSH - SMB ; Cheers, I've been trying in vain to access a samba server (Linux) from a Windows XP machine via SSH tunneling. I've gotten it to work from Linux to Linux, so this is probably due to some Windows misconfiguration. Samba version ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Tunneling samba over SSH

  1. Tunneling samba over SSH

    Cheers,

    I've been trying in vain to access a samba server (Linux) from a Windows
    XP machine via SSH tunneling. I've gotten it to work from Linux to
    Linux, so this is probably due to some Windows misconfiguration.

    Samba version 2.2.7a is running on my linux box. This machine is
    serving several shares which work just fine from Windows machines on the
    same network (these machines use a straightforward, ie, not tunnelled
    connection). I'm even able to tunnel a connection from a linux laptop
    on a separate network via ssh. The problem occurs when trying to tunnel
    a Samba connection from a Windows client on a separate network.

    On the Windows XP (Home Edition) machine, I've enabled NetBios over
    TCP/IP, disabled the Server service, and disabled File and Printer
    sharing. Using putty, I've forwarded port 139 to the linux server.
    Additionally, I've tested the tunnel by using tcpdump on the linux
    machine and telneting to localhost:139 on the windows box. Whatever I
    type is successfully tunneled to the Linux box on port 139. (Hence, I'm
    quite confident that Putty is doing what it's supposed to do.)

    I've also edited lmhosts. It now includes the line
    127.0.0.1 FAKENAME #PRE
    Even after running nbtstat -R, nbtstat -c reports that there are "No
    names in cache"!!! Additionally, net view \\127.0.0.1 and net view
    \\FAKENAME result in System error 53. And to make matters worse,
    running tcpdump on the Linux server shows that nothing was even sent via
    the tunnel. Even stranger, if I add something like
    1.2.3.4 BOGUS #PRE
    to lmhosts and then run nbtstat -R, now nbtstat -c reports that BOGUS
    exists, but *STILL* shows nothing about FAKENAME. After trying a few
    variations, it looks as if any entry in 127.0.0.0/255.0.0.0 is
    completely ignored whereas anything else registers just fine.

    For yet another experiment, I disabled the putty port forwarding and
    tried telneting to localhost on windows to port 139. The connection was
    refused. So it looks like there isn't any other "interfering" service
    running on port 139 on Windows XP.

    So it's past 1AM and I'm still stuck. It appears that Windows XP Home
    Edition just refuses to accept any Samba connections to localhost.
    Furthermore, it seems to ignore entries in lmhosts that refer to
    localhost. Port forwarding looks okay, and I don't think this is a
    samba configuration issue since no data even reaches the Linux Samba
    server side. Additionally, I've gotten the system to work just fine
    when using a Linux client.

    Anyway, if someone could point me in the right direction, I'd appreciate
    it. I've spent hours on Google groups, FAQs, and miscellaneous
    websites. Unfortunately, I've had little luck thus far.

    BTW, if you could post your reply to the newsgroup and CC msherr at cis
    dot upenn dot edu, I'd be grateful.

    Cheers,
    Micah Sherr


    --
    Micah Sherr
    PhD Candidate, Computer and Information Science
    University of Pennsylvania


  2. Re: Tunneling samba over SSH

    In article , Micah Sherr wrote:
    > Cheers,
    >
    > I've been trying in vain to access a samba server (Linux) from a Windows
    > XP machine via SSH tunneling. I've gotten it to work from Linux to
    > Linux, so this is probably due to some Windows misconfiguration.
    >
    > Samba version 2.2.7a is running on my linux box. This machine is
    > serving several shares which work just fine from Windows machines on the
    > same network (these machines use a straightforward, ie, not tunnelled
    > connection). I'm even able to tunnel a connection from a linux laptop
    > on a separate network via ssh. The problem occurs when trying to tunnel
    > a Samba connection from a Windows client on a separate network.
    >
    > On the Windows XP (Home Edition) machine, I've enabled NetBios over
    > TCP/IP, disabled the Server service, and disabled File and Printer
    > sharing. Using putty, I've forwarded port 139 to the linux server.
    > Additionally, I've tested the tunnel by using tcpdump on the linux
    > machine and telneting to localhost:139 on the windows box. Whatever I
    > type is successfully tunneled to the Linux box on port 139. (Hence, I'm
    > quite confident that Putty is doing what it's supposed to do.)
    >
    > I've also edited lmhosts. It now includes the line
    > 127.0.0.1 FAKENAME #PRE
    > Even after running nbtstat -R, nbtstat -c reports that there are "No
    > names in cache"!!! Additionally, net view \\127.0.0.1 and net view
    > \\FAKENAME result in System error 53. And to make matters worse,
    > running tcpdump on the Linux server shows that nothing was even sent via
    > the tunnel. Even stranger, if I add something like
    > 1.2.3.4 BOGUS #PRE
    > to lmhosts and then run nbtstat -R, now nbtstat -c reports that BOGUS
    > exists, but *STILL* shows nothing about FAKENAME. After trying a few
    > variations, it looks as if any entry in 127.0.0.0/255.0.0.0 is
    > completely ignored whereas anything else registers just fine.
    >
    > For yet another experiment, I disabled the putty port forwarding and
    > tried telneting to localhost on windows to port 139. The connection was
    > refused. So it looks like there isn't any other "interfering" service
    > running on port 139 on Windows XP.
    >
    > So it's past 1AM and I'm still stuck. It appears that Windows XP Home
    > Edition just refuses to accept any Samba connections to localhost.
    > Furthermore, it seems to ignore entries in lmhosts that refer to
    > localhost. Port forwarding looks okay, and I don't think this is a
    > samba configuration issue since no data even reaches the Linux Samba
    > server side. Additionally, I've gotten the system to work just fine
    > when using a Linux client.
    >
    > Anyway, if someone could point me in the right direction, I'd appreciate
    > it. I've spent hours on Google groups, FAQs, and miscellaneous
    > websites. Unfortunately, I've had little luck thus far.
    >
    > BTW, if you could post your reply to the newsgroup and CC msherr at cis
    > dot upenn dot edu, I'd be grateful.
    >
    > Cheers,
    > Micah Sherr
    >
    >
    > --
    > Micah Sherr
    > PhD Candidate, Computer and Information Science
    > University of Pennsylvania
    >

    Hi,

    not sure if this helps.

    I got this working today. I needed the latest dev build of putty
    from http://www.chiark.greenend.org.uk/~s.../download.html

    I then turned off samba services on my win2k pc
    net stop service

    I then forwarded port 139 to my remote linux box.

    hope this helps.

  3. Re: Tunneling samba over SSH

    In article , Ian Cole wrote:
    > In article , Micah Sherr wrote:
    >> Cheers,
    >>
    >> I've been trying in vain to access a samba server (Linux) from a Windows
    >> XP machine via SSH tunneling. I've gotten it to work from Linux to
    >> Linux, so this is probably due to some Windows misconfiguration.
    >>
    >> Samba version 2.2.7a is running on my linux box. This machine is
    >> serving several shares which work just fine from Windows machines on the
    >> same network (these machines use a straightforward, ie, not tunnelled
    >> connection). I'm even able to tunnel a connection from a linux laptop
    >> on a separate network via ssh. The problem occurs when trying to tunnel
    >> a Samba connection from a Windows client on a separate network.
    >>
    >> On the Windows XP (Home Edition) machine, I've enabled NetBios over
    >> TCP/IP, disabled the Server service, and disabled File and Printer
    >> sharing. Using putty, I've forwarded port 139 to the linux server.
    >> Additionally, I've tested the tunnel by using tcpdump on the linux
    >> machine and telneting to localhost:139 on the windows box. Whatever I
    >> type is successfully tunneled to the Linux box on port 139. (Hence, I'm
    >> quite confident that Putty is doing what it's supposed to do.)
    >>
    >> I've also edited lmhosts. It now includes the line
    >> 127.0.0.1 FAKENAME #PRE
    >> Even after running nbtstat -R, nbtstat -c reports that there are "No
    >> names in cache"!!! Additionally, net view \\127.0.0.1 and net view
    >> \\FAKENAME result in System error 53. And to make matters worse,
    >> running tcpdump on the Linux server shows that nothing was even sent via
    >> the tunnel. Even stranger, if I add something like
    >> 1.2.3.4 BOGUS #PRE
    >> to lmhosts and then run nbtstat -R, now nbtstat -c reports that BOGUS
    >> exists, but *STILL* shows nothing about FAKENAME. After trying a few
    >> variations, it looks as if any entry in 127.0.0.0/255.0.0.0 is
    >> completely ignored whereas anything else registers just fine.
    >>
    >> For yet another experiment, I disabled the putty port forwarding and
    >> tried telneting to localhost on windows to port 139. The connection was
    >> refused. So it looks like there isn't any other "interfering" service
    >> running on port 139 on Windows XP.
    >>
    >> So it's past 1AM and I'm still stuck. It appears that Windows XP Home
    >> Edition just refuses to accept any Samba connections to localhost.
    >> Furthermore, it seems to ignore entries in lmhosts that refer to
    >> localhost. Port forwarding looks okay, and I don't think this is a
    >> samba configuration issue since no data even reaches the Linux Samba
    >> server side. Additionally, I've gotten the system to work just fine
    >> when using a Linux client.
    >>
    >> Anyway, if someone could point me in the right direction, I'd appreciate
    >> it. I've spent hours on Google groups, FAQs, and miscellaneous
    >> websites. Unfortunately, I've had little luck thus far.
    >>
    >> BTW, if you could post your reply to the newsgroup and CC msherr at cis
    >> dot upenn dot edu, I'd be grateful.
    >>
    >> Cheers,
    >> Micah Sherr
    >>
    >>
    >> --
    >> Micah Sherr
    >> PhD Candidate, Computer and Information Science
    >> University of Pennsylvania
    >>

    > Hi,
    >
    > not sure if this helps.
    >
    > I got this working today. I needed the latest dev build of putty
    > from http://www.chiark.greenend.org.uk/~s.../download.html
    >
    > I then turned off samba services on my win2k pc
    > net stop service
    >
    > I then forwarded port 139 to my remote linux box.
    >
    > hope this helps.

    of course you connect using \\127.0.0.1\someNameHere


+ Reply to Thread