Link to home
Start Free TrialLog in
Avatar of aft
aft

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aft
aft

ASKER

i do not understand what these sites will do for me. can u give me more details?
Avatar of aft

ASKER

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?
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.
Avatar of aft

ASKER

yes need more clarification.
what i will write in the ServerIPAddress in the following command

.DisplayRemote ServerIPAddress, True
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
Avatar of aft

ASKER

where i write these commands??? (ssh -g -C -R 1234:localhost:1234 publicServer.domain.com
)
Avatar of aft

ASKER

i am not expert in this subject so one by one with me plz
Avatar of aft

ASKER

i am using windows not linux
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.
Avatar of aft

ASKER

also taking into consideration that i am trasfeering video. i.e i need a very fast one not a slow one
Avatar of aft

ASKER

>> The server have to have ssh server installed

from where i can install it for windows?
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.
Avatar of aft

ASKER

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?
Avatar of aft

ASKER

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?
laptop - ssh client, putty
control room(have static public ip) - ssh server, one from above mentioned.
Avatar of aft

ASKER

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?
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.
Avatar of aft

ASKER

2. Since You can't connect to Your laptop initially, the connection have to initiated from laptop to control

i do not understand
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.
Avatar of aft

ASKER

sorry but i found that my control room PC is under NATing too

what can i do?
Then You have to find another one to act as a proxy, or You will not get what You want.
Avatar of aft

ASKER

plz more details
What details? I explained quite a lot. What exactly trouble You encountering now?
Avatar of aft

ASKER

about the proxy. is there any free proxy u know to do that?
Avatar of aft

ASKER

i do not want security. i want only to reach the server laptop
> about the proxy. is there any free proxy u know to do that?
No.
Avatar of aft

ASKER

?????????
it means that i can not do what i want when both computers are connected behind the NATing?
Avatar of aft

ASKER

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.
You can't do it. There is technique that makes it possible for udp, but I guess You need regular statefull connection.
Avatar of aft

ASKER

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.
Avatar of aft

ASKER

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??????????????????????????
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
Avatar of aft

ASKER

i can not write this ".DisplayRemote ControlIPAddress, True"
i want the control to connect to the laptop not the reverse
Then You can't do it. OK. There's a workaround(I provided). If You don;t like it - then You can;t.
Avatar of aft

ASKER

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?
If You read whole thread carefully You will notice, that connecting to control on forwarded port in fact makes connection to the laptop.
Avatar of aft

ASKER

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?
Avatar of aft

ASKER

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?
Avatar of aft

ASKER

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?
Avatar of aft

ASKER

any help?????????????
I will not write the same thing three or more times. If You can't use my help, hire proffesional.
Avatar of aft

ASKER

i do not want help from u
u r too agressive
Good, I just browsed Your other questions: so stingy on points, so demanding on details, and so irrational (about what is written to You)...
Avatar of aft

ASKER

no reply for a person like u again
eat urself