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.


657 comments

  • Greate post. Keep writing such kind of information on your blog. Im really impressed by your site.
    Hi there, You have performed a fantastic job. I will certainly digg it and personally suggest to my friends. I’m confident they’ll be benefited from this site.

  • I was recommended this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are incredible! Thanks!

  • Fantastic beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog website? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear idea

  • Hi! This is my 1st comment here so I just wanted to give a quick shout out and say I really enjoy reading through your articles. Can you suggest any other blogs/websites/forums that go over the same topics? Thanks a lot!

  • I am extremely inspired with your writing talents and also with the layout on your blog. Is this a paid topic or did you customize it yourself? Either way stay up the nice quality writing, it is uncommon to peer a great blog like this one today..

  • Hello just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Chrome. I’m not sure if this is a format issue or something to do with browser compatibility but I thought I’d post to let you know. The style and design look great though! Hope you get the problem fixed soon. Thanks

  • I have been exploring for a bit for any high-quality articles or blog posts on this sort of space . Exploring in Yahoo I eventually stumbled upon this site. Studying this information So i’m happy to show that I have a very good uncanny feeling I found out just what I needed. I so much undoubtedly will make sure to don?t fail to remember this web site and give it a look on a continuing basis.

  • Does your blog have a contact page? I’m having a tough time locating it but, I’d like to send you an email. I’ve got some recommendations for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it grow over time.

  • Great blog you have here but I was curious about if you knew of any discussion boards that cover the same topics discussed in this article? I’d really love to be a part of group where I can get suggestions from other experienced individuals that share the same interest. If you have any suggestions, please let me know. Many thanks!

  • An impressive share! I’ve just forwarded this onto a coworker who has been conducting a little homework on this. And he in fact bought me lunch simply because I stumbled upon it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanx for spending the time to talk about this matter here on your website.

  • I blog often and I genuinely appreciate your content. The article has really peaked my interest. I will bookmark your website and keep checking for new details about once per week. I subscribed to your RSS feed too.

  • Hello! I know this is kind of off topic but I was wondering which blog platform are you using for this site? I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.

  • Do you have a spam problem on this blog; I also am a blogger, and I was wanting to know your situation; we have created some nice practices and we are looking to trade techniques with other folks, be sure to shoot me an e-mail if interested.

  • First off I want to say fantastic blog! I had a quick question in which I’d like to ask if you don’t mind. I was interested to know how you center yourself and clear your mind before writing. I’ve had a difficult time clearing my thoughts in getting my thoughts out. I 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 ideas or hints? Thanks!

  • Howdy! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success. If you know of any please share. Many thanks!

  • Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your weblog? My website is in the very same niche as yours and my users would genuinely benefit from a lot of the information you present here. Please let me know if this okay with you. Many thanks!

  • You actually make it seem so easy along with your presentation however I in finding this matter to be actually something that I think I would by no means understand. It seems too complicated and very vast for me. I am taking a look ahead for your subsequent post, I’ll try to get the hang of it!

  • Hello! I’m at work surfing around your blog from my new apple iphone! Just wanted to say I love reading through your blog and look forward to all your posts! Keep up the great work!

  • Nice blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple adjustements would really make my blog shine. Please let me know where you got your design. Appreciate it

  • Hey very nice blog!! Guy .. Beautiful .. Amazing .. I’ll bookmark your web site and take the feeds also? I am satisfied to seek out so many useful information here within the post, we want develop extra techniques in this regard, thanks for sharing. . . . . .

  • Pretty great post. I just stumbled upon your weblog and wanted to mention that I’ve truly enjoyed browsing your blog posts. After all I’ll be subscribing in your feed and I’m hoping you write again soon!

  • I have been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the net will be much more useful than ever before.

  • I blog quite often and I seriously appreciate your information. Your article has truly peaked my interest. I am going to take a note of your blog and keep checking for new information about once per week. I subscribed to your Feed as well.

  • Unquestionably believe that which you stated. Your favorite reason seemed to be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people consider worries that they just do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

  • Today, I went to the beach with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

  • Today, I went to the beachfront with my kids. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!

Leave a Reply

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