What ports to open/close on farmer and harvester?

I’m not great with networking but I’m figuring it out as I go. I’ve been struggling with warnings on my farmer for quite a while and I wanted to verify exactly what ports I should have open and closed to remove that variable from the equation. I have a full node running the gui, and a local harvester (connected via ethernet to the same router as my farmer) running from powershell. Both on win. 10. UPNP is “false” in my harvester config and “true” for my farmer. Can someone more knowledgeable than I confirm if the bullet points below are correct? I would be very grateful.

  • Port 8444 open on my FARMER for inbound and outbound traffic, and that only needs to be for my public ip (that port is not used for communication locally between my farmer and harvester correct?).

  • Port 8444 closed on my HARVESTER inbound and outbound locally and publicly.

  • Port 8447 open on my FARMER AND HARVESTER for inbound and outbound traffic, and only locally so my farmer and harvester can communicate.

I’ll figure out how to open/close them on my own and verify I did it correctly. I really need/want to learn about that anyway, I figured out port forwarding and allowing/blocking ports and programs in windows defender but that’s about it so far.
If my understanding of this is way off someone please let me know. Thank you.

Other than the usual port 8444, if you’re planning to farm on another machine, the harvester, in the same network, all you have to do is make sure port 8447 doesn’t get block by the firewall on the full node (farmer) machine.

And that’s about it. In fact, you don’t need to open any port on the harvester at all since you’re not syncing with the full node.

1 Like

Port 8447 doesn’t need to be open on the harvester?

Yes, it doesn’t need to.

To be more precise, the harvester only need to know the farmer IP. And by default, the farmer open port 8447 for the harvester connection. But the farmer’s firewall can get in the way. You only have to look at the firewall and make sure that it doesn’t block port 8447.

There’s no easy way to check if your harvesters are working right in the GUI. However, you can check whether your farmer is farming with harvesters’ plots using this command:

./chia farm summary

1 Like

Okay, I think I get it. Thank you for the help.

1 Like

Typically there are no outbound (egress) rules in place on host firewalls. So the firewall on the harvester will let it make any connection it wants (say to the farmer). These are TCP (not UDP) connections, which means they are “stateful” - the firewall sees the start of the connection and allows return traffic automatically.

1 Like

What warnings are you getting?

After my farmer runs for a few hours I start getting these warnings in my logs multiple times a minute and can’t find a solid answer on what is causing it, or if it really even has a meaningful impact.

2021-07-18T13:40:29.253 full_node chia.rpc.rpc_server     : WARNING  Sending data failed. Exception Traceback (most recent call last):
  File "chia\rpc\rpc_server.py", line 67, in _state_changed
  File "aiohttp\client_ws.py", line 150, in send_str
  File "aiohttp\http_websocket.py", line 687, in send
  File "aiohttp\http_websocket.py", line 643, in _send_frame
  File "aiohttp\http_websocket.py", line 660, in _write
ConnectionResetError: Cannot write to closing transport

Thanks, I will try that command after my current plots finish.
I do have a question though, if I use a port checker website on my farmer pc it shows port 8444 open, and 8447 closed. The the communication through port 8447 is only local and not external so that doesn’t matter correct? In other words, am I correct in saying my farmer is not using 8447 for communication over the internet, but only to talk locally to my harvester?

Both of your understandings are correct. Port 8447 is only used for local communication between your farmer and harvesters. It doesn’t need to be opened for over the internet communication, thus it remained close when you checked on the port checker website.

Only your farmer is doing the communication over the internet since it’s the only machine that syncs to the full node. Otherwise, it wouldn’t be able to farm.

1 Like

Great, thank you for the clarification.

1 Like

allow TCP 8444 on the Router