Use SMB with WAN

I have install OpenWrt on my Nexx WT3020F and config it for share USB content by Samba (https://openwrt.org/docs/guide-user/services/nas/usb-storage-samba-webinterface).

I have connect the device to my network by WIFI, so I have set firewall to have access to LuCI by WAN.

Now I'd like set OpenWrt to share USB content (with Samba) by WAN, if I use a LAN cable to connect the device with my PC I have see the shared content by if I try to use WAN (withou LAN cable) I can see LuCI interface but not USB content.

Can you help me? (note I'm not an expert, this is my second time with OpenWRT)

Not recommended. Some ISPs filter ports and beside that you MUST at least use smb >=V3.0. Also accessing luci over internet without https is a no go. Aside that long and complex password absolutly required.

Tunnel it over VPN just like everyone else does

I want use it only on locale network (home network) wthout any accese from external.
In this moment samba doen't work if connect nexx by WiFi on my network. It works only if I connect the nexx by cable with a PC. In this way I can sede Giles by samba bit only from this PC.

you also have to setup a rule allowing acces to samba on tcp-port 445

I also think it's a port problem.
I thought I had opened the ports 137, 138, 139 and 445 for WLAN interface (https://openwrt.org/docs/guide-user/services/nas/cifs.server)
But if I test it FING (android app) they are closed, so you could explain to me how to open the ports for WLAN interface?

k, see: https://openwrt.org/docs/guide-user/services/nas/samba
you will also have to include wan/wifi interface in sama configline

1 Like

sshfs a little more complex to setup initially.... but once done.... pretty damn simple!

OK, I've made some progress.
Now see my Nexx from my PC between Wifi connect. I can see also samba share folder and open it but it's empty, there are not USB files.

This is my /etc/config/fstab:

config global
	option anon_swap '0'
	option anon_mount '0'
	option auto_swap '1'
	option auto_mount '1'
	option delay_root '5'
	option check_fs '0'

config mount
	option enabled '1'
	option uuid '7EF3-9D8F'
	option target '/mnt/sda1'

And this is my /etc/config/samba file:

config samba
	option name 'OpenWrt'
	option workgroup 'WORKGROUP'
	option description 'OpenWrt'
	option interface 'LAN WAN MARTIN_7490_NEXX'
	option homes '0'

config sambashare
	option browseable 'yes'
	option read_only 'no'
	option guest_ok 'yes'
	option name 'Database'
	option create_mask '0700'
	option dir_mask '0700'
	option path '/mnt/sda1'

Does mount show it mounted where you expect it?

This symptom is usually indicative of a permission or path issue on the underlying filesystem / usermap.

I'm not sure the problem is a permission.
I have try to use WinSCP, inside mtn there is the folder sda1 but this folder is empty. I think I should see the USB content inside sda1, right?

I have also try to change /etc/config/fstab with:

config global
	option anon_swap '0'
	option anon_mount '0'
	option auto_swap '1'
	option auto_mount '1'
	option delay_root '5'
	option check_fs '0'

config mount
	option device '/dev/sda1'
	option target '/mnt/sda1'
	option enabled '1'

but nothing change.
The USB has a FAT32 file fystem.

Any suggestion?

OK I think I have solve it after install kmod-fs-vfat

@array81
Can you please help me to solving it?
I have the sam Nexx_WT3020F, installed OpenWRT, "Scaned" for my WIFI, connected it.
If i give IP on browser, LuCi comes up, but my "share" only with "LAN" cable is showing in my win-explorer...

How you solve it??

The problem is the interface for samba use. By default, samba works only on LAN interface, you must add WIFI interface (WLAN or WAN).
I have not found a way to do it by LuCi. You musr edit /etc/config/samba

@array81
Can you please make a screenshot of your "Interfaces" in Openwrt, and post your "etc/config/samba"?
So i can see how it works for you?
Cause i edited 1000x the config with my interfaces, but i can´t make it work....

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.