Even when you are inside your LAN, if the machine name resolves to a public IP address you should connect to you modem and from there connect to your internal machine. Granted it means you are going out onto the public internet and back into your own network which will involve a few miliseconds more latency (and add to your download limit if you have a capped connection) but in general it should work. If it doesn't work, it's most likely because the loopback interface is not enabled on your router which is preventing internal connections from being routed back into your internal network via the WAN interface. If your router supports a loopback interface enable it and see if you can access your internal workstation via it's hostname (without using /etc/hosts).