Comments
Please visit the following link:
http://www.vbforums.com/showthread.php?t=403336
Posted by sagitraz
If gethostname fails suspect there's a NAT box between you and the rest of the world. NAT is often implemented in a firewall and folks who are behind a NAT box cannot see the external address because all incoming addresses in packet headers are translated.
Posted by suresh123