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: Thu, 25 Oct 2007 01:22:34 +0200
- From: David Santinoli <marauder@example.com>
- Subject: Re: [tlug] Whats the best way to find out whether I'm in my home network?
- References: <4389e6d40710241345p5ee920ddk7afce2a0e7f46dda@mail.gmail.com>
- User-agent: Mutt/1.5.13 (2006-08-11)
On Wed, Oct 24, 2007 at 05:45:58PM -0300, Joshua B. wrote: > 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. 1. Check whether a default route exist; if not, assume you are offline and stop here. 2. Get the MAC address of your default router ('arp' is your friend here). Compare it against the well-known home router MAC address. If they match, you are home. Otherwise, you are in an Internet cafe. Cheers, David -- David Santinoli Tieffe Sistemi S.r.l. viale Piceno 21, Milano www.tieffesistemi.com tel. +39 02 45490882
- References:
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [OT] Software for handicapped people
- Next by Date: Re: [tlug] Richard Stallman (FSF) in Tokyo Wed, Oct 24th
- Previous by thread: [tlug] Whats the best way to find out whether I'm in my home network?
- Next by thread: Re: [tlug] What's the best way to find out whether I'm in my home network?: ssh makes rsync safe
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links