Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba via Internet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Tue Jun 01, 2004 6:06 pm    Post subject: Samba via Internet Reply with quote

I got Verizon DSL upload upgrade, so I want to use this upload for something.
My friend and I have lots of data, shared on individual networks by samba. He has BSD, I have gentoo. Is there a safe way of secure and fast connection of those servers.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Tue Jun 01, 2004 6:09 pm    Post subject: Reply with quote

you may be able to tunnel the smb connection over ssh (not quite sure which ports you need though) or you could set up some sort of vpn
Back to top
View user's profile Send private message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Tue Jun 01, 2004 9:17 pm    Post subject: Reply with quote

I think the port needed is 135 or 139, I always confuse both of them.
The SSH sounds like a good idea. Only one port open and it's secure.
I only wonder how to do it.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Tue Jun 01, 2004 9:29 pm    Post subject: Reply with quote

Do a google search for SSH and Port Forwarding. Basically, you want to create the SSH tunnel to the other machine then forward all requests to a pre-determined local port to the other machine's Samba port. This way, all traffic from the local port and remote Samba port goes over the SSH tunnel. I use this method to securely transmit email over IMAP without having to configure imap-ssl or even allowing IMAP access to the outside world. You can also use Squid, and be able to surf the internet from anywhere with all the traffic going over the SSH tunnel. Effectively cuts out any monitoring of web traffic.
_________________
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Tue Jun 01, 2004 9:53 pm    Post subject: Reply with quote

http://hr.uoregon.edu/davidrl/samba.html#ssh

This example is to connect to a samba server from a windows client but I just tested it quickly from one samba machine to another and it works great.

First stop Samba on one machine then from that machine
ssh -L 139:localhost:139 ip.of.other.server

and you should be able to browse the shares on the other machine, be warned it's damn slow
Back to top
View user's profile Send private message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Tue Jun 01, 2004 10:42 pm    Post subject: Automate Reply with quote

I want it to work in two ways, so both servers can share their own files in addition to those transported over SSH. But will there be conflict if one SMB server connected to another (via SSH) and still be able to share from both of them to my local LAN.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
shagrat
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 219
Location: Norway

PostPosted: Tue Jun 01, 2004 11:18 pm    Post subject: Reply with quote

I would say an FTP server would suit your needs better
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Wed Jun 02, 2004 7:00 am    Post subject: Re: Automate Reply with quote

T0M3K wrote:
I want it to work in two ways, so both servers can share their own files in addition to those transported over SSH. But will there be conflict if one SMB server connected to another (via SSH) and still be able to share from both of them to my local LAN.

This is tricky as samba and ssh will both be trying to listen to the same port. You could either get ssh to listen on a different port and use some kind of port translation to shift incoming traffic on 139 to the new port. Or you could set up some IP aliases and then make samba listen to one adaptor and ssh to another.
Back to top
View user's profile Send private message
arut8ur
n00b
n00b


Joined: 28 Jul 2003
Posts: 16

PostPosted: Wed Jun 02, 2004 3:12 pm    Post subject: Reply with quote

maybe you can use the new port microsoft-ds 445/tcp
Supported for windows 2000 and samba x.y.z

the service on this port connects direct over the TCP stream,..
NetBIOS over TCP in MS terminology,..

This is better, because it more connection oriented, and does not need so many ports,..
See the SAMBA documentation for more information
Back to top
View user's profile Send private message
jbpros
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2004
Posts: 133
Location: Brussels, Belgium

PostPosted: Wed Jun 02, 2004 3:33 pm    Post subject: Reply with quote

You may consider using VPN as previously proposed. Two years ago I was using IPsec (freeswan) between three trusted LANs. It was working well but not that easy to implement. Plus you have to consider that IPsec gateways will not see each other on the VPN (correct me if I'm wrong), thus you'll have to use one box more per LAN to handle the IPsec connection.

This solution goes maybe further than what you asked, but it allows a complete transparent implementation of samba and all other trafic between your LANs.

If some people have more recent ideas about VPN solutions I'm curious to read it :)
Back to top
View user's profile Send private message
Fitzsimmons
Guru
Guru


Joined: 01 Jan 2003
Posts: 415
Location: Waterloo, Ontario, Canada

PostPosted: Wed Jun 02, 2004 4:23 pm    Post subject: Reply with quote

shagrat wrote:
I would say an FTP server would suit your needs better


I strongly agree.
Back to top
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Wed Jun 02, 2004 4:35 pm    Post subject: Reply with quote

SSH can implement sFTP. You can use WinSCP in windows to connect, or use scp in linux.
_________________
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Back to top
View user's profile Send private message
r.j.hall
n00b
n00b


Joined: 06 Feb 2003
Posts: 53
Location: London

PostPosted: Wed Jun 02, 2004 5:21 pm    Post subject: Reply with quote

if your both running unix just give each other an account on the box and use scp or sftp to transfer files. ftp is not secure and will transmit your passwords in the cleartext. if you want to make your two networks connected for other things as well look at the frees/wan ipsec project for doing gateway to gateway encryption

http://www.linuxsecurity.com/resource_files/cryptography/ipsec-howto/HOWTO.html

you could also look here
http://www.freeswan.org/

although be aware that the frees/wan project has stopped development
_________________
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
You've read it.
You can't unread it!
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Back to top
View user's profile Send private message
Fitzsimmons
Guru
Guru


Joined: 01 Jan 2003
Posts: 415
Location: Waterloo, Ontario, Canada

PostPosted: Wed Jun 02, 2004 7:32 pm    Post subject: Reply with quote

You could also tunnel FTP through ssh or use SSL on your FTP (which I have no idea how to set up but I know it exists). On a two user basis however, just use SFTP or SCP.
Back to top
View user's profile Send private message
georwell
Guru
Guru


Joined: 25 Jun 2003
Posts: 430
Location: Uppsala, Sweden

PostPosted: Wed Jun 02, 2004 9:27 pm    Post subject: Reply with quote

openvpn is what you want. Works great using NAT too. Very simple to setup and only takes one port :) I use it all the time so my folks and grab stuff off my machine using windows networking even though I am in Sweden and them in the US.

Just set it to bridge mode and watch its magic. :)
Back to top
View user's profile Send private message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Wed Jun 02, 2004 9:48 pm    Post subject: VPN Reply with quote

FTP is out of question, because it doesn't allow easy browsing and streaming.
I don't want to use ftp on each of the computer on my lan.
VPN is very interesting. I'll take a look at it.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
Fitzsimmons
Guru
Guru


Joined: 01 Jan 2003
Posts: 415
Location: Waterloo, Ontario, Canada

PostPosted: Wed Jun 02, 2004 11:03 pm    Post subject: Re: VPN Reply with quote

T0M3K wrote:
FTP is out of question, because it doesn't allow easy browsing and streaming.


What do you mean? What is bad about ftp browsing? What is better? What do you mean by streaming?

TOM3K wrote:

I don't want to use ftp on each of the computer on my lan.


Don't. Mount local samba/nfs/whatever shares to a directory on the FTP server, and then serve that directory over the internet.
Back to top
View user's profile Send private message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Thu Jun 03, 2004 2:41 am    Post subject: Reply with quote

With ftp I cannot open music/video files and use them without downloading them locally first. That's what I mean by streaming.
So let me illustrate it.

Code:

     LAN A                 LAN B
    -------                  ---------
    |SRV A| -INTERNET TUNNEL- |SRV B|
    -------                  --------
      |    |                 |     |
      a1  a2                  b1   b2


I want computer a1/2 to be able to mount shares from srv B via samba
and computer b1/2 to be able to mount shares from srv A via samba.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
Fitzsimmons
Guru
Guru


Joined: 01 Jan 2003
Posts: 415
Location: Waterloo, Ontario, Canada

PostPosted: Thu Jun 03, 2004 2:31 pm    Post subject: Reply with quote

Actually, I think you could. You could use sys-fs/lufs. The reason I say this is because samba is incredibly slow, even over a lan, so it must be horrible over the internet. FTP is designed to go over the internet and always has been whereas samba is really only capable of going over the net because the same protocol that is used over the net happens to be the same one that is used on lans. That being said, the VPN would work, but I'm not sure how well. Is there any point in streaming your videos/music over samba if they just lag?

I'm actually kind of curious, since I have never tried out such a thing. Therefore, give the VPN a try and report back on the results/speed. Then you can have ftp or another solution if VPN isn't satisfactory.
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Thu Jun 03, 2004 6:35 pm    Post subject: the answer is Reply with quote

truely, you should use:

ftp : simple and effective, low overhead, can be accessed from litterally ANY machine anywhere you want

nfs : nfs is a stable and effictive filesystem for internet file transfers. I give the illusion of being a local directory except with slower speed

also, AFS, Coda, and Intermesso might work for you. you can run any number of these filesystem together to see whats right for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum