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.


202 comments

  • Great post. I used to be checking continuously this weblog and I’m inspired! Extremely useful info particularly the closing part 🙂 I take care of such information much. I used to be looking for this particular info for a long time. Thanks and good luck.

  • Wonderful blog! Do you have any helpful hints for aspiring writers? I’m planning to start my own site soon but I’m a little lost on everything. Would you advise starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely overwhelmed .. Any suggestions? Kudos!

  • With havin so much written content do you ever run into any problems of plagorism or copyright infringement? My site has a lot of exclusive content I’ve either written myself or outsourced but it seems a lot of it is popping it up all over the internet without my agreement. Do you know any solutions to help prevent content from being ripped off? I’d definitely appreciate it.

  • I’m not sure where you’re getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for wonderful info I was looking for this information for my mission.

  • Hi there! I could have sworn I’ve visited this website before but after looking at many of the articles I realized it’s new to me. Anyways, I’m definitely delighted I found it and I’ll be bookmarking it and checking back often!

  • I have been browsing online greater than 3 hours nowadays, yet I by no means found any fascinating article like yours. It is pretty worth sufficient for me. Personally, if all website owners and bloggers made good content material as you probably did, the net shall be much more useful than ever before.

  • Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  • An impressive share! I have just forwarded this onto a colleague who was doing a little research on this. And he in fact ordered me lunch because I stumbled upon it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending some time to discuss this topic here on your web page.

  • Have you ever considered about including a little bit more than just your articles? I mean, what you say is important and everything. But just imagine if you added some great images or videos to give your posts more, “pop”! Your content is excellent but with images and clips, this website could definitely be one of the very best in its niche. Good blog!

  • I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get got an shakiness over that you wish be delivering the following. unwell unquestionably come further formerly again as exactly the same nearly very often inside case you shield this hike.

  • You actually make it appear so easy along with your presentation however I find this topic to be actually something which I feel I would never understand. It sort of feels too complex and extremely extensive for me. I am taking a look forward to your next put up, I will try to get the cling of it!

  • Hello there! I could have sworn I’ve been to this website before but after looking at a few of the articles I realized it’s new to me. Anyways, I’m definitely delighted I came across it and I’ll be book-marking it and checking back regularly!

  • Woah! I’m really loving the template/theme of this blog. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between usability and visual appeal. I must say you have done a very good job with this. Also, the blog loads extremely quick for me on Firefox. Exceptional Blog!

  • I blog frequently and I genuinely thank you for your information. The article has really peaked my interest. I will book mark your blog and keep checking for new information about once per week. I subscribed to your Feed too.

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

  • hello there and thank you for your info – I’ve certainly picked up anything new from right here. I did however expertise some technical points 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 hosting is OK? Not that I’m complaining, but sluggish loading instances times will very frequently affect your placement in google and can damage your quality score if ads and marketing with Adwords. Anyway I am adding this RSS to my email and can look out for much more of your respective interesting content. Make sure you update this again very soon.

  • Greetings I am so excited I found your webpage, I really found you by accident, while I was searching on Google for something else, Nonetheless I am here now and would just like to say thank you for a marvelous post and a all round interesting blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to read more, Please do keep up the fantastic jo.

  • Hi there great website! Does running a blog like this take a massive amount work? I’ve no expertise in programming however I was hoping to start my own blog in the near future. Anyhow, should you have any suggestions or tips for new blog owners please share. I know this is off topic however I just had to ask. Appreciate it!

  • Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  • Do you have a spam issue on this site; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice methods and we are looking to exchange techniques with other folks, why not shoot me an email if interested.

  • Just wish to say your article is as astonishing. The clearness in your post is simply great and i can assume you are an expert on this subject. Well with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  • Very good blog! Do you have any suggestions for aspiring writers? I’m hoping to start my own website soon but I’m a little lost on everything. Would you propose starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m completely confused .. Any suggestions? Thank you!

Leave a Reply

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