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.
|
|
06-10-2007, 07:05 AM
|
#1
|
Member
Registered: Feb 2005
Distribution: Slackware 10.1, Gentoo
Posts: 64
Rep:
|
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
|
|
|
06-10-2007, 07:24 AM
|
#2
|
Member
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65
Rep:
|
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.
|
|
|
06-10-2007, 10:15 AM
|
#3
|
LQ 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:
|
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
|
|
|
06-10-2007, 02:59 PM
|
#4
|
Member
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65
Rep:
|
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.
|
|
|
06-10-2007, 03:12 PM
|
#5
|
Member
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108
Rep:
|
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
|
|
|
06-10-2007, 04:09 PM
|
#6
|
LQ 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:
|
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
|
|
|
06-10-2007, 04:13 PM
|
#7
|
LQ 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:
|
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
|
|
|
06-10-2007, 04:31 PM
|
#8
|
Member
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65
Rep:
|
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 04:38 PM.
|
|
|
06-10-2007, 04:35 PM
|
#9
|
LQ 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:
|
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 04:38 PM.
|
|
|
06-10-2007, 04:39 PM
|
#10
|
LQ 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:
|
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
|
|
|
06-10-2007, 05:01 PM
|
#11
|
LQ 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:
|
A few more links I found.
http://ipcheck.sourceforge.net/
Using this in a borwser shows IP.
http://checkip.dyndns.org/
Brian
|
|
|
06-10-2007, 05:04 PM
|
#12
|
Member
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108
Rep:
|
Thanks a lot for the time you spent on this.
Tom
|
|
|
12-22-2007, 07:14 AM
|
#13
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:35 PM.
|
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
|
|