Solved

connecting to a computer behind NATing

Posted on 2007-12-03
47
390 Views
Last Modified: 2010-04-12
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
Comment
Question by:aft
  • 28
  • 18
47 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 250 total points
ID: 20401391
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
 

Author Comment

by:aft
ID: 20401453
i do not understand what these sites will do for me. can u give me more details?
0
 

Author Comment

by:aft
ID: 20401457
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401466
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
 

Author Comment

by:aft
ID: 20401501
yes need more clarification.
what i will write in the ServerIPAddress in the following command

.DisplayRemote ServerIPAddress, True
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401522
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
 

Author Comment

by:aft
ID: 20401534
where i write these commands??? (ssh -g -C -R 1234:localhost:1234 publicServer.domain.com
)
0
 

Author Comment

by:aft
ID: 20401542
i am not expert in this subject so one by one with me plz
0
 

Author Comment

by:aft
ID: 20401549
i am using windows not linux
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401552
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
 

Author Comment

by:aft
ID: 20401559
also taking into consideration that i am trasfeering video. i.e i need a very fast one not a slow one
0
 

Author Comment

by:aft
ID: 20401562
>> The server have to have ssh server installed

from where i can install it for windows?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401566
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
 

Author Comment

by:aft
ID: 20401580
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401587
0
 

Author Comment

by:aft
ID: 20401605
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401609
laptop - ssh client, putty
control room(have static public ip) - ssh server, one from above mentioned.
0
 

Author Comment

by:aft
ID: 20401649
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401672
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
 

Author Comment

by:aft
ID: 20401695
2. Since You can't connect to Your laptop initially, the connection have to initiated from laptop to control

i do not understand
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401717
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
 

Author Comment

by:aft
ID: 20401740
sorry but i found that my control room PC is under NATing too

what can i do?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401782
Then You have to find another one to act as a proxy, or You will not get what You want.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:aft
ID: 20401812
plz more details
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20401827
What details? I explained quite a lot. What exactly trouble You encountering now?
0
 

Author Comment

by:aft
ID: 20401856
about the proxy. is there any free proxy u know to do that?
0
 

Author Comment

by:aft
ID: 20401896
i do not want security. i want only to reach the server laptop
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20402259
> about the proxy. is there any free proxy u know to do that?
No.
0
 

Author Comment

by:aft
ID: 20402326
?????????
it means that i can not do what i want when both computers are connected behind the NATing?
0
 

Author Comment

by:aft
ID: 20402358
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20402408
You can't do it. There is technique that makes it possible for udp, but I guess You need regular statefull connection.
0
 

Author Comment

by:aft
ID: 20402433
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
 

Author Comment

by:aft
ID: 20409456
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20409635
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
 

Author Comment

by:aft
ID: 20409644
i can not write this ".DisplayRemote ControlIPAddress, True"
i want the control to connect to the laptop not the reverse
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20409830
Then You can't do it. OK. There's a workaround(I provided). If You don;t like it - then You can;t.
0
 

Author Comment

by:aft
ID: 20409855
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
 
LVL 43

Expert Comment

by:ravenpl
ID: 20409934
If You read whole thread carefully You will notice, that connecting to control on forwarded port in fact makes connection to the laptop.
0
 

Author Comment

by:aft
ID: 20409994
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
 

Author Comment

by:aft
ID: 20410064
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
 

Author Comment

by:aft
ID: 20418510
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
 

Author Comment

by:aft
ID: 20521042
any help?????????????
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20521051
I will not write the same thing three or more times. If You can't use my help, hire proffesional.
0
 

Author Comment

by:aft
ID: 20521069
i do not want help from u
u r too agressive
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 20521157
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
 

Author Comment

by:aft
ID: 20521168
no reply for a person like u again
eat urself
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Read about achieving the basic levels of HRIS security in the workplace.
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now