RE: [Boston.pm] My IP

2004-01-07 Thread Tim Wilde
On Tue, 30 Dec 2003, Mark Aisenberg wrote:

[ cc list trimmed ]

 2) dyndns is constantly (monthly or so) emailing me telling me they are
 under a DoS attack and will be unavailable for a day or so.

 You've got to decide if you can deal with these hassles.

 I've also used tzo.com for dynamic DNS.  They cost $25/year if I remember
 correctly, but they seem to be more reliable.

Only because they don't inform you when they encounter such issues.  I may
be biased (well, of course I am, I run DynDNS.org), but I guarantee you
TZO and everyone else in this industry have as many or more problems with
Denial of Service attacks and the like as we do - they just aren't as
up-front and honest about them as we are.  It's the two sides of the
full-disclosure coin; in a world where not everyone is doing it, those of
us who do may not look as good, but at least you know exactly what you're
getting, because you can read two years of our system status archives
right there on our website, plain and clear in black and white.

Tim Wilde

-- 
Tim Wilde
[EMAIL PROTECTED]
Systems Administrator
Dynamic Network Services, Inc.
http://www.dyndns.org/
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


RE: [Boston.pm] My IP

2004-01-06 Thread Silvia, Donald
This may not be news to any of you folks, but recently I was pleased to find out that 
sshd can listen on more than one port.  So on my home router I forward port 22 to box 
A and port xxx (that I just happen to know is open through my employer's firewall) to 
box B.  sshd on box B listens on ports 22 and xxx.  That way I can ssh directly to 
both from outside, but still just 'ssh hostname' from inside without specifying the 
port. 

As for tracking my comcast IP, I'm just too lazy.  It's only changed once in about 3 
years, and that change was when I got a new modem and the technician had a hard time 
getting it set up.  Some day this will probably bite me but where I live they don't 
seem to be renumbering any more.

Don Silvia
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Uri Guttman
Sent: Tuesday, December 30, 2003 2:09 PM
To: Joel Gwynn
Cc: [EMAIL PROTECTED]
Subject: Re: [Boston.pm] My IP


 JG == Joel Gwynn [EMAIL PROTECTED] writes:

  JG Hey all.  I connect from work via ssh to my home computer, which is
  JG Comcast broadband.  My IP rarely changes, but I'm worried about the one
  JG day I'm at work and need something from home, and my IP has changed.

  JG I'm thinking the best thing would be some sort of script that runs every
  JG hour, and sends me an email if the IP changes.

  JG Has anyone done anything like this?  I'm sure I could whip something up
  JG in an hour, but I don't want to re-invent the wheel.

  JG Also, since I'm behind a router, what's the best way to find my IP in
  JG Perl?

asd others have said, dyndns is a good choice. i have a virtual host out
there so i rolled my own version of this. i just fetch (with lwp of
course) the status page of my nat box and parse out my leased IP address
(trivial and in this case it is the first IP on that page). i then ssh
it over to my virtual host. from the outside i first login to the
virtual host, copy the ip to the laptop or local box, and use that to
ssh into my home net.

#!/usr/local/bin/perl

$link_text = `/usr/local/bin/lwp-request -CNAME:PASSWORD  
http://192.168.0.100/Status.htm` ;

@ips = $link_text =~ /(\d+\.\d+\.\d+\.\d+)/g ;

system /bin/echo $ips[2] | /usr/local/bin/ssh -q cell 'cat  m1_ip' ;

i think 3 lines of perl is considered simple (even if it forks out twice :).

this runs under crontab every 15 minutes. i haven't had a problem with
it in a long time. note that i don't need a password for the ssh as i
put my public (or private, i forget) keys on the virtual host.

and a critical thing is to configure your nat box to map the incoming
ssh port to the box you want. this can vary depending on the brand and
model. one feature (which i wish i had) is that the map can also switch
the port number so you could ssh to another port and then be connected
to a different box. you could run ssh on a different port on that box
and just use the standard map as well. but once you login to a box, you
should be able to login to any other box behind your nat.

uri

-- 
Uri Guttman  --  [EMAIL PROTECTED]   http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs    http://jobs.perl.org
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


RE: [Boston.pm] My IP

2004-01-06 Thread Mark Aisenberg
I use dyndns.org myself for some low-value serving from my home.  It works,
but I run into two issues with it:
1) my comcast IP address rarely changes, so unless I buy a paid subscription
I have to log into my account at dyndns and touch the domain name there to
keep it from expiring after 30 days of no changes.
2) dyndns is constantly (monthly or so) emailing me telling me they are
under a DoS attack and will be unavailable for a day or so.

You've got to decide if you can deal with these hassles.

I've also used tzo.com for dynamic DNS.  They cost $25/year if I remember
correctly, but they seem to be more reliable.




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Andrew M. Langmead
Sent: Tuesday, December 30, 2003 8:50 AM
To: Joel Gwynn
Cc: [EMAIL PROTECTED]
Subject: Re: [Boston.pm] My IP


On Dec 30, 2003, at 8:25 AM, Joel Gwynn wrote:

 Hey all.  I connect from work via ssh to my home computer, which is 
 Comcast broadband.  My IP rarely changes, but I'm worried about the 
 one day I'm at work and need something from home, and my IP has 
 changed.

Why not use one of those dynamic DNS services like 
http://www.dyndns.org/
Some appliance routers support sending updates to dyndns when their IP
address changes. If you are using some sort of Unix box as the firewall and
NAT-ing device, then you could use one of their updating scripts on the
firewall itself.

To get the non NAT-ed IP address, you either need to fetch the external 
address
from the machine doing that NAT-ing, or have a machine behind the 
firewall to
connect to an external machine and have that external machine call 
getpeername()
on the connection. (for CGI, the results of getpeername() are shown in 
the REMOTE_ADDR
environment variable.)

___
Boston-pm mailing list
[EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm



___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] My IP

2003-12-30 Thread David Cantrell
Dan Boger wrote:
On Tue, Dec 30, 2003 at 08:25:43AM -0500, Joel Gwynn wrote:
Also, since I'm behind a router, what's the best way to find my IP
in Perl?
I think your best bet is to set up a CGI someplace external to your
network, and have your script hit it.  The CGI can then return what IP
it sees the query coming from.
Assuming he means a NATting router (so his PC is on an RFC1918 network)
then surely the best way to query the router for its current
configuration is by SNMP or failing that, an Expectish or LWPish script
which connects to the router's management port, logs in and tickles it
in the right ways.
--
David Cantrell | Reality Engineer, Ministry of Information
Wow, my first sigquoting! I feel so special now!
-- Dan Sugalski
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] My IP

2003-12-30 Thread Duane Bronson




The dynamic dns clients (some aren't free) can be implemented as a very
simple perl script, although it's different for each dynamic dns
service. I used to use minidns.net because of the ultra-fancy user
interface (and it's free) until I moved to britsys.com and got 1500/768
DSL with 5 static IP addresses for $39/month (*plug*).

...
$request = new HTTP::Request 'GET',
"http://www.minidns.net/areg.php?opcode=ADDusername=yellowbartpassword=eatmyshortshost=lisakissingmilhouse.orgip=$ip";
...

And if you don't specify the ip=$ip, it will use REMOTE_ADDR which
is the Internet-visible IP address of the machine running the script.
But - you probably don't have to run the script more than once a
month. Every hour is overkill (from the original post) and will
probably get the Dynamic DNS service admins mad.

Chris Devers wrote:

  On Tue, 30 Dec 2003, David Cantrell wrote:

  
  
Dan Boger wrote:


  On Tue, Dec 30, 2003 at 08:25:43AM -0500, Joel Gwynn wrote:
  
  
Also, since I'm behind a router, what's the best way to find my IP
in Perl?

  
  I think your best bet is to set up a CGI someplace external to your
network, and have your script hit it.  The CGI can then return what IP
it sees the query coming from.
  

Assuming he means a NATting router (so his PC is on an RFC1918 network)
then surely the best way to query the router for its current
configuration is by SNMP or failing that, an Expectish or LWPish script
which connects to the router's management port, logs in and tickles it
in the right ways.

  
  
Surely that can't be any easier than just using a Dyndns client, no?

I mean, the whole point of their service is to do their best to sweep this
kind of problem under their nice, plush rug for you. Isn't it worth a try?


  


-- 
  , , , |  Duane Bronson
 /|/|/| ,   |  [EMAIL PROTECTED]
( ( ( |/|   |  http://www.nerdlogic.com/
 \( |   |  453 Washington St. #4A, Boston, MA 02111
  |/|  (617) 515-2909



___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


RE: [Boston.pm] My IP

2003-12-30 Thread Joel Gwynn
Thanks for all the suggestions.  For now I'm going the wimpy route, and
trying dyndns.org, with the DNSer client service
(http://www.access.si/DNSer/DNSer.htm) installed.  We'll see how it
goes.

I have to say, that the 3-line perl solution is tempting. Maybe when I
get some free time ...

Joel Gwynn
Variable Data
Spire
617 832-1957



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Uri Guttman
 Sent: Tuesday, December 30, 2003 2:09 PM
 To: Joel Gwynn
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Boston.pm] My IP
 
 
  JG == Joel Gwynn [EMAIL PROTECTED] writes:
 
   JG Hey all.  I connect from work via ssh to my home 
 computer, which is
   JG Comcast broadband.  My IP rarely changes, but I'm 
 worried about the one
   JG day I'm at work and need something from home, and my IP 
 has changed.
 
   JG I'm thinking the best thing would be some sort of 
 script that runs every
   JG hour, and sends me an email if the IP changes.
 
   JG Has anyone done anything like this?  I'm sure I could 
 whip something up
   JG in an hour, but I don't want to re-invent the wheel.
 
   JG Also, since I'm behind a router, what's the best way to 
 find my IP in
   JG Perl?
 
 asd others have said, dyndns is a good choice. i have a 
 virtual host out there so i rolled my own version of this. i 
 just fetch (with lwp of
 course) the status page of my nat box and parse out my leased 
 IP address (trivial and in this case it is the first IP on 
 that page). i then ssh it over to my virtual host. from the 
 outside i first login to the virtual host, copy the ip to the 
 laptop or local box, and use that to ssh into my home net.
 
 #!/usr/local/bin/perl
 
 $link_text = `/usr/local/bin/lwp-request -CNAME:PASSWORD  
http://192.168.0.100/Status.htm` ;

@ips = $link_text =~ /(\d+\.\d+\.\d+\.\d+)/g ;

system /bin/echo $ips[2] | /usr/local/bin/ssh -q cell 'cat  m1_ip' ;

i think 3 lines of perl is considered simple (even if it forks out twice
:).

this runs under crontab every 15 minutes. i haven't had a problem with
it in a long time. note that i don't need a password for the ssh as i
put my public (or private, i forget) keys on the virtual host.

and a critical thing is to configure your nat box to map the incoming
ssh port to the box you want. this can vary depending on the brand and
model. one feature (which i wish i had) is that the map can also switch
the port number so you could ssh to another port and then be connected
to a different box. you could run ssh on a different port on that box
and just use the standard map as well. but once you login to a box, you
should be able to login to any other box behind your nat.

uri

-- 
Uri Guttman  --  [EMAIL PROTECTED]  
http://www.stemsystems.com --Perl Consulting, Stem Development, Systems
Architecture, Design and Coding- Search or Offer Perl Jobs
  http://jobs.perl.org
___
Boston-pm mailing list
[EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm