Hi ondesic, The fundamentals of UDP and TCP requires a port.
so you have to use a port no matter if it is on local or external.
A port can still be blocked "locally" by a firewall, for example windows firewall or a users antivirus's software firewall.
Usually when your game tries to use a networking features, windows or your antivirus software firewall will pop up with a window asking the user to allow the app / game to be allowed access through the firewall.
But yes, as long as they are using the same port number, they should communicate.