I checked my home IP address again today and got a very different one, and this one worked. I think it is the difference between the IP address of the individual computer vs. the IP address of the router or modem, the latter being the relevant one for connecting with NoMachine. Anyway, it works now. Thanks for your help.
Update. I managed to get into the work machine from home. Just had to restart the work machine. Still have the same problem connecting to the home machine, which is what I most want to be able to do. Restarting that hasn’t helped.