Since you're able to use ppp0 and wlan0 both, i'll skip to the main thing. You don't need firestarter. You see to use automatic configuration, you would have to install a DHCP server, which is a fairly painful process, when you take into account all the configuring you need to do. So we'll do this the static way. On your linux machine that is connected to the internet, execute the following commands as root:
iptables -A FORWARD -i ppp0 -o wlan0 -s 192.168.137.1/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
After you do this, go to your other machines and enter the following the the TCP/IPv4 settings for the ad-hoc wireless connection:
IP address: 192.168.137.1-254 (except 100)
Subnet Mask: 255.255.255.0
Gateway: 192.168.137.100
Primary DNS: 8.8.8.8
Secondary DNS: 8.8.4.4
And if everything goes well, you should be able to ping google.com
The steps you mentioned that you have performed would be specific if you were on the same network or connecting to a remote machine with it's IP exposed with no firewalls.
If the host machine (as in almost all cases) is connected to a router and have a provide IP you would have to perform port forwarding to the computer you want to connect to. The router port to forward is 5900 TCP. You'll also have to ensure you have not blocked port 5900 though the host's firewall. Also ensure to allow connection from the client's IP via /etc/hosts.allow
.
Summary of client's access to the server:
1) Port forwared to the host IP in the routher (tcp 5900)
2) Firewall's port 5900 open
3) Access granted to the client's IP address via /etc/hosts.allow
/etc/hosts.allow:
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "rpcbind" for the
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
#
ALL: [remote desktop client's ip here]
You mentioned Ubuntu's default Desktop Sharing. That is the one I'm addressing. It doesn't use rdp
so you can leave that protocol along. Just concentrate on the VNC capable clients. The Remmina Remote Desktop Client
will work. Just make sure you have it set for VNC and not the other choices.
You have already specified port 22 (ssh
) is working which means that port is forwarded. Now the same way you setup and tested ssh
, you will have to do the same thing with port 5900
, for vnc
.
You have already specified what you need in the Vino configuration which is:
1. Allow other users to view your Desktop (Checkmark)
2. Allow other users to control your Desktop (Checkmark)
3. You must confirm (No Check mark)
4. Require the user to enter password (optional)
5. Automatically configure UpNp router (optional)
6. Show Notification area icon (optional)
Only three settings (highlighted in bold) is required for the connection. The other items are optional.
Just set the above configuration, close and connect with a VNC
enabled client.
While the Remmina
client will work, I used vinagre to test and prepare thses steps.
Best Answer
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:
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:
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:
If the ISP is agreeable to opening and forwarding ports, the I recommend using VNC over ssh tunnel for the following reasons:
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.