we have a Scanner that can save the scanned documents to an SMB share. So I need to switch on SMB sharing on the Mac - should be no problem.
Issue: The Mac is a MacBook, which will also be used in foreign networks - and obviously we would not want SMB sharing on outside my own network.
So, I am looking for a way to automatically start the SMB service on the MacBook only if it gets connected to a certain netowrk (ideally based on HW adress of our router, or maybe based on the IP adress is gets from the DHCP server as a fallback). The SMB serive should be stopped as soons as the network connection changes.
I am not sure if it is a good idea to fiddle with the system scripts, which might get changed by any next system update - still that might be the only option? Or is there an app that can do that? Does anyone have a better idea?