Logmein is a great little app, which bypasses all the mess. If you like the mess and you are an IT person who wants to connect remotely the hard way just because then read on.
First, you are going to have to determine your public IP. If you have a home internet provider like AT&T DSL/Cable, then you will probably not have multiple public IPs assigned to your network. You have 1 public IP which is the one that goes to your DSL modem/router. I have an Actiontec router. To determine your public IP, go to http://www.whatismyip.com/.
Now, you want to assign a domain name to redirect to that public IP address. To create that mapping, go to http://www.dyndns.com/ and register.
Third, you are going to need to install a VNC server on the computer you want to remote into and a VNC client on the client computer that you are going to connect from. I use http://www.tightvnc.com/.
Fourth, you need to create a firewall rule or port forward all traffic from the Cable/DSL modem/router to the computer on your network that you want to remote into (use it’s local machine name or private IP such as 192.168.x.x).
Using the TightVNC client, you can connect over port 5900. From a web browser, you can connect over port 5800.
Remember, you can test locally using the machine name plus port 5800 — http:\machine_name:5800
Or you can connect via the VNC client. To test the public address, you must be connected from outside your home (ie Starbucks). It will look something like machine_name.dyndns.org:5800 from a web browser or port 5900 from a VNC client.