Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Whats the best way to find out whether I'm in my home network?
- Date: Fri, 26 Oct 2007 02:00:40 +0900
- From: "Nguyen Vu Hung" <vuhung16plus@example.com>
- Subject: Re: [tlug] Whats the best way to find out whether I'm in my home network?
- References: <4389e6d40710241345p5ee920ddk7afce2a0e7f46dda@mail.gmail.com>
2007/10/25, Joshua B. <joshua@example.com>: > Is there a command, suitable for use in a script, that efficiently > checks whether the machine running it is presently inside a particular > network? > > I'm trying to write a script that I can run on my notebook whether at > home behind my router, away from home on a public network, or offline > and have it respond differently in each case. Specifically if I'm at > home I want it to rsync to the server at 192.168.0.3 (or similar), but > if I'm away from home have it rsync to mydomain.org and if I'm offline > to do something else. > > I've considered using ifconfig to check my inet addr - but that could > be coincidentally the same if I'm a member of another c-class network. > I've thought of just blindly attempting to rsync to 192.168.0.3 but > that feels horribly wrong - and insecure. You can setup a simple echo server on that server[1]. When you ping the echo server, you make it dumping something unique. HTH [1] Google it. Quit easy done with Perl. -- Best Regards, Nguyen Hung Vu vuhung16plus{remove}@example.com An inquisitive look at Harajuku http://www.flickr.com/photos/vuhung/sets/72157600109218238/
- Follow-Ups:
- Re: [tlug] Whats the best way to find out whether I'm in my home network?
- From: Evan Monroig
- Re: [tlug] Whats the best way to find out whether I'm in my home network?
- From: Evan Monroig
- References:
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] ftp client for linux
- Next by Date: Re: [tlug] ftp client for linux
- Previous by thread: Re: [tlug] Whats the best way to find out whether I'm in my home network?
- Next by thread: Re: [tlug] Whats the best way to find out whether I'm in my home network?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links