Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are two Ubuntu PCs called A and B.
A and B are connected to the Internet using two separated Internet connections. (In my case, two mobile broadband connections ppp0 x2 )
Each connection has a unique & static public IP address.

What I need is to control A computer's cursor, using B computer's mouse, over the Internet.

  • In both computers, I have allowed other users to control my computer in Desktop Sharing preferences, as below:

    enter image description here

  • When I try to connect to A from the B using Remmina Remote Desktop Client, it refuses to connect after trying for a while.
    These are my settings:

    enter image description here

I expect this to be done from an available open source software, not from TeamViewer.

I found this guide harder to understand.
Please provide me clear instructions...

Thanks for having a look!

share|improve this question
Each Internet Connection has its own IP address. This is a public IP address. The IP address assigned to each PC (or laptop) is a private address, on the private side of a router. Is the 'static IP' address you refer to for the PC or the Internet connection? – david6 Oct 20 '12 at 9:49
Given that you are connecting through an USB modem, you may not have a private IP, just the public one. The mobile phone companies may be blocking the ports needed for VNC, 5800 and 5900. Can you check if the ports are open? – user68186 Oct 23 '12 at 13:41
@david6 why wouldn't each intenret connection have its own ip address? And really all you need to know is the ip address of the host, whether it is public or internal depends on whether you are on a LAN, or a WAN. – TheXed Oct 23 '12 at 14:02
The ifconfig and whatsmyip shows you have an internal and an external IP. I am not sure where and how the transition is taking place without a router. The ports should be open when you enable desktop sharing. However, since you have two IPs the ports need to be forwarded like -> This is usually done at the router. – user68186 Oct 23 '12 at 14:21
I am afraid, this may be totally in the hands of your service provider. See… . Can you search for "test firewall" in google and do some online port scans like and see if ports 5800 and 5900 are open? – user68186 Oct 23 '12 at 14:54
up vote 3 down vote accepted

Summarizing from comments

The two computers are connected to the Internet by mobile (cell phone) data network. I will refer to the cell data service provider as the "Internet Service Provider" or ISP. There are two issues:

  1. The ISP is providing the NAT (Network Address Translation) service such that the computer has an internal IP address and an external IP address with no apparent way to forward the ports of the external IP address to the internal IP address.
  2. The ISP is also blocks all the useful ports of the external IP address.

I have no knowledge of the specific ISP in question. However, generally ISPs take these actions to prevent mobile data connections to be used to connect servers and for the security of the customers. Sometimes ISPs prohibit the use of mobile data for servers in their service agreements.

Under these circumstances, specifically if the ISP service agreement prohibit the use of mobile data for servers, the ISP is unlikely to open the ports needed to connect the two computers and forward the specific ports from the external IP address to the internal IP address.

Your connections will work If the ISP:

(a) opens the ports

(b) and do either of the two following:

  1. forwards the open ports from the external IP to the NATed internal IP, or
  2. provides you with a real IP, not a NATed one (See the quote from superuser below)

Without these from the ISP it is impossible to use the native solution to remotely connect from computer B to computer A.

About conversion from NATed setup to real static IP setup from Superuser:

The problem lies on what address you are given, most of the time it's already a NATed IP. However, many carriers can switch you to a real "external" IP - which is generally used for VPN because sometimes NAT can interfere with VPN (assuming you can get past the CSRs). However, even though this would be a publicly addressable IP - I imagine that they would still put in restrictions/firewall to prevent you from doing exactly what you are trying to do.

If the ISP is agreeable to opening and forwarding ports, the I recommend using VNC over ssh tunnel for the following reasons:

  1. VNC over ssh will require opening (and forwarding) of port 22 only (or some other port set by the user).
  2. VNC over ssh is a more secure method where the data transmitted over the mobile system is encrypted.
  3. ssh can be set up to use public/private keys instead of passwords, which is much more difficult for hackers to crack.

To try this in Remmina, go to the ssh tab and check the two checkboxes, (a) use ssh, and (b) use tunnel. You may have to install ssh in both the computers.

However, this solution is not available without port forwarding in NATed IP setup or a setup with direct access to the external IP.

Hope this helps.

share|improve this answer

Install Team Viewer application on both Ubuntu systems. You can view and control systems in bidirectional.

TightVNC is a opensource remote control software package. With TightVNC, you can see the desktop of a remote machine and control it. You can get it here. You need to configure router

share|improve this answer
Thanks, I'm already using it.... I want it to be done using an open source software – Naveen Oct 23 '12 at 13:31
Sadly, teamviewer is the easiest way to do what you want without having to reconfigure your router. :( – Sepero Oct 24 '12 at 16:10
Which router/dsl modem you are using? All you have done is right but just little configuration from your dsl modem/router is needed. – K.K Patel Oct 25 '12 at 4:58

Forgettaboutit! You've done nothing wrong. You are just geting NATed by your mobile providers. On both ends. with no control over the routers. That's the worst case imaginable.

I recommend splitting your question in two:

  1. How can you get any connection running between the machines.
  2. If you got that far, you can see how to get a desktop connection.

I recommend starting out with ssh. Connecting these two Computers is probably going to involve some ssh tunneling. It would be very good to have a third party with a public internet address. I.e. some cheap 2€/month VServer.

Best would be to have a vpn solution. This is a bit tougher for starters, but more convenient in the long run.

Sorry. There is no easy answer for you. You either have to dig network tunnels or get a serious internet connection. Choose one. This may sound rude, but believe me, I'm just the messenger of bad news here. Please don't vote me down.

Here is some lecture for further reading about your problem:

Note the phrase: Hosts behind NAT-enabled routers do not have end-to-end connectivity and cannot participate in some Internet protocols.

Any solution anyone can come up with here will involve a third party. Be careful about using proprietary web services.

share|improve this answer
Oh and also: If you see any proprietary software doing this, then rest assured that this proprietary software is using a proprietary internet service to function. A STUN gateway at best, a router, able to listen in to your traffic at worst (I'm not saying "they" are after you, just that "they" had an easyer job if they were ;-). In any case this makes you even more dependent on the proprietor. The problem is fundamental with Internet-Routing. – Paul Hänsch Oct 27 '12 at 22:19
The concept of beating a firewall is called "NAT busting." I saw an interesting solution called pwnat a while back. See if you can find anything useful. – thirtythreeforty Oct 27 '12 at 22:26
@gh403: I actually hope that naveen will rephrase the question, since NAT traversal is way beyond the scope of this thread. – Paul Hänsch Oct 28 '12 at 0:33
aaa... wats rephrasing? I have no idea.. :( – Naveen Oct 28 '12 at 9:16
what i said, split the question.. or "alter the phrase, the wording" to be less question at once. – Paul Hänsch Oct 28 '12 at 9:18

If someone is interested in helping to friend the easiest way to remote someone ubuntu desktop is to install google chrome remote desktop extension. Link to extension

video tutorial

share|improve this answer
Thanks, but I want to do it in the real way. (From Ubuntu's inbuilt client) – Naveen Oct 23 '12 at 13:29

I use KRDC/KRFB (Client/Server) to use VNC-related stuff. Searching for VNC software (both clients/viewers and servers) will help you find other free alternatives (like TightVNC, I think).

EDIT: Searching for VNC software is easier with Synaptic Package Manager than it is with Ubuntu Software Center, but both should yield interesting results.

EDIT #2: You must keep the preference windows open! These also hold the server online as far as I can tell, but this may have been fixed since I last used the software screenshotted above

share|improve this answer

You can try installing the Hamachi Beta client from Log-me in on both Ubuntu machines and connect them to your Hamachi network.

You can then use VNC to achieve remote control over VPN. This is not open source though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.