LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2024, 11:33 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 567

Rep: Reputation: 10
Post Samba and Internet


Hello,
Is it possible to share a file to download on the Internet through Samba?

Thank you.
 
Old 01-04-2024, 12:08 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
Yes, but ISPs usually block SMB traffic on the standard ports. Depends on what version of samba or smb is running on the clients and server.

SMB version 3+ encrypts traffic but you need to specifically configure the server to do so as far as I know i.e. if you are concerned about security.

It isn't something that I would do.
 
Old 01-04-2024, 12:28 PM   #3
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 798

Rep: Reputation: 256Reputation: 256Reputation: 256
Yes. My ISP blocks ip4 but not ip6 connections to the Windows/SMB/CIFS service ports. I think you can run Samba on another port. Two Linux boxes should be able to work around blocked ports but it might be harder to do this if Windows is on the other end.
 
Old 01-04-2024, 01:31 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,019

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
You usually need to set up a GRE tunnel.

There are secure ftp ways.

Depending on use somethings like Jellyfin, Emby, Plex or such.\

Some hopefully updated routers allow different connections.

I forget where the Stunnel doc is.

Last edited by jefro; 01-04-2024 at 01:33 PM.
 
Old 01-04-2024, 01:36 PM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,762

Rep: Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763
While it is certainly POSSIBLE it is strongly recommended against, even by Microsoft. SMB/CIFS (used by Windows share and SAMBA) is not a secure protocol by modern standards, and opens you up to exploit of protocol vulnerabilities.

It is fairly easy to do limited sharing of files using https, sftp, or other secured protocols, but even better is to use free cloud services so that your LOCAL machine is not the one at risk.
 
Old 01-08-2024, 04:48 AM   #6
Jason.nix
Member
 
Registered: Feb 2023
Posts: 567

Original Poster
Rep: Reputation: 10
Hello,
Thanks for all the replies.
I don't want this to be permanent. For a limited time only. I want to give the other party an address like MY_IP/Directory/File.zip and he\she can download the file. It does the same thing as a web server and FTP server do, but without the web server and FTP server.
 
Old 01-08-2024, 08:24 AM   #7
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by Jason.nix View Post
Hello,
Thanks for all the replies.
I don't want this to be permanent. For a limited time only. I want to give the other party an address like MY_IP/Directory/File.zip and he\she can download the file. It does the same thing as a web server and FTP server do, but without the web server and FTP server.
The short answer is no, you can't do this. And you shouldn't even if you could.

As noted already, this protocol is not secure enough for the open internet. There are ways to secure it, via an encrypted tunnel or VPN or something, but these solutions will all be more complex than just a simple web server or (s)ftp server.

The big problem with trying to do this, as noted, is that most internet service providers will block the required port. The other party is also behind a router/firewall/service provider which will likely block the required port. There are ways to get around this, but it'll be way more complicated than just a simple web server or (s)ftp server.
 
1 members found this post helpful.
Old 01-08-2024, 02:23 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,748

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Sounds like something for Dropbox or other cloud-sharing service.
 
Old 01-08-2024, 02:53 PM   #9
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 579

Rep: Reputation: Disabled
As mentioned by everybody in this thread, opening samba to the world will bring trouble due to its weaknesses.
There is a way to transfer files and it is via scp.
 
Old 01-08-2024, 03:53 PM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,471
Blog Entries: 7

Rep: Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572
For a one-off transfer, it'd be best to use a cloud-based service. There are many to choose from.
 
Old 01-11-2024, 02:07 AM   #11
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,167

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Lightbulb

Quote:
Originally Posted by scasey View Post
Sounds like something for Dropbox or other cloud-sharing service.
Agree with this, a cloud-sharing service will serve the task. Drop-box, OneDrive, Google Drive.

Or do Teamviewer session and Transfer the file via Teamviewer, might be slower though.
 
Old 01-11-2024, 12:46 PM   #12
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 798

Rep: Reputation: 256Reputation: 256Reputation: 256
Thumbs down

Quote:
Originally Posted by JJJCR View Post
Drop-box, OneDrive, Google Drive.
Teamviewer session and Transfer the file via Teamviewer
For a single file transfer? That's like getting a bulldozer to scrape a piece of gum off a sidewalk. And in the case of Google, the bulldozer driver wants to level your house instead because he wants to be the only one with houses. What happened to DIY and not relying on mega-corps?
 
1 members found this post helpful.
Old 01-11-2024, 01:36 PM   #13
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by jayjwa View Post
For a single file transfer? That's like getting a bulldozer to scrape a piece of gum off a sidewalk. And in the case of Google, the bulldozer driver wants to level your house instead because he wants to be the only one with houses. What happened to DIY and not relying on mega-corps?
Have you got a DIY suggestion?

I made mention of a "simple" web server or (s)ftp server, but I only claimed that it was less complex than setting up a secure tunnel for using Samba.

But in truth, setting up a simple web server or (s)ftp server isn't entirely trivial either. I mean ... it can be, if you already have a linux server deployed out there somewhere. It can be easy as pie like that.

But if not, using someone else's web server (like Google's) can save a lot of headaches just for the occasional file transfer to/from a paying client.
 
Old 01-11-2024, 03:04 PM   #14
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,471
Blog Entries: 7

Rep: Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572Reputation: 2572
Quote:
Originally Posted by jayjwa View Post
For a single file transfer? That's like getting a bulldozer to scrape a piece of gum off a sidewalk.
Every other solution outside of 'sneaker net' is extremely risky because they involve opening ports and exposing a machine to the open internet. Not something I'd advise anyone to do, let alone someone who doesn't know how. And I mean, who doesn't have a gmail account these days?
Quote:
Originally Posted by jayjwa View Post
What happened to DIY and not relying on mega-corps?
Posted from Windows.
 
Old 01-11-2024, 08:47 PM   #15
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,167

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Cool

Quote:
Originally Posted by jayjwa View Post
For a single file transfer? That's like getting a bulldozer to scrape a piece of gum off a sidewalk. And in the case of Google, the bulldozer driver wants to level your house instead because he wants to be the only one with houses. What happened to DIY and not relying on mega-corps?
KISS method I believe still fine. Keep It Simple SysAdmin..

Of course, it's your preference on how things should be done.

Time is the most expensive resource here on earth. Once its gone, it's gone.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Yum Install samba "No package samba available" "No package samba-client available." young redhat Linux - Software 8 04-16-2019 08:05 PM
sharing internet but samba doesnt work, turn filewall off samba works but net isnt Jungle_King Linux - Networking 2 05-08-2009 07:00 AM
samba does not create "samba/netlogon" and "samba/profiles" mianmajidali Linux - Server 0 04-27-2008 05:07 AM
Samba Samba Samba Bear Linux - Networking 9 01-30-2003 07:30 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration