How to open ports for Warpinator

I am trying to use Warpinator to transfer files to/from a Linux Mint machine. Warpinator is installed in both machines and launches. The Warpinator group code is set the same in both machines, and they use the same port numbers. The Linux Mint machine sees the NixOS machine but can’t connect. The NixOS machine does not see another computer.

This is in the configuration.nix file:

networking.firewall = {
  enable = true;
  allowedTCPPorts = [ 42000 42001 ];
};

nmap -p 42000 portquiz.net
says the port is closed.

I assume I need to specify something else. What?

Try this one:

  networking.firewall = {
    allowedTCPPortRanges = [
      { from = 42000; to = 42001; }
    ];
  };

Thanks for the reply, but nothing changed.