Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 416
  • Last Modified:

connecting to a computer behind NATing

hello

i have one laptop connected to a camera and a GPRS modem. this device will connect to the internet using the mobile network and it can be in any place in the street. in the control room, i have an internet connection with a static IP address. my problem is in the laptop because it does not have a static or dynamic IP address on the internet (the mobile network use NATing). now i am running a server process on the laptop and i want to connect to it from the control room. i do not know how can i reach the laptop IP address.

regards
0
aft
Asked:
aft
  • 28
  • 18
1 Solution
 
ravenplCommented:
You can't - without cooperation with ISP.

Or You can create a tunnel from Your laptop to some static-internet server.
Easiest way is ssh port forwarding http://www.ssh.com/support/documentation/online/ssh/adminguide/32/Port_Forwarding.html
Personally I use http://openvpn.net/ - I found it more stable and since it's routing based(bridge) connections can survive tunnel restart. But it's more complicated in configuration. And requires superuser priviledges on both sides.
0
 
aftAuthor Commented:
i do not understand what these sites will do for me. can u give me more details?
0
 
aftAuthor Commented:
in my application for the client to connect to the server(laptop) to get video from the server side, it write

.DisplayRemote ServerIPAddress, True

is these sites will offer a way for doing that?
0
NEW Internet Security Report Now Available!

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out this quarters report on the threats that shook the industry in Q4 2017.

 
ravenplCommented:
Can You connect with ssh to some internet server? If so, then ssh is able to forward ports.
First You creating persistent ssh connection from Your laptop to public.server with port forwarding, say

ssh -g -C -R 1222:localhost:22 public.server
now, if You connect to public.server from internet in a way
ssh -p 1222 public.server
it will forward the traffic to your laptop port 22 - ssh!
Need more clarification? Ask.
0
 
aftAuthor Commented:
yes need more clarification.
what i will write in the ServerIPAddress in the following command

.DisplayRemote ServerIPAddress, True
0
 
ravenplCommented:
I don't know what port is beeing used in the connection, but assume 1234

from Your laptop to publicServer.domain.com
ssh -g -C -R 1234:localhost:1234 publicServer.domain.com
You could set up passwordless login here (http://www.google.com/search?hl=en&q=ssh+without+password)

then
.DisplayRemote publicServer.domain.com-ServerIPAddress, True
0
 
aftAuthor Commented:
where i write these commands??? (ssh -g -C -R 1234:localhost:1234 publicServer.domain.com
)
0
 
aftAuthor Commented:
i am not expert in this subject so one by one with me plz
0
 
aftAuthor Commented:
i am using windows not linux
0
 
ravenplCommented:
I already explained: from You laptop.
If Your laptop runs windows use http://www.cs.uu.nl/technical/services/ssh/putty/puttyfw.html
The server have to have ssh server installed. All unixes have this by default.
Also - You have to have the public server available - the name I provided is just example.
0
 
aftAuthor Commented:
also taking into consideration that i am trasfeering video. i.e i need a very fast one not a slow one
0
 
aftAuthor Commented:
>> The server have to have ssh server installed

from where i can install it for windows?
0
 
ravenplCommented:
If You can't cooperate with Your ISP - You have to forward the traffic with third server(acts as proxy). Sorry.
If You need direct connection either ask ISP to get public IP (or port forwarding) or change ISP.
0
 
aftAuthor Commented:
what should i have on my PC in the control room and what should i have on the laptop?
and how can i copnfigure both computers?
0
 
aftAuthor Commented:
what should i have on my PC in the control room and what should i have on the laptop?
and how can i copnfigure both computers?
0
 
ravenplCommented:
laptop - ssh client, putty
control room(have static public ip) - ssh server, one from above mentioned.
0
 
aftAuthor Commented:
1. what is SSH means?

2. but i will connect from the control room computer to the laptop which provide the service. who should have putty and who should have ssh server???

3. and how can i configure both of them?
0
 
ravenplCommented:
1. http://en.wikipedia.org/wiki/Ssh
2. Since You can't connect to Your laptop initially, the connection have to initiated from laptop to control.
3. Those links I provided explains configuration as well.
0
 
aftAuthor Commented:
2. Since You can't connect to Your laptop initially, the connection have to initiated from laptop to control

i do not understand
0
 
ravenplCommented:
Your laptop is behind ISP's nat. Right. You can't connect to it? Right? But You can connect from the laptop to control. Right?
The idea is simple: connect from laptop to control, and forward back-connections within the same connection. That';s wat the ssh port forwarding does.
0
 
aftAuthor Commented:
sorry but i found that my control room PC is under NATing too

what can i do?
0
 
ravenplCommented:
Then You have to find another one to act as a proxy, or You will not get what You want.
0
 
aftAuthor Commented:
plz more details
0
 
ravenplCommented:
What details? I explained quite a lot. What exactly trouble You encountering now?
0
 
aftAuthor Commented:
about the proxy. is there any free proxy u know to do that?
0
 
aftAuthor Commented:
i do not want security. i want only to reach the server laptop
0
 
ravenplCommented:
> about the proxy. is there any free proxy u know to do that?
No.
0
 
aftAuthor Commented:
?????????
it means that i can not do what i want when both computers are connected behind the NATing?
0
 
aftAuthor Commented:
u said:

The idea is simple: connect from laptop to control, and forward back-connections within the same connection. That';s wat the ssh port forwarding does.

ans also u said:
from Your laptop to publicServer.domain.com
ssh -g -C -R 1234:localhost:1234 publicServer.domain.com

and many others things

please tell me the final thing i can do. if the control computer has static IP address and the laptop is behind NATing and i will try to get a fixed IP address for the control room computer.
0
 
ravenplCommented:
You can't do it. There is technique that makes it possible for udp, but I guess You need regular statefull connection.
0
 
aftAuthor Commented:
The idea is simple: connect from laptop to control, and forward back-connections within the same connection. That';s wat the ssh port forwarding does.

ans also u said:
from Your laptop to publicServer.domain.com
ssh -g -C -R 1234:localhost:1234 publicServer.domain.com

and many others things

please tell me the final thing i can do. if the control computer has static IP address and the laptop is behind NATing and i will try to get a fixed IP address for the control room computer.
0
 
aftAuthor Commented:
now i got a static ip address for the PC in the control room which is 163.121.77.1

on the laptop, after i connect to the internet using the mobile phone network, i run ipconfig, i got the following:
IP address: 10.253.18.54
subnet mask: 255.255.255.255
Defaultr gateway: 10.253.18.54
 
now i want to write .DisplayRemote LaptopIPAddress, True to coonect with the camera attached on it and render its video.

how can i do that??????????????????????????
0
 
ravenplCommented:
install ssh server on Your control
install putty on Your laptop
use http://www.cs.uu.nl/technical/services/ssh/putty/puttyfw.html to configure putty to forward proper port
connect with putty to control
write: .DisplayRemote ControlIPAddress, True
0
 
aftAuthor Commented:
i can not write this ".DisplayRemote ControlIPAddress, True"
i want the control to connect to the laptop not the reverse
0
 
ravenplCommented:
Then You can't do it. OK. There's a workaround(I provided). If You don;t like it - then You can;t.
0
 
aftAuthor Commented:
the problem is not if i am like or not. i am using an ocx for video called videocapX and it only supports connection from the client(control room) to the server (laptop having the camera). what can i do?
0
 
ravenplCommented:
If You read whole thread carefully You will notice, that connecting to control on forwarded port in fact makes connection to the laptop.
0
 
aftAuthor Commented:
u said many things and as i told u i am not expert in this case.
now u have the final situation. can u tell me what can ido finally?

i install http://www.freesshd.com/index.php?ctt=download on my control room computer. and install PuTTY on the laptop. what after that?
0
 
aftAuthor Commented:
the control static IP is:
Ethernet adapter Internet:
        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 217.52.249.3
        Subnet Mask . . . . . . . . . . . : 255.255.255.240
        Default Gateway . . . . . . . . . : 217.52.249.1
       primray DNS: 62.140.73.1
       secondary DNS: 62.140.73.1
what can i do exactly?
0
 
aftAuthor Commented:
Your laptop is behind ISP's nat. Right. You can't connect to it? Right? But You can connect from the laptop to control. Right?
The idea is simple: connect from laptop to control, and forward back-connections within the same connection. That';s wat the ssh port forwarding does.

how can i do that?
0
 
aftAuthor Commented:
any help?????????????
0
 
ravenplCommented:
I will not write the same thing three or more times. If You can't use my help, hire proffesional.
0
 
aftAuthor Commented:
i do not want help from u
u r too agressive
0
 
ravenplCommented:
Good, I just browsed Your other questions: so stingy on points, so demanding on details, and so irrational (about what is written to You)...
0
 
aftAuthor Commented:
no reply for a person like u again
eat urself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 28
  • 18
Tackle projects and never again get stuck behind a technical roadblock.
Join Now