You are not logged in.

#1 2005-01-03 08:59:37

ovihc
Member
Registered: 2004-06-16
Posts: 62

connecting to a computer that is inside a router with adsl

I need to fix a computer of someone but the computer is connected to an adsl modem via a router.

Is it possible to connect to that computer? I understand that the modem is registered and setup with an ip, but how do i connect to the computers that connect to that modem?

I want to use ssh. thanks in advance.

Offline

#2 2005-01-03 10:52:32

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: connecting to a computer that is inside a router with adsl

Add a port forwarding rule to the router directing ROUTER_EXTERNAL_IP:8888 to COMPUTER_IP:22 (this is a symbolic representation) & add start sshd on the computer.

Offline

#3 2005-01-03 11:12:05

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: connecting to a computer that is inside a router with adsl

Thanks.

I know that the router has ip xx.xx.xx.xx   Can I access the router through the internet to set it up and apply the changes that you suggested? I've tried to telnet with

telnet xx.xx.xx, and i get this:

Trying xxx.xxx.xxx.xxx
Connected to xxx.xx.xxx.xx
Escape character is '^]'.
Connection closed by foreign host

Will i be able to connect to the router? ( i of course know that i need the password and loging)

Offline

#4 2005-01-03 21:10:06

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: connecting to a computer that is inside a router with adsl

If I were a manufacturer of broadband routers (1 WAN & 4LAN ports for example), I would definitely not allow remote configuration (on the WAN interface).

I think that the router is configurable only from the inside (it has a LAN IP, usually ending with .1). Some of the routers even allow webbased configuration - point your browser to http: //router_lan_ip:someport. This should all be in the configuration manual.

Offline

#5 2005-01-03 21:39:06

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: connecting to a computer that is inside a router with adsl

IceRAM wrote:

If I were a manufacturer of broadband routers (1 WAN & 4LAN ports for example), I would definitely not allow remote configuration (on the WAN interface).

I think that the router is configurable only from the inside (it has a LAN IP, usually ending with .1). Some of the routers even allow webbased configuration - point your browser to http: //router_lan_ip:someport. This should all be in the configuration manual.

that's correct with every router I've touched... configuration can only come from within the network (hell my netgear 54g wireless+4 port won't even allow wireless configuration.... I have to "jack in" to mess with it... hooray for security making my life difficult he he he)

Offline

#6 2005-02-10 20:06:43

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: connecting to a computer that is inside a router with adsl

thanks guys for your comments. due to the lack of my communication, i wasn't intending on configuring the router from outside the network. i should of mentioned that that was .... crazy.

i do want to get a little more specific. the router is a Speedtouch 510i . i am searching through the internet to find some documentation, but since it was bought in holland i can't read the dutch manual.

i'm pretty sure this router is modern (it's a newer version) so it might have some general options. with this i mean that it might have the options of forwarding the port :8888 to an ip of a computer, and then i can ssh to it. heck, it even has a intergretated firewall, so i'm sure it has the ip forwarding.

what are the general steps in the process for a generic router to enable the ip forwarding?? my whole intention is to access one of the linux machines from the world to reconfigure it.

maybe some one will give a hint that can start me off.

thanks.

Offline

#7 2005-02-10 20:55:20

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: connecting to a computer that is inside a router with adsl

ok, i looked up some information. should i be involved with NAPT?

Offline

#8 2005-02-10 21:11:50

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: connecting to a computer that is inside a router with adsl

ok, i've read further. i'm on the wikipedia reading "port forwarding".

http://en.wikipedia.org/wiki/Port_forwarding

this means that i need to forward port xxxx on the router to the user's machine's port xxxx to gain ssh accesS?

what port does ssh use? if for example, ssh uses port 123, then i need to forward port 123 from the router to the user's computer to gain access through ssh?

there is already a firewall programmed into the router. will there be a conflict with both forwarding a port and the active firewall?

Offline

#9 2005-02-10 22:12:50

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: connecting to a computer that is inside a router with adsl

The port used for ssh is 22, although changing it to something else in the sshd config isn't a bad idea for security reasons.

You redirect data with destination port X to host/ip Y, where in this case X is 22 and Y the ip of the user's machine. You most likely need to do all the configuration on the modem, so no iptables for you. You can hopefully do all the configuration through the webinterface of the modem.

After googling a bit, it seems that port forwading must be enabled via telnet. I found an apparently good website here. It's in Dutch, but the commands are hopefully easy enough to follow for you. The following should work, looking at that website:

create protocol=tcp inside_addr=10.0.0.150:22 outside_addr=0.0.0.0

Where 10.0.0.15 must be replaced with the ip of the user's machine.

For the telnet stuff, there is an English manual here.

Offline

#10 2005-02-11 09:02:26

ovihc
Member
Registered: 2004-06-16
Posts: 62

Re: connecting to a computer that is inside a router with adsl

thanks i3839.

i kept reading the documentation and at the end your help was ... helpful. i read some stuff, then i verified it with your post and you were right.

i learned that the router has a web interface on an ip number. also, that through NAPT i forward the IP from the router with port xxxx to a machine 192.168.xxx.xxx with port 22 for ssh.

thanks guys for helping me.

now all that is left is for me to test it from outside the network.

Offline

Board footer

Powered by FluxBB