Date: Wed, 3 Mar 2004 13:13:40 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Robert Storey <y2kbug@ms25.hinet.net> Cc: freebsd-questions@freebsd.org Subject: Re: what is my real address? Message-ID: <20040303131340.GA11526@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040303181551.104d2ce6.y2kbug@ms25.hinet.net> References: <20040303181551.104d2ce6.y2kbug@ms25.hinet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 03, 2004 at 06:15:51PM +0800, Robert Storey wrote: > I've set up a FreeBSD client at our school. The client gets its address > via dhcp from the gateway machine which runs Windows NT (yuch!). There > is apparently a proxy server installed which blocks http, but I can get > out onto the Internet using ssh to login to another server, from where I > run lynx if I want to visit web sites. ftp is not blocked, so I can > download if I need to. If you need to find your external address quickly, then ssh into this other machine and look at the variables that ssh sets in your environment -- I'm assuming that the box you ssh into is running some variety of OpenSSH. eg: % env | grep SSH SSH_CLIENT=3D81.2.69.219 1483 22 SSH_CONNECTION=3D81.2.69.219 1483 81.2.69.219 22 SSH_TTY=3D/dev/ttyp4 SSH_AUTH_SOCK=3D/tmp/ssh-6kfGMKtW/agent.30744 where you can see I ssh'd from 81.2.69.219 to 81.2.69.219 (yes -- pretty pointless, but this is just for illustration). =20 > For run, I would like to run an ftp server on this client machine. For > that, I would need to know my real address on the web, but I am not sure > how to find this info. If I run ifconfig, it tells me the following: >=20 > inet addr: 10.0.0.10 > Bcast: 10.0.0.31 > Mask 255.255.255.224 Running an FTP server through a NAT'ing gateway is not going to be a pleasant experience, even if you were running the NAT gateway on a FreeBSD box where natd's punch_fw functionality would make things a great deal easier for you. FTP is an ancient protocol not designed to cope with the realities of the modern internet. You'ld be better off putting a reverse-proxy on your gateway machine. > A related question...I do realize that my address could change everytime > I fire up the client machine. I'm wondering if I can deal with that by > using dyndns? Remember, this would be for an anonymous ftp server, not > http. There are several ports in the ports collection that do this sort of thing -- updating a DNS server when your IP nuber allocation changes so your registered domains resolve to the right place. Usually they work by querying your ADSL router or Cable modem every so often as to what its IP addresses are. If the gateway machine supports SNMP, you might be able to adapt some of those scripts to work using that. I can remember off-hand exactly what SNMP oid you need to query to find out the interface address, but it should work pretty well: mrtg(1) does that sort of thing against all sorts of hardware. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFARdoEdtESqEQa7a0RApRdAJ9SkZDRaAemw6j+e0c0FDAXLsZjHACeO/mV 0b2Smy3kRor4DYuq96gyWaQ= =8qPE -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040303131340.GA11526>