You are not logged in.

#1 2021-09-03 07:35:25

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Samba over the internet [SOLVED]

I have tried for hours, I port forwarded, everything seems to be right, I can access my samba server locally (within my LAN), but my friend can't access it over the internet.  Can someone help?  I have no clue where to start debugging with this.

Last edited by Sanikdah (2021-09-04 21:27:37)

Offline

#2 2021-09-03 08:27:17

solskog
Member
Registered: 2020-09-05
Posts: 413

Re: Samba over the internet [SOLVED]

I wouldn't consider SAMBA over internet (often with high latency and jitter) a secure nor efficient solution!
Why not try setup VPN instead? wireguard is much more efficient and secure.
https://wiki.archlinux.org/title/WireGuard

Offline

#3 2021-09-03 14:35:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: Samba over the internet [SOLVED]

I agree with solskog.  The idea of exposing Samba to the public Internet is terrifying.  So much so, I would not be surprised if your ISP is blocking it.

Maybe this is an XY problem.  What is it you are trying to do?  Share files with your friend?  If that is the goal, I would highly recommend using sftp (https://wiki.archlinux.org/title/SCP_and_SFTP)
If your friend is not using Windows, there are some excellent tools they can use, such as WinSCP

Or, is there a solid use case for SMB?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2021-09-03 15:09:36

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Re: Samba over the internet [SOLVED]

My reason is because I want to be able to use VS Code with them, which would only work with a mounted network share, or a physical folder/files on the drive that are somehow synced between computers.  At least, those are the only ways I'm aware of, if there is a way to set that up with anything other than samba (which, yes, I am very well aware of the security risks of opening to the public are), I'm more than open to set it up.  I have already port forwarded ports 137, 138, 139 (NETBIOS), and Port 445 (The actual sharing port), and as a test I even disabled my router's firewall, but when that didn't work, I DID turn it back on.

Offline

#5 2021-09-03 15:13:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: Samba over the internet [SOLVED]


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2021-09-03 15:24:40

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Re: Samba over the internet [SOLVED]

Could that be mounted?  Because I do have an ssh server set up already.

Offline

#7 2021-09-03 15:28:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: Samba over the internet [SOLVED]

Yes.  I use it on my LAN to mount the drive attached to the USB port on my router (my version of NAT).
There is no reason this would not work from the Internet side, I just have never tried it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2021-09-03 15:59:30

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: Samba over the internet [SOLVED]

If your friend uses windows, they can try sshfs-win: https://github.com/billziss-gh/sshfs-win (there are also two GUI frontends available)

Last edited by progandy (2021-09-03 16:02:02)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#9 2021-09-03 23:54:22

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Re: Samba over the internet [SOLVED]

Hmm, my friend also uses arch, so I'm gonna assume that this would also work on it as a client too?
They already have ssh installed because I had them ssh into my PC a while ago.
(Sorry for taking so long to respond btw, I was at school)

Offline

#10 2021-09-04 02:25:39

solskog
Member
Registered: 2020-09-05
Posts: 413

Re: Samba over the internet [SOLVED]

Sanikdah wrote:

My reason is because I want to be able to use VS Code with them, which would only work with a mounted network share, or a physical folder/files on the drive that are somehow synced between computers.

VPN/WireGuard + NFS could also be a candidate for your use case. And A git server is often more suited for collaborate software projects.
https://wiki.archlinux.org/title/Git_server

Last edited by solskog (2021-09-04 03:27:25)

Offline

#11 2021-09-04 04:06:32

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Re: Samba over the internet [SOLVED]

And my friend would be able to use VS Code with that?  (Also sorry if I'm being a little dumb with some of this stuff, fairly new to these things.)

Offline

#12 2021-09-04 05:46:01

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Re: Samba over the internet [SOLVED]

Just got it set up, VS Code doesn't seem to like it because it seems like it just made a symlink or something, but it gave this:
"Path does not exist"
"The path '/mnt/sshfs/SanikPC' does not exist on this computer."

Offline

#13 2021-09-04 07:29:37

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: Samba over the internet [SOLVED]

Just got it set up

Let's see...

mount
ls /mnt/sshfs

sshfs is transparent, unless clients explicitly check the FS type, a ssfs mount looks like a random local path.

Offline

#14 2021-09-04 19:52:22

Sanikdah
Member
Registered: 2021-09-03
Posts: 7

Re: Samba over the internet [SOLVED]

Just got it working yesterday right before I went to bed, ended up using a totally different syncing method.  How do I close the topic?

Offline

#15 2021-09-04 19:56:58

seth
Member
Registered: 2012-09-03
Posts: 50,924

Re: Samba over the internet [SOLVED]

Edit your initial post and alter the subject - add eg. [SOLVED]

Offline

Board footer

Powered by FluxBB