Scenario: two home networks on two different ISP modem routers. One (TalkTalk, hers) on 192.168.1.x and the other (Plusnet, mine)192.168.2.x Raspberry Pi with USB hdd for NAS storage and want the NAS file server available from both networks. Don't want other network traffic between the subnets to avoid possible DHCP server conflicts.
Here's how I got it to work...
A Raspberry Pi 4 (i.e. with both Ethernet and WiFi) and USB hdd for the NAS storage. Connect the Ethernet port to my network.
(I did all the setup over VNC, could have done with local KB & Display or presumably over ssh)
Set up Pi NIC interfaces using nmtui as follows:
Ethernet
LAN ETH0 fixed IP 192.168.2.8
Netmask 255.255.255.0
Gateway 192.168.2.254 (my ISP’s modem router)
DNS 1.1.1.1 & 1.0.0.1 (or your choice of DNS)
Ignore automatic DNS parameters (Just in case, DHCP range starts .100 anyway)
Require IPv4
IPv6 disabled
Automatically connect
Available all users
WiFi
[set ssid, security, etc a/r]
WiFi WLAN0 192.168.1.8 (DHCP range starts at .10)
Netmask 255.255.255.0
Gateway (blank) ***needed to remove gateway to get it to work - probably they squabble otherwise - dunno***
DNS (blank)
Ignore automatic DNS parameters
Require IPv4
IPv6 disabled
Automatically connect
Available all users
(My Guess: It probably doesn't need a gateway or DNS at all as all traffic comes straight from clients on the subnet and back to them)
After a restart we now have the Pi Ethernet connected to my network and its WiFi connected to hers.
Install Samba
Edit /etc/samba/smb.conf
server string = %h
wins support = yes
netbios name=pi4 (or whatever)
dns proxy = no
encrypt passwords = yes
###Need the line below to make it work. Dunno why###
server min protocol = NT1
comment out the [homes] [nobody] [printers] and [print$] shares as we don't want to share them.
add a share for the NAS
[pi4-nas]
comment = pi4-nas
#700GB USB drive, specified by mount path
path = /media/pi4/700GB-USB3/shared
writeable = yes
browsable = yes
read only = no
guest ok = yes
guest only = yes
create mask=0777
force create mode=0777
directory mask=0777
force directory mode=0777
force user = pi4
Add a crontab job to reboot at 0200 each day (just seemed a good idea to keep it fresh)
That’s it. Took MUCH longer to do than to write. And much interwebs searching. But it now works with all the devices I've tried, Linux 32 & 64 bit Mints, Win 11, Android phone, even a Win 95 VM under Linux. And I can do backup over the network if I mount the NAS share to /mnt/samba_share (it complains about symlinks without this mount).
One final subtlety: to get 777 permissions for a fat32 vfat mount you need to mount it using fstab with umask=000
Hope this is of use to someone somewhere sometime...
And now I can get back to my life![Wink ;-)]()
Here's how I got it to work...
A Raspberry Pi 4 (i.e. with both Ethernet and WiFi) and USB hdd for the NAS storage. Connect the Ethernet port to my network.
(I did all the setup over VNC, could have done with local KB & Display or presumably over ssh)
Set up Pi NIC interfaces using nmtui as follows:
Ethernet
LAN ETH0 fixed IP 192.168.2.8
Netmask 255.255.255.0
Gateway 192.168.2.254 (my ISP’s modem router)
DNS 1.1.1.1 & 1.0.0.1 (or your choice of DNS)
Ignore automatic DNS parameters (Just in case, DHCP range starts .100 anyway)
Require IPv4
IPv6 disabled
Automatically connect
Available all users
WiFi
[set ssid, security, etc a/r]
WiFi WLAN0 192.168.1.8 (DHCP range starts at .10)
Netmask 255.255.255.0
Gateway (blank) ***needed to remove gateway to get it to work - probably they squabble otherwise - dunno***
DNS (blank)
Ignore automatic DNS parameters
Require IPv4
IPv6 disabled
Automatically connect
Available all users
(My Guess: It probably doesn't need a gateway or DNS at all as all traffic comes straight from clients on the subnet and back to them)
After a restart we now have the Pi Ethernet connected to my network and its WiFi connected to hers.
Install Samba
Edit /etc/samba/smb.conf
server string = %h
wins support = yes
netbios name=pi4 (or whatever)
dns proxy = no
encrypt passwords = yes
###Need the line below to make it work. Dunno why###
server min protocol = NT1
comment out the [homes] [nobody] [printers] and [print$] shares as we don't want to share them.
add a share for the NAS
[pi4-nas]
comment = pi4-nas
#700GB USB drive, specified by mount path
path = /media/pi4/700GB-USB3/shared
writeable = yes
browsable = yes
read only = no
guest ok = yes
guest only = yes
create mask=0777
force create mode=0777
directory mask=0777
force directory mode=0777
force user = pi4
Add a crontab job to reboot at 0200 each day (just seemed a good idea to keep it fresh)
That’s it. Took MUCH longer to do than to write. And much interwebs searching. But it now works with all the devices I've tried, Linux 32 & 64 bit Mints, Win 11, Android phone, even a Win 95 VM under Linux. And I can do backup over the network if I mount the NAS share to /mnt/samba_share (it complains about symlinks without this mount).
One final subtlety: to get 777 permissions for a fat32 vfat mount you need to mount it using fstab with umask=000
Hope this is of use to someone somewhere sometime...
And now I can get back to my life
Statistics: Posted by Schlartibardfast — Mon Dec 08, 2025 1:30 pm