LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-28-2013, 03:05 PM   #1
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Rep: Reputation: 31
Telnetting to server through a router?


So this is my setup, I have a wireless router (dlink dir-615) connected to my cable modem in a seperate room. I have my laptop (192.168.0.101) connected wirelessly to the router, then I have my sun t2000 connected via ethernet to my laptop for internet. The server's IP is 192.168.200.100, the laptops eth ip is 192.168.200.110. If i wanted to telnet to the server from outside my local network, how would I do that?
 
Old 09-28-2013, 05:44 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Hi austinramsay. You would be better off using ssh in lieu of telnet, but it would look like this:

Code:
telnet xx.xx.xx.xx zzz
Where xx.xx.xx.xx is the ip address of the machine you wish to access and zzz is the port number on which you would like access. The port number is optional, if not specified it will use port 23. Again, I suggest ssh as it's secure.

Good luck. ;-)
 
1 members found this post helpful.
Old 09-28-2013, 06:08 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
whatever protocol you use, you would need to set up port forwarding on your router.
 
Old 09-28-2013, 07:36 PM   #4
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Sorry, I missed the last part of the statement:

Quote:
outside my local network
For that, as schneidz stated, you'll need to setup port forwarding on the router. Here are a few links to aid you.

http://support.dlink.com/emulators/d...ort_adv.htm#06

http://portforward.com/english/route...615/TELNET.htm

http://portforward.com/english/route...IR-615/SSH.htm

Good luck. ;-)
 
Old 09-28-2013, 08:38 PM   #5
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Original Poster
Rep: Reputation: 31
So how would i setup forwarding? I mean like would I say forward port 23 to 192.168.200.100 (the t2000's address) or would I have to forward it to my laptop that the server is connected to? (192.168.0.101)? If its forwarded to the laptop, then wouldnt i have to forward it from there to the server? Whats the process to do that? Thanks for the help by the way guys.
 
Old 09-28-2013, 10:22 PM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
The router will need to forward requests from the outside world to your server (every brand and model router is different).
 
Old 09-28-2013, 11:19 PM   #7
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by schneidz View Post
The router will need to forward requests from the outside world to your server (every brand and model router is different).
I understand but the thing is the server is not directly connected to the router. The servers connected to my laptop (which is connected to the wifi). So do i need to tell the router to forward port 23 to my laptop? Then make the laptop forward that port to the server? How would i do that?
 
Old 09-29-2013, 12:05 AM   #8
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
Yes, but I would use ssh instead.

This seems related: http://www.linuxquestions.org/questi...6/#post3804866
 
Old 09-29-2013, 04:12 AM   #9
cospengle
Member
 
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 32

Rep: Reputation: 6
If I read this correctly, you will need to tell your router how to reach the 192.168.200.x subnet.

Set a route on the router for that subnet and make the gateway your laptop's IP (192.168.0.101).
 
1 members found this post helpful.
Old 09-29-2013, 12:16 PM   #10
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by cospengle View Post
If I read this correctly, you will need to tell your router how to reach the 192.168.200.x subnet.

Set a route on the router for that subnet and make the gateway your laptop's IP (192.168.0.101).
How can I do that? Im in the routing settings on my router page, I set 192.168.200.100 (server) as the destination ip, 255.255.255.0 as the netmask, and the gateway as my laptop (192.168.0.101). But when i try to save settings it says:

"The 4th range of IP address must be between 0" ??

Last edited by austinramsay; 09-29-2013 at 12:18 PM.
 
Old 09-29-2013, 12:48 PM   #11
austinramsay
Member
 
Registered: Jul 2007
Posts: 277

Original Poster
Rep: Reputation: 31
FIXED! Okay so I set the routing settings like cospengle said and it worked. I set the subnet mask to 255.255.255.252 and for some reason it let me set 192.168.200.100 as the destination ip. Can someone explain this to me? I know the subnet mask tells what range of IPs to use right? But why did this work?

For anyone else who needs this later:
I forwarded port 23 tcp and udp to my laptop's ip (192.168.0.101)
Then went into my routers routing settings, and set the destination ip as 192.168.200.100(server) and the gateway as 192.168.0.101(my laptop) because the server is connected to the laptop.

Last edited by austinramsay; 10-07-2013 at 01:50 AM.
 
  


Reply

Tags
microsystems, sun, t2000, telnet, wireless


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect server to router via ethernet; router is not projecting signal. oldpilsbury Linux - Newbie 5 04-01-2013 02:56 PM
[SOLVED] Network configuration: server - router vs router-server alistair_sunde Linux - Networking 2 08-14-2010 10:19 AM
Telnetting Boggy B Linux - Software 7 01-05-2005 01:48 AM
Telnetting from outside IP?? CBRdave Linux - Networking 3 06-24-2004 11:59 PM
"Cannot connect to X server" whilest telnetting to another UNIX system Sroys Linux - General 3 05-25-2004 03:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration