Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-28-2013, 03:05 PM
|
#1
|
Member
Registered: Jul 2007
Posts: 277
Rep:
|
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?
|
|
|
09-28-2013, 05:44 PM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
|
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.
|
09-28-2013, 06:08 PM
|
#3
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
whatever protocol you use, you would need to set up port forwarding on your router.
|
|
|
09-28-2013, 07:36 PM
|
#4
|
LQ Guru
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
|
Sorry, I missed the last part of the statement:
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. ;-)
|
|
|
09-28-2013, 08:38 PM
|
#5
|
Member
Registered: Jul 2007
Posts: 277
Original Poster
Rep:
|
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.
|
|
|
09-28-2013, 10:22 PM
|
#6
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
The router will need to forward requests from the outside world to your server (every brand and model router is different).
|
|
|
09-28-2013, 11:19 PM
|
#7
|
Member
Registered: Jul 2007
Posts: 277
Original Poster
Rep:
|
Quote:
Originally Posted by schneidz
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?
|
|
|
09-29-2013, 04:12 AM
|
#9
|
Member
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 32
Rep:
|
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.
|
09-29-2013, 12:16 PM
|
#10
|
Member
Registered: Jul 2007
Posts: 277
Original Poster
Rep:
|
Quote:
Originally Posted by cospengle
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.
|
|
|
09-29-2013, 12:48 PM
|
#11
|
Member
Registered: Jul 2007
Posts: 277
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:12 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|