LinuxQuestions.org
Help answer threads with 0 replies.
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 06-10-2007, 06:05 AM   #1
piva.francesco
Member
 
Registered: Feb 2005
Distribution: Slackware 10.1, Gentoo
Posts: 64

Rep: Reputation: 15
Remote control of multiple machines


Hello everyone !

What I would like to do is to configure my 3 Desktop computer (all running Ubuntu) in order to access to them when I am traveling in the World.
In fact I don't want them to be always on, I was wondering if they are Hibernating or Suspended if I could turn them on in Order to check my personal Data. And of course use my home Internet connection in order to download the system updates
I do not have a Static IP unfortunately, but if it could help I have this router:

Quote:
Router Information:

Router Name Netopia
Model 3341
Serial Number xxxxxxx
MAC Address xx:xx:xx:xx:xx:xx
Software Version 7.5.0
I have looked at some Tutorials on the Net, and I only found this one:

www.novell.com/coolsolutions/feature/15315.html

But it left me a little bit perplexed, I am not quite sure it works for distance remote control.


Can Someone please give me a hint or help me to resolve my problem, I'll be going away from home for 6 months and I would like to have access to my Machines.



Thank in advance for your help.

Cheers


fp
 
Old 06-10-2007, 06:24 AM   #2
stzein
Member
 
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
I can't help you very much with this, but for the dynamic ip problem you can use dyndns or some similar service. They give you a free subdomain, and you configure your router or one of your PC's to report to them regularly so they can bind your ip address to that subdomain. You can make a free account there so you won't be screwed if your isp's dhcp decides to give you another ip.
 
Old 06-10-2007, 09:15 AM   #3
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
There are several manufactories that make IP controlled power switches. Here is one. http://www.leunig.de/_en/_pro/remote...tch/eps_D4.htm Search google for more different ones. Also one can do it with some of the basic X-10 modules.

Now all ones needs to do is open the port through the firewall to the static IP assigned to the device and then you can have it power on the device. Since dhcp wan IP then go with what stzein mentions so as to know the IP at any time. Another option is a script to check the wan IP every minute or so. Then email the new IP to your email account if a change has happened.

Brian
 
Old 06-10-2007, 01:59 PM   #4
stzein
Member
 
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
Quote:
There are several manufactories that make IP controlled power switches.
Interesting. I think I'm going to buy some of those!
Quote:
Now all ones needs to do is open the port through the firewall to the static IP... ...Since dhcp wan IP then go with what stzein mentions
Since not many people have I static IP and even less have one for every PC on their LAN, just opening a port won't really work. You'll have to forward a port (some random high port is fine) to the address and port you want to reach. In the case of the power switch you mentioned I guess that would be port 80 for http. The default adress would be something like 192.168.100.100, but you might want to change that address depending on your configuration.
 
Old 06-10-2007, 02:12 PM   #5
tomcdyer
Member
 
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108

Rep: Reputation: 15
Hi,

Im not much of a programer, (i do edit a lot of config files and reconpile things but thats about it).

Could you give me information of how i could
Quote:
Another option is a script to check the wan IP every minute or so. Then email the new IP to your email account if a change has happened.
Thanks
 
Old 06-10-2007, 03:09 PM   #6
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Let clear this up. If you know the IP of the wan side of your router then on the router you setup a port forward setup. You can foward any port fo example port 10001 on the wan side. Then it points to the lan IP port 80 if that is what is needed the be connected.

wanIP/port10001 > router > lanIP/port80

This allows one to have things like ssh running on all machines and then being able to access them from the outside if you select the correct port assigned to it on the outside.
wanIP/port 10001 > router > machine#1 lanIP/port22
wanIP/port 10002 > router > machine#2 lanIP/port22
wanIP/port 10003 > router > machine#3 lanIP/port22

If you run all the machines then I would have only one opened to the outside. Then access the rest in the lan network from the one you contacted to from the outside. This way you have really only one machine to maintain up to date security patches.

Brian
 
Old 06-10-2007, 03:13 PM   #7
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
This is my thinking on a script if you have a dhcp IP. You can run a traceroute to a site. You know which hop will be the routers external IP. It will always be a certain hop out. Now the output is saved to a file and the line for that hop is extracted using commands like awk grep sed. Now once the IP is cut from the output file compare it to the last IP from the traceroute before. If it differs then you can send an email to ones account with the new IP.

This is the way to see to do it. I am sure there are many other ways and would think scripts exist out there or apps that can do this already. I myself am not much of a scripter but this is where I would start.

Brian
 
Old 06-10-2007, 03:31 PM   #8
stzein
Member
 
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
This is my take on a script to check the wan IP every minute or so. This is only a rough, untested draft.

Code:
#!/bin/bash

# First set some custom values:
# The internal IP of your modem/router
ModemRouterIntIP="192.168.100.100"
# The page you need to get from your modem/router
StatusPage="status.htm"
# Your email address
Email="address@mail.com"

# Now get the status page
wget $ModemRouterIntIP/$StatusPage
# Then mail the status page to your address
echo "Here's my home IP address! greets, myself." |mutt -a $StatusPage -s "home IP update" $Email
This requires that you can access some kind of web interface where you can find your external IP address (defined in ModemRouterIntIP and StatusPage), and you need to set up mutt or another mailclient that can be used to send mail from a script.
Using something similar to traceroute may be possible too, but traceroute itself won't give you the external address, only the internal.
Judging from this script, the fact that you need a PC constantly running it in cron, and the fact that you are spamming yourself, I believe a solution like dyndns or no-ip is to be preferred.

About the port Brian1 has a good expanation, and the idea of forwarding only one port improves your security, but it gives you another single point of failure too. So you improve your security but if the one PC goes down you can't access the other two either. I would personally forward at least 1 port per PC.

Last edited by stzein; 06-10-2007 at 03:38 PM.
 
Old 06-10-2007, 03:35 PM   #9
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Did a quick search here and found a script that finds your external wan IP.
http://www.linuxquestions.org/questi...d.php?t=557352

I saved the following to a file called /us/bin/myip.sh
Code:
wget -q -O - http://www.whatismyipaddress.com   | \
grep "Your IP address is"                       | \
sed 's@.*address is \([^<]\+\).*@\1@'
Set the executable attribute to the file. ' chmod a+x /usr/bin/myip.sh '

Now from the command line run the command ' myip.sh '

All one needs to do is add some commands like saving that output to a file or as a string value. then compare it to the value of the next run and if it differs then send it via email to your account.

This is interresting me since soon I will be changing ISp who use dhcp instead of static IP.

EDIT:
Read the post further down. There seems to be a script that does as I descibe in post #9 in the link in this post.
EDIT:

Brian

Last edited by Brian1; 06-10-2007 at 03:38 PM.
 
Old 06-10-2007, 03:39 PM   #10
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
EDIT:
Read the post further down. There seems to be a script that does as I descibe in post #9 in the link in this post.
EDIT:

Brian
 
Old 06-10-2007, 04:01 PM   #11
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
A few more links I found.
http://ipcheck.sourceforge.net/

Using this in a borwser shows IP.
http://checkip.dyndns.org/

Brian
 
Old 06-10-2007, 04:04 PM   #12
tomcdyer
Member
 
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108

Rep: Reputation: 15
Thanks a lot for the time you spent on this.

Tom
 
Old 12-22-2007, 06:14 AM   #13
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
another possibility is that the linux boxes, send you an email of hte change of ip address, with a little script.

curl -s http://ip.dnsexit.com
 
  


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
VLC control via remote control? MasterC Linux - Software 1 09-03-2006 07:59 PM
how can i know remote machines OS? b123coder Linux - Security 2 04-06-2006 08:48 AM
Anyone got the Remote Wonder (ATI's USB remote control) to work under Linux? dezireduser Linux - Hardware 2 11-06-2005 08:47 AM
Multiple Machines behind single Static IP - failing remote ssh Animalector Linux - Security 8 08-18-2005 06:01 PM
dhcp and multiple machines xthel Linux - Networking 7 06-16-2004 08:32 PM


All times are GMT -5. The time now is 03:26 AM.

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