How to control an Ubuntu PC from another Ubuntu PC over Internet, using mobile broadband connections?
Solution 1
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:
- 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.
- 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:
- forwards the open ports from the external IP to the NATed internal IP, or
- 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:
- VNC over ssh will require opening (and forwarding) of port 22 only (or some other port set by the user).
- VNC over ssh is a more secure method where the data transmitted over the mobile system is encrypted.
- 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.
Solution 2
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
Solution 3
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:
- How can you get any connection running between the machines.
- 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: http://en.wikipedia.org/wiki/Network_address_translation#Drawbacks
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.
Solution 4
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
Solution 5
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
-
https://www.youtube.com/watch?v=T2RBIkEgRk0&feature=related
We tried it with friend who has win 7 it works great.
Related videos on Youtube
Naveen
Updated on September 18, 2022Comments
-
Naveen over 1 year
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:
-
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:
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!
-
david6 over 11 yearsEach 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?
-
Naveen over 11 yearsAccording to your information, both public and private IP address are static. I think the Public IP is produced by the sim card inside my usb modem. But I'm not using a router, am I? I'm connecting to the Internet from a usb mobile broadband, in both computers.
-
user68186 over 11 yearsGiven 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?
-
TheXed over 11 years@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.
-
Naveen over 11 yearsIP according to ifconfig command : 10.225.5.115 (inet addr)
-
Naveen over 11 yearsIP according to www.whatismyip.com : 61.235.152.24
-
Naveen over 11 years@user68186 : How can I open 5800 port...?
-
user68186 over 11 yearsThe 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 61.235.152.24:5800 -> 10.255.5.115:5800. This is usually done at the router.
-
Naveen over 11 yearsThat's the point... That's why all the other guides didn't work for me... I don't have a router... Can't I do the forwarding from iptables?
-
user68186 over 11 yearsI am afraid, this may be totally in the hands of your service provider. See broadbandgenie.co.uk/blog/20080513490/… . Can you search for "test firewall" in google and do some online port scans like securitymetrics.com/portscan.adp and see if ports 5800 and 5900 are open?
-
Naveen over 11 yearsThese ports are closed for my connection : 8080, 80, 5800, 5900 | I used this website to scan : digitalcoding.com/tools/open-port-check.html (I hope this site is reliable..)
-
david6 over 11 yearsCan you please also provide details for both USB '3G/4G' modems, and ISP/Service providers. That is probably where both the issues and solution needs to focus ..
-
user68186 over 11 yearsCan you check whether port 22 is closed or not. If not you can use VNC over ssh.
-
Naveen over 11 yearsPort 22 is also closed as that site says... Is that site faking about ports? Why are my all ports closed..? This is my USB modem : ONDA Communication S.p.A. ZTE MF636
-
Naveen over 11 yearsMy service providers are Mobitel, Srilanka & Airtel Sri Lanka.
-
user68186 over 11 years@Naveen Many service provider keeps these ports closed to prevent subscribers from running server type of activities using mobile data. The use of mobile data for servers "may not be allowed" as per their agreement document. The other reason is to keep the customers safe. Keeping the ports closed prevents hacking efforts. Are any ports open?
-
Naveen over 11 yearsI understand... I'm lost... These pages says the exact thing you said: forum.utorrent.com/viewtopic.php?id=25894 superuser.com/questions/397606/… Is there anything I have to ask from my ISP before I appriciate them?? What if I requirests them to eqalize my public and static ips? Or can I ask some sort of a ip to login to my modem? Anyway, thanks user61186, your effort is much admired.. Can you please compile the final thoughts from all of your comments, so I have a reasonnable answer to offer the bounty...
-
user68186 over 11 years@Naveen I wrote my anwser and then read the links. I think the accepted answer in superuser.com/questions/397606/… is relevant for you as well. I am sorry, this is not going to work, I think.
-
-
Naveen over 11 yearsThanks, but I want to do it in the real way. (From Ubuntu's inbuilt client)
-
Naveen over 11 yearsThanks, I'm already using it.... I want it to be done using an open source software
-
Sepero over 11 yearsSadly, teamviewer is the easiest way to do what you want without having to reconfigure your router. :(
-
Darryl Williams over 11 yearsWhich router/dsl modem you are using? All you have done is right but just little configuration from your dsl modem/router is needed.
-
Paul Hänsch over 11 yearsOh 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.
-
thirtythreeforty over 11 yearsThe 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.
-
Paul Hänsch over 11 years@gh403: I actually hope that naveen will rephrase the question, since NAT traversal is way beyond the scope of this thread.
-
Naveen over 11 yearsaaa... wats rephrasing? I have no idea.. :(
-
Paul Hänsch over 11 yearswhat i said, split the question.. or "alter the phrase, the wording" to be less question at once.