So, let’s call your two iMacs A and B. You can connect from B to A over the Internet without any issues, but when connecting from A to B, B is never available (i.e. you’ve never successfully connected)?
If that’s the case, it sounds like a WIFI or router issue on the side of the where your iMac ‘B’ is. You can look in the client side logs for this message “‘A connection timeout has occurred while trying to connect to ‘xxxxxxxxxxxxxx’ on port ‘4000’. The issue could either be caused by a networking problem, by a firewall or NAT blocking incoming traffic or by a wrong server address. Please verify your configuration and try again.’”
Please try the tips in the following article: https://www.nomachine.com/AR11L00827