On Fri, Feb 21, 2003 at 06:59:23PM +0100, Frank v Waveren wrote:
> On Fri, Feb 21, 2003 at 05:50:45PM -0000, Dave Hooper wrote:
> > Unless I'm mistaken, and there's a better way, I only know when my IP
> > changes when freenet stop works.  And setting involves stopping and starting
> > fred which is something I'd prefer to cut down to a minimum.  For those poor
> > soles whose IP changes daily, wouldn't an automated solution be preferable
> > to a manual solution?
> Automated yes, but no need to embed it in FNP/fred. There are lots of
> ways to check your IP, first and foremost most dhcpcd's support
> running a script if your IP changes (and I assume something similar is
> possible if the NAT box is running NT/2000?), you can periodically
> (and automatically, out of cron or something) connect to a remote host you 
> have an account on and check your IP from there. Also, googling for
> "What is my ip" returns a scary number of sites whose only purpose in
> life appears to be to tell you your IP.

The normal mechanisms are:
* For a normal node with a direct internet connection, fred can detect
  the IP, and does so every few seconds. This is not difficult (it
  involves creating a datagram socket to some inet address, asking the
  system what the local address is on it and then closing it without
  sending any data out of the machine).
* For a dyndns-based node, we have ipAddress=something.dyndns.org, and
  the firewall must be configured to update dyndns when the external IP
  changes (as well as port forwarding). This seemed to be a reasonable
  option... but it would seem that java's DNS resolution code caches
  all successful lookups forever by design on 1.3, and by bug on 1.4.
  Thus we cannot rely on dyndns for this corner-case. Also, a lot of
  "firewalled" nodes are in fact behind cheap hardware NAT routers, run
  by people who aren't terribly technically literate, with almost
  certainly no facility to update dyndns. So all in all we need to
  deprecate support for DNS, and make some way to find a) our current IP
  address, and b) whether we have been successfully contacted on that
  address, and whether it has been attempted. Or we could integrate, or
  require, dnsjava (http://www.xbill.org/dnsjava/ - it is LGPL so
  compatible license-wise, but we'd have to keep it up to date, and use
  sufficiently low level methods to ensure no caching is done).

  As you can see I am a little annoyed at the latest java atrocity.
  Maybe we _should_ port it to C++ :)
> 
> -- 
> Frank v Waveren                                      Fingerprint: 21A7 C7F3
> [EMAIL PROTECTED]|stack.nl|chello.nl] ICQ#10074100            1FF3 47FF 545C CB53
> Public key: hkp://wwwkeys.pgp.net/[EMAIL PROTECTED]            7BD9 09C0 3AC1 6DF2
> 

-- 
Matthew Toseland
[EMAIL PROTECTED]/[EMAIL PROTECTED]
Full time freenet hacker.
http://freenetproject.org/
Freenet Distribution Node (temporary) at 
http://80-192-4-23.cable.ubr09.na.blueyonder.co.uk:8889/SPmjEh6sH3Y/
ICTHUS.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to