VNC behind Firewall or Router

Using VNC behind a firewall or a NAT router without public IP available can be a huge challenge for remote control and maintenance tasks. As local networks operate on their own network address space, these IP network addresses are not known to the public Internet and therefore not directly accessible from outside the private network of your company. Typically, companies access and route the Internet connection for their private networks over a single Router/Gateway and Firewall which receives a permanent or a dynamically changing public IP address. This means that a PC with a private network address within your company is able to access any public IP address within the Internet by routing over your companies public IP Gateway/Router, but the other way its not possible to directly access the private IP address within your companies network.

VNC How to access behind Router Firewall

Generally its impossible to directly access a VNC server running behind a Firewall or a NAT Router, but there are several technical possibilities to overcome this challenge.

Port Forwarding

A common method that is used for many different remote access purposes, such as accessing a private address of your webcam from all over the world, is to configure port forwarding on your router/gateway. Port forwarding allows remote computers (for example, computers on the Internet) to connect to a specific computer or service within a private local-area network (LAN). In a typical private network, computers obtain Internet access through a DSL or cable modem connected to a router or network address translator (NAT/NAPT). Hosts on the private network are connected to an Ethernet switch or communicate via a wireless LAN. The NAT device’s external interface is configured with a public IP address. The computers behind the router, on the other hand, are invisible to hosts on the Internet as they each communicate only with a private IP address.

vnc port forwarding

When configuring port forwarding, the network administrator sets aside one port number on the gateway for the exclusive use of communicating with a service in the private network, located on a specific host. External hosts must know this port number and the address of the gateway to communicate with the network-internal service. Often, the port numbers of well-known Internet services, such as port number 80 for web services (HTTP), are used in port forwarding, so that common Internet services may be implemented on hosts within private networks.

Listening VNC Client with public IP

By triggering the connection from inside a private network it is possible to establish a connection to a waiting (listening mode) vnc viewer. With UltraVNC for example you can start the viewer in listening mode by typing ultravnc.exe -listen. The constraint for accessing a listening vnc viewer is of course that the network address of the viewer can be accessed by the server. So the vnc viewer  has to run on a public IP address.

Public VNC Repeater:

The same way as Skype or TeamViewer are operating is also possible in combination with VNC. Skype and TeamViewer are routing both connections over a central, globally available server with public IP address. So both sides, the server as well as the client can operate on private IP addresses and connect to each other by using the central server. Within the VNC world this concept/software is called a VNC repeater server. VNC repeater servers are responsible for accepting both connections from VNC clients as well as from VNC servers. Typically the VNC repeater accepts VNC clients/viewers on port 5900 and connections coming from your VNC server on port 5500. Both sides have to agree on a common connection ID in order to enable the VNC repeater to distinguise which viewer connection should be connected with which server connection.

vnc repeater

You can find free implementations for VNC repeater software from UltraVNC and another implementation on Google Code.

If you are operating a remote maintenance service its strongly advised to setup your own VNC repeater on your own publicly accessable server!

There are also some free VNC repeaters running online, where you can start to test out such a scenario without setting up your own VNC repeater: http://repeaters.ultravnc.info/

MobileVNC Repeater Autoconnect Support
MobileVNC, Windows CE and Windows Embedded Compact VNC Server also supports the automatic reconnect to listening VNC viewers or to VNC Repeaters.


364 comments

  • I do agree with all of the ideas you’ve presented in your post. They’re really convincing and can certainly work. Still, the posts are very quick for beginners. May just you please extend them a little from subsequent time? Thanks for the post.

  • First of all I want to say awesome blog! I had a quick question in which I’d like to ask if you do not mind. I was interested to find out how you center yourself and clear your mind before writing. I’ve had trouble clearing my mind in getting my thoughts out there. I truly do enjoy writing but it just seems like the first 10 to 15 minutes tend to be lost just trying to figure out how to begin. Any recommendations or hints? Kudos!

  • hey there and thank you for your info – I have definitely picked up anything new from right here. I did however expertise several technical issues using this site, since I experienced to reload the website many times previous to I could get it to load correctly. I had been wondering if your web hosting is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and could damage your high quality score if ads and marketing with Adwords. Anyway I am adding this RSS to my e-mail and can look out for much more of your respective intriguing content. Make sure you update this again very soon.

  • Great post. I used to be checking constantly this blog and I’m impressed! Extremely useful information particularly the remaining section 🙂 I take care of such info much. I was looking for this particular info for a long time. Thanks and best of luck.

  • Hi, Neat post. There is an issue along with your website in web explorer, could check this? IE still is the market leader and a large element of other people will omit your wonderful writing because of this problem.

  • It is actually a great and helpful piece of information. I am glad that you just shared this useful information with us. Please keep us informed like this. Thank you for sharing.

  • Hi there! I know this is sort of off-topic but I needed to ask. Does building a well-established website such as yours take a large amount of work? I’m brand new to running a blog but I do write in my diary every day. I’d like to start a blog so I will be able to share my personal experience and views online. Please let me know if you have any suggestions or tips for brand new aspiring bloggers. Thankyou!

  • Definitely believe that which you stated. Your favorite justification seemed to be at the web the simplest factor to understand of. I say to you, I definitely get irked even as other folks think about concerns that they just don’t understand about. You managed to hit the nail upon the top and defined out the entire thing without having side effect , other folks can take a signal. Will probably be again to get more. Thank you

  • Have you ever thought about creating an ebook or guest authoring on other blogs? I have a blog centered on the same topics you discuss and would love to have you share some stories/information. I know my visitors would appreciate your work. If you are even remotely interested, feel free to shoot me an e-mail.

  • I think this is one of the most significant information for me. And i am glad reading your article. But wanna remark on some general things, The site style is wonderful, the articles is really great : D. Good job, cheers

  • Thanks for every other informative site. Where else may I am getting that type of information written in such an ideal approach? I have a mission that I’m simply now operating on, and I have been at the glance out for such info.

  • Oh my goodness! Impressive article dude! Thank you so much, However I am having problems with your RSS. I don’t know why I cannot subscribe to it. Is there anyone else having similar RSS problems? Anybody who knows the solution can you kindly respond? Thanks!!

  • Hello guys!
    I came across a 110 useful website that I think you should take a look at.
    This platform is packed with a lot of useful information that you might find valuable.
    It has everything you could possibly need, so be sure to give it a visit!
    [url=https://www.thetalka.org/understanding-the-ethics-of-in-game-purchases-balancing-profit-and-player-experience/]https://www.thetalka.org/understanding-the-ethics-of-in-game-purchases-balancing-profit-and-player-experience/[/url]

  • Wonderful blog! I found it while searching on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Thank you

  • Do you have a spam issue on this website; I also am a blogger, and I was wondering your situation; we have created some nice methods and we are looking to trade methods with others, be sure to shoot me an email if interested.

  • I know this if off topic but I’m looking into starting my own blog and was wondering what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web savvy so I’m not 100% certain. Any suggestions or advice would be greatly appreciated. Thank you

  • hi!,I love your writing so so much! percentage we keep up a correspondence more about your post on AOL? I require an expert in this area to unravel my problem. May be that’s you! Having a look forward to see you.

  • Yesterday, while I was at work, my sister stole my apple ipad and tested to see if it can survive a 25 foot drop, just so she can be a youtube sensation. My apple ipad is now broken and she has 83 views. I know this is totally off topic but I had to share it with someone!

  • Great goods from you, man. I’ve understand your stuff previous to and you are just extremely wonderful. I really like what you’ve acquired here, really like what you’re saying and the way in which you say it. You make it enjoyable and you still care for to keep it wise. I can’t wait to read far more from you. This is actually a tremendous website.

  • Hmm it seems like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to everything. Do you have any helpful hints for first-time blog writers? I’d certainly appreciate it.

Leave a Reply

Your email address will not be published. Required fields are marked *