I have an issue with setting up ports for my dedicated server

I created the all kinds of possible ports in windows firewall. https://prnt.sc/GElaWaMi8BIU

I still get an error: https://prnt.sc/dZ_I37rbqRfI

Could you please help me to solve this problem? So that I can finally play with my friend without this annoying tethering distance in co-op.

I also tried to completely disable Windows Firewall, but it didn`t help. And if its important, I want to run server and play the game on the same PC.

I don’t know your setup, so I’m just guessing here.

You will most probably need to do port forwarding on your internet router settings. You have a private network at your home, so the address of your PC is not visible on the internet. If a data packet comes from the outside world, your router does not know where to send it to and just discards it.