2600::It even works, serving http for sprint.net
On 8 June, 2011, Google, Facebook, Yahoo!, Akamai and Limelight Networks will be amongst some of the major organisations that will offer their content over IPv6 for a 24-hour “test flight”. The goal of the Test Flight Day is to motivate organizations across the industry – Internet service providers, hardware makers, operating system vendors and web companies – to prepare their services for IPv6 to ensure a successful transition as IPv4 addresses run out.
apt-get miredo on debian. For a server or network installation, take a look at Hurricane Electric's tunnel broker which will give you a /48 prefix routed over your normal internet connection.2001:470:1f09:1288::2 that you can get out of ifconfig(specifically, if you have a choice, choose the one that begins with a 2, not the one that begins with an f). Put that IPv6 address into an AAAA record in DNS (better hope your DNS hosting provider does AAAA records - the good ones do...) under a new DNS name. Don't put IPv4 addresses in there too. In my example, I'm going to configure:blog.6.hawaga.org.uk AAAA 2001:470:1f09:1288::2apt-get install apache2benctechnicalblog.blogspot.com. Enable mod_proxy and mod_proxy_http, and then set up a virtual host directive like this (or put it in the base of your server config, seeing as this a host dedicated to forwarding ipv6 traffic):<virtualHost *:80>
ServerName blog.6.hawaga.org.uk
ProxyPass / http://benctechnicalblog.blogspot.com/
<Proxy http://benctechnicalblog.blogspot.com/>
Allow from All
</Proxy>
</virtualhost>
write (*,'(''I wonder how someone kept a straight face when they invented this syntax for writing a string to the console'')')
ruby-mrtg-cloudwatch3 program that I wrote:Target[cloudwatch_network]: `/home/mrtg/ruby-mrtg-cloudwatch/ruby-mrtg-cloudwatch3 NetworkIn NetworkOut AWS /EC2 InstanceId=i-26bcaf51` Title[cloudwatch_network]: Network traffic according to cloudwatch options[cloudwatch_network]: growright,absolute,logscaleMaxBytes[cloudwatch_network]: 100000000
#!/usr/bin/ruby1.8 require 'rubygems' require 'AWS'
metrico=ARGV[0] metrici=ARGV[1]
ACCESS_KEY_ID='foo' SECRET_ACCESS_KEY='bar'
@cw.@cw = AWS::Cloudwatch::Base.new(:access_key_id => ACCESS_KEY_ID, :secret_access_key => SECRET_ACCESS_KEY, :server => "eu-west-1.monitoring.amazonaws.com" )
probe function. This uses a state file based on the metric name to get only readings which have not already been seen by this script. The two metrics use separate state files because cloudwatch doesn't give an atomic read for multiple metrics at once. The state file stores the time of the last seen reading. If there is no state file, we have to invent a time. There is a subtlety here: data does not appear in cloudwatch until around 5 minutes after its time stamp, so using the current time as an initial value results in not seeing any results. Instead, I go back about 15 minutes the first time, which will seems to be far enough back to get something.def probe(metric)
et = Time.now()
statusfn="cloudwatch-"+ARGV[3]+"-"+metric+".status"
if FileTest.exist?(statusfn) then
f = File.new(statusfn, "r")
tstring = f.gets
ts = Time.parse(tstring)
f.close
else
ts = et - 900 # needs to be more than 5 mins because otherwise we never get any data.
end
res = @cw.get_metric_statistics(:measure_name => metric, :statistics => 'Average,Sum', :namespace => ARGV[2], :period => 300, :start_time => ts, :end_time => et, :dimensions=> ARGV[3])
samples = 0
sum = 0
avgsum = 0
datapoints = res["GetMetricStatisticsResult"]["Datapoints"]
lt = ts
if datapoints.nil? then
# nop
else
rows = datapoints["member"]
rows.each { |r|
nlt = Time.parse(r["Timestamp"])
if(nlt < ts) then
# nop - time was before requested start
else
samples += Float(r["Samples"])
avgsum += Float(r["Average"])
sum += Float(r["Sum"])
nlt += 1
if(nlt > lt) then
lt = nlt
end
end
}
f=File.new(statusfn, "w")
f.puts(lt)
f.close
end
return sum
end
sumo=probe(metrico) sumi=probe(metrici) # output mrtg format puts sumo puts sumi puts 0 puts "cloudwatch: "+metrico+" and "+metrici
#!/usr/bin/python import base64 import os import pickle import sys import time VALIDTIME = 60 tokenbits = os.urandom(8) token = base64.b64encode(tokenbits, "+-") print token fn = token + ".token" fh = open(fn, 'w') obj = (sys.argv[1], time.time() + VALIDTIME) pickle.dump(obj, fh)
import os
import syslog
import pickle
import time
def pam_sm_authenticate(pamh, flags, argv):
syslog.syslog("start benc")
pamh.authtok
if pamh.authtok == None:
syslog.syslog("got no password in authtok - trying through conversation")
passmsg = pamh.Message(pamh.PAM_PROMPT_ECHO_OFF, "Monkeyballs?")
rsp = pamh.conversation(passmsg)
syslog.syslog("response is "+rsp.resp)
pamh.authtok = rsp.resp
# so we should at this point have the password either through the
# prompt or from previous module
syslog.syslog("got password: "+pamh.authtok)
# now look for token
# SECURITY BUG TODO: we're using this to make a path so we need to make sure
# we're not being directed out into some other directory. We know the
# range of characters that can be used in a token so we can reject if
# anything other than those exists.
# Especially as we delete the token file on use - otherwise could delete
# arbitrary files on the system...
tfn = "/root/" + pamh.authtok + ".token"
if os.path.exists(tfn):
fh = open(tfn)
tokendata = pickle.load(fh)
tokenuser = tokendata[0]
tokentime = tokendata[1]
fh.close()
os.remove(tfn);
# will remove the token even if it was for the wrong user
# not sure if there's any security different wrt leaving it there if
# its the wrong user?
if tokentime < time.time():
syslog.syslog("token time expired")
return pamh.PAM_AUTH_ERR
if tokenuser != pamh.user:
syslog.syslog("token user "+tokenuser+" does not match requested user "+pamh.user)
return pamh.PAM_AUTH_ERR
return pamh.PAM_SUCCESS
return pamh.PAM_AUTH_ERR
def pam_sm_setcred(pamh, flags, argv):
return pamh.PAM_SUCCESS
s0.barwen.ch with an in-browser terminal window and openid.$REMOTE_USER, and does three things: it maps your openid to a local username; it generates (via sudo) an authentication token for you; and it HTTP-meta-redirects you to a hacked version of shellinabox./ ...
poop53.import syslog
def pam_sm_authenticate(pamh, flags, argv):
syslog.syslog("start benc")
at = pamh.authtok
syslog.syslog("got password: "+at)
if at == "poop53" :
return pamh.PAM_SUCCESS
else:
return pamh.PAM_AUTH_ERR
def pam_sm_setcred(pamh, flags, argv):
return pamh.PAM_SUCCESS
poop53.auth sufficient pam_unix.so auth sufficient pam_python.so /root/auth.py
def pam_sm_authenticate(pamh, flags, argv):
syslog.syslog("start benc")
pamh.authtok
if pamh.authtok == None:
syslog.syslog("got no password in authtok - trying through conversation")
passmsg = pamh.Message(pamh.PAM_PROMPT_ECHO_OFF, "Monkeyballs?")
rsp = pamh.conversation(passmsg)
syslog.syslog("response is "+rsp.resp)
pamh.authtok = rsp.resp
# so we should at this point have the password either through the
# prompt or from previous module
syslog.syslog("got password: "+pamh.authtok)
if pamh.authtok == "poop53" :
return pamh.PAM_SUCCESS
else:
return pamh.PAM_AUTH_ERR
def pam_sm_setcred(pamh, flags, argv):
return pamh.PAM_SUCCESS
UsePAM and ChallengeResponseAuthentication, and now I get this:$ ssh root@192.168.141.128 Monkeyballs?poop53 Linux alcf3 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58 UTC 2011 i686 GNU/Linux #
Monkeyballs? prompt at auth time...benc@donor2.demon.co.uk was my internet address on DoNoR/2, an OS/2 focused BBS near Woking (in those days, young whippersnappers, you cared down to the town level where you were connecting to - DoNoR/2 was in dialing code 01483, the same as Guildford where I grew up). DoNoR/2 was primarily a fidonet system - 2:252/156, and then after the BS of geonetting, 2:440/4, and I was point 2 off that - Ben Clifford at 2:252/156.2Date: Thu, 27 Jan 2011 09:44:27 -0800 (PST) From: Jim VivonaTo: benc@donor2.demon.co.uk Subject: re sup! if you hadn't heard i lost my job at lawncare company about 5 weeks ago, then i found this news article and made 379 in a few hours!! I guess it was for the best! I learned from - News channel 4 talk to you later!
Return-Path:X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on dildano.hawaga.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.1 required=2.5 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, URIBL_BLACK autolearn=ham version=3.3.1 X-Spam-ASN: AS36646 98.138.0.0/17 X-Spam-tokens-ham: 0.000-57--100h-0s--0d--hadnt, 0.000-55--96h-0s--0d--hadn't, 0.000-28--48h-0s--0d--lisa, 0.000-25--44h-0s--0d--Lisa, 0.001-19--32h-0s--0d--madison, 0.001-19--32h-0s--0d--Madison, 0.001-18--31h-0s--0d--Wisconsin, 0.001-18--31h-0s--0d--wisconsin, 0.001-9--15h-0s--0d--entrepreneurs, 0.002-124--220h-1s--0d--Fwd X-Spam-tokens-spam: 0.902-15425--22770h-653297s--0d--H*c:alternative, 0.861-28--214h-4131s--0d--president, 0.860-6821--59523h-1134787s--0d--H*Ad:D*uk X-Spam-relays-trusted: X-Spam-relays-untrusted: [ ip=98.138.85.229 rdns=web120502.mail.ne1.yahoo.com helo=web120502.mail.ne1.yahoo.com by=dildano.hawaga.org.uk ident= envfrom= intl=0 id=p0RHpCGr007860 auth= msa=0 ] [ ip=194.54.47.229 rdns= helo= by=web120502.mail.ne1.yahoo.com ident= envfrom= intl=0 id= auth= msa=0 ] X-Spam-dkim-identity: @yahoo.com vivonajj@yahoo.com X-Spam-dkim-domain: yahoo.com X-Spam-dccb: dcc1.aftenposten.no X-Spam-dccr: dildano.hawaga.org.uk 1215; Body=1 Fuz1=1 Fuz2=1 X-Spam-token-summary: Tokens: new, 1; hammy, 109; neutral, 84; spammy, 3. X-Spam-languages: en X-Spam-autolearn: ham Received: from web120502.mail.ne1.yahoo.com (web120502.mail.ne1.yahoo.com [98.138.85.229]) by dildano.hawaga.org.uk (8.13.8/8.13.8/Debian-3) with SMTP id p0RHpCGr007860 for ; Thu, 27 Jan 2011 17:51:14 GMT Authentication-Results: dildano.hawaga.org.uk; dkim=pass (1024-bit key) header.i=@yahoo.com; dkim-adsp=none Received: (qmail 94875 invoked by uid 60001); 27 Jan 2011 17:44:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1296150267; bh=niep53FNFb78lkhNFkO8MX4NIpOCMZRTAUTHm1+GJzQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Ver sion:Content-Type; b=OWa2WgmhLxGRa+pJep7Or929UysoVIk/SCB7BnFfurvysB63Nr6Odfb4b3gm2hFZqK+xOo Q6aZmUXn27EQbeA/8av52fU1KV33uhA9Th6rI0uKEIPg5LikGLLXUoaXrLzGdL2qyJ10UTMy 2TwEkqU6bZQBCpMxY0fWANKPiIK+M= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Versi on:Content-Type; b=eIuzjdEYirBi9RTFb1voGAKkH4bQUYyRkN6NT6mDBMj2GJcnf8bKz7R7NrQuWd8j9tjoviMF bXv/t3D2DtcoNbvQuDSPMa6ycXDMUkNFpW3dMkyrq6ZBSuw+Ye7TZXH7ect5MJcErjTAyu38 +Dx4kXmdFIlAhs3Q0CBs4L7t+EI=; Message-ID: <164580.94308.qm@web120502.mail.ne1.yahoo.com> X-YMail-OSG: vT0rPzMVM1kHrbVNywVWrHu0pysHCRnEnLjmjnEWPDU8KWm 9AZTRLoDJBmvlFuAhJxD2.uKxh0LPBsJi.WmUQZBW_OOq9UKFRzUPfKAOemv qni6KAcfSaxd8Y6p2Cf6w5PGXAILIpD_0UuPIQ3LtnYoffxsz6w1ytx9R3cG BiqUC4MNLdG0NlSV2mlQCFGOEBHXYNTzl4ejOnjciku0Z1Y5SGW4aUz_4gmA oWXR.IhJ4dfWwgEVx2H9GvVpuPLizb_vwjmqP1e02TP9qrN0cGC1tFWTbyW9 ooJoemIjAwkiYhhY- Received: from [194.54.47.229] by web120502.mail.ne1.yahoo.com via HTTP; Thu , 27 Jan 2011 09:44:27 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 Date: Thu, 27 Jan 2011 09:44:27 -0800 (PST) From: Jim Vivona Subject: re To: benc@donor2.demon.co.uk MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-588940240-1296150267=:94308" X-Greylist: Delayed for 00:06:40 by milter-greylist-3.0 (dildano.hawaga.org.uk [81.187.211.37]); Thu, 27 Jan 2011 17:51:15 +0000 (GMT)