LinuxQuestions.org
Review your favorite Linux distribution.
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 03-18-2005, 10:58 AM   #1
seabark99
LQ Newbie
 
Registered: Mar 2005
Location: india
Distribution: redHat
Posts: 2

Rep: Reputation: 0
how to halt a system with private ip from a system in other net work


I am using redHat linux and also telnet service id is on. Also connected to internet.I know my private ip and router ip.can i halt my system from other network?
 
Old 03-18-2005, 11:18 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
you just need to do a simple port forwarding...

but don't use telnet through a public network (everything, including your password is transmitted in clear text)... use SSH instead...

for ssh you'd need to forward port 22 to the machine on the LAN... for telnet i think it's 23...
 
Old 03-20-2005, 12:59 AM   #3
seabark99
LQ Newbie
 
Registered: Mar 2005
Location: india
Distribution: redHat
Posts: 2

Original Poster
Rep: Reputation: 0
shh

can expalin what is SSH and how to solve my question?
 
Old 03-20-2005, 08:36 AM   #4
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
this is ssh:

http://www.openssh.org/

it's included with pretty much every gnu/linux distro on the planet...


as for the port-forwarding, take a look at this diagram:


<LAN-1 PC-1>-<ROUTER-1>-<[INTERNET]>-<ROUTER-2>-<LAN-2 PC-2>


ssh uses tcp port 22... if you are on <LAN-1 PC-1> and you want to have ssh access to <LAN-2 PC-2>, you will need to do port-forwarding of tcp port 22 on <ROUTER-2> to <LAN-2 PC-2>... this means that you are basically telling <ROUTER-2> the following:


"any tcp packets that hit <ROUTER-2> at port 22 on the internet side should be forwarded to <LAN-2 PC-2>..."


so when you are on <LAN-1 PC-1> and you try to connect to <ROUTER-2> at tcp port 22, you will in fact be connecting to <LAN-2 PC-2>...

if <ROUTER-2> is a linux router using iptables with eth0 as the external interface and eth1 as the internal one, and <LAN-2 PC-2> has an ip address of 192.168.0.102, then the port forwarding can be done using these two example rules on <ROUTER-2>:

Code:
iptables -t nat -A PREROUTING -p TCP -i eth0 --dport 22 \
-j DNAT --to-destination 192.168.0.102
iptables -A FORWARD -p TCP -i eth0 -o eth1 --dport 22 -j ACCEPT
so from anywhere you were accross the internet, you could now establish an ssh connection with <LAN-2 PC-2> by trying to connect to <ROUTER-2>'s ip address or dns name...

here's a wiki explaining what port forwarding is:

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


once you login to <LAN-2 PC-2> via ssh, you can turn it off with the command "halt"...

Last edited by win32sux; 03-21-2005 at 10:18 AM.
 
  


Reply


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
System going down for system halt NOW! (hangs) jdh77 Yoper 14 12-07-2004 03:28 AM
All users can halt system Equin Linux - Security 2 10-17-2004 01:15 PM
Halt System Kaninchen Mandriva 5 05-11-2004 03:01 PM
poweroff will not halt system ceph Linux - General 1 11-06-2003 02:44 PM
Halt system kpraveen Linux - General 2 08-10-2002 08:40 AM


All times are GMT -5. The time now is 03:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration