<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Phil&#039;s Blog</title>
	<atom:link href="http://phil.lavin.me.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://phil.lavin.me.uk</link>
	<description>Thoughts of a derptastic developer</description>
	<lastBuildDate>Sun, 12 May 2013 08:37:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Setting up a failover ADSL connection on a Cisco Router</title>
		<link>http://phil.lavin.me.uk/2013/05/setting-up-a-failover-adsl-connection-on-a-cisco-router/</link>
		<comments>http://phil.lavin.me.uk/2013/05/setting-up-a-failover-adsl-connection-on-a-cisco-router/#comments</comments>
		<pubDate>Sun, 05 May 2013 18:52:10 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[adsl failover]]></category>
		<category><![CDATA[backup connection]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[cisco 1841]]></category>
		<category><![CDATA[cisco eem applets]]></category>
		<category><![CDATA[connection failover]]></category>
		<category><![CDATA[hwic1-adsl]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=987</guid>
		<description><![CDATA[This method will monitor a connection via  ping and, on failure, it will bring up the line. Below is my setup &#8211; you may need to tailor this guide to yours. This method is useful if both connections cannot be up at the same time (possibly because they share an IP address). Dialer0 is a [...]]]></description>
				<content:encoded><![CDATA[<p>This method will monitor a connection via <a href="http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol" class="wikiprotip" target="_blank">ICMP</a><span class="wikiprotip-tip"><b>Wikipedia:</b> The Internet Control Message Protocol (ICMP) is one of the core protocols of the Internet Protocol Suite. It is used by the operating systems of networked computers to send error messages indicating, ...</span> ping and, on failure, it will bring up the <a href="http://en.wikipedia.org/wiki/ADSL" class="wikiprotip" target="_blank">ADSL</a><span class="wikiprotip-tip"><b>Wikipedia:</b> Asymmetric digital subscriber line (ADSL) is a type of digital subscriber line (DSL) technology, a data communications technology that enables faster data transmission over copper telephone lines than...</span> line. Below is my setup &#8211; you may need to tailor this guide to yours. This method is useful if both connections cannot be up at the same time (possibly because they share an IP address).</p>
<div id="attachment_988" class="wp-caption aligncenter" style="width: 310px"><a href="http://phil.lavin.me.uk/wp-content/uploads/2013/05/photo.jpg"><img class="size-medium wp-image-988 " alt="Cisco 1841 Router" src="http://phil.lavin.me.uk/wp-content/uploads/2013/05/photo-300x75.jpg" width="300" height="75" /></a><p class="wp-caption-text">Cisco 1841 Router with HWIC1-ADSL</p></div>
<ul>
<li>Dialer0 is a PPPoE dialer to a VDSL modem via fa0/0</li>
<li>Dialer1 is a PPPoATM dialer of ADSL via ATM0/1/0</li>
<li>The IP I am pinging to detect failure is 83.218.143.225</li>
<li>The ATM0/1/0 interface is shutdown when not in use</li>
</ul>
<p>First we&#8217;ll add a Track and IP SLA to monitor our primary connection (Dialer0) by pinging our monitor IP (83.218.143.225). This track configuration delays actioning a failure for 10 seconds and a restore by 60 seconds. This is to prevent flip-flopping on the lines:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">track 1 rtr 123 reachability</div></li><li class="li1"><div class="de1"> delay down 10 up 60</div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">ip sla 123</div></li><li class="li2"><div class="de2"> icmp-echo 83.218.143.225 source-interface Dialer0</div></li><li class="li1"><div class="de1"> timeout 2000</div></li><li class="li1"><div class="de1"> frequency 4</div></li><li class="li1"><div class="de1">ip sla schedule 123 life forever start-time now</div></li></ol></pre></div></div>
<p>Next we&#8217;ll add default routes for Dialer0 (linked to Track1) and Dialer1 (with a higher metric). If you already have default routes, remove these first:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">ip route 0.0.0.0 0.0.0.0 Dialer0 track 1</div></li><li class="li1"><div class="de1">ip route 0.0.0.0 0.0.0.0 Dialer1 254</div></li></ol></pre></div></div>
<p>Finally we&#8217;ll use <a href="http://en.wikipedia.org/wiki/Embedded_event_manager" class="wikiprotip" target="_blank">EEM</a><span class="wikiprotip-tip"><b>Wikipedia:</b> Cisco Embedded Event Manager (EEM) is a feature included in Cisco's IOS operating system (and some other Cisco OSes such as IOS-XR, IOS-XE, and NX-OS) that allow programmability and automation capabil...</span> applets to monitor track 1 and bring up the ATM interface on failure (and visa versa). This also e-mails us about the event:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">event manager applet TRACK-1-TIMEOUT</div></li><li class="li1"><div class="de1"> event track 1 state down</div></li><li class="li1"><div class="de1"> action 1.0 cli command &quot;enable&quot;</div></li><li class="li1"><div class="de1"> action 2.0 cli command &quot;config terminal&quot;</div></li><li class="li2"><div class="de2"> action 3.0 cli command &quot;interface atm0/1/0&quot;</div></li><li class="li1"><div class="de1"> action 4.0 cli command &quot;no shutdown&quot;</div></li><li class="li1"><div class="de1"> action 5.0 mail server &quot;55.33.44.22&quot; to &quot;to@mail.com&quot; from &quot;from@mail.com&quot; subject &quot;IP SLA 123 Timeout&quot; body &quot;Timeout on primary line&quot;</div></li><li class="li1"><div class="de1">event manager applet TRACK-1-OK</div></li><li class="li1"><div class="de1"> event track 1 state up</div></li><li class="li2"><div class="de2"> action 1.0 cli command &quot;enable&quot;</div></li><li class="li1"><div class="de1"> action 2.0 cli command &quot;config terminal&quot;</div></li><li class="li1"><div class="de1"> action 3.0 cli command &quot;interface atm0/1/0&quot;</div></li><li class="li1"><div class="de1"> action 4.0 cli command &quot;shutdown&quot;</div></li><li class="li1"><div class="de1"> action 5.0 mail server &quot;55.33.44.22&quot; to &quot;to@mail.com&quot; from &quot;from@mail.com&quot; subject &quot;IP SLA 123 Restored&quot; body &quot;Primary line restored&quot;</div></li></ol></pre></div></div>
<p>You should replace 55.33.44.22 with a valid SMTP server that this router has access to send through and change to@mail.com/from@mail.com to the to/from e-mail addresses respectively.</p>
<p>&nbsp;</p>
<p>A full example config (with some bits redacted) <a title="Cisco 1841 Config" href="/downloads/edge-router-config.txt" target="_blank">can be found here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/05/setting-up-a-failover-adsl-connection-on-a-cisco-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set up Internet connection (WAN) failover in Cisco IOS including e-mail notifications</title>
		<link>http://phil.lavin.me.uk/2013/04/how-to-set-up-internet-connection-wan-failover-in-cisco-ios-including-e-mail-notifications/</link>
		<comments>http://phil.lavin.me.uk/2013/04/how-to-set-up-internet-connection-wan-failover-in-cisco-ios-including-e-mail-notifications/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 21:20:49 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[adsl backup]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[cisco track]]></category>
		<category><![CDATA[floating routes]]></category>
		<category><![CDATA[ip sla]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[wan failover]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=979</guid>
		<description><![CDATA[As a revision to my earlier post on the matter, here&#8217;s a better constructed way to achieve the same effect with a little more accuracy. Here&#8217;s a diagram of the approximate topology that this will cater to: I shall assert the following facts: The &#8220;ISP&#8217;s Router&#8221; is IP address 1.1.1.1 The DSL model is IP [...]]]></description>
				<content:encoded><![CDATA[<p>As a revision to <a title="How to set up Internet connection (WAN) failover in Cisco IOS" href="http://phil.lavin.me.uk/2012/04/how-to-set-up-internet-connection-wan-failover-in-cisco-ios/">my earlier post on the matter</a>, here&#8217;s a better constructed way to achieve the same effect with a little more accuracy.</p>
<p>Here&#8217;s a diagram of the approximate topology that this will cater to:</p>
<div id="attachment_818" class="wp-caption aligncenter" style="width: 416px"><a href="http://phil.lavin.me.uk/wp-content/uploads/2012/04/diagram-feature.png"><img class="size-full wp-image-818" alt="Network Diagram" src="http://phil.lavin.me.uk/wp-content/uploads/2012/04/diagram-feature.png" width="406" height="226" /></a><p class="wp-caption-text">Network Diagram</p></div>
<p>I shall assert the following facts:</p>
<ol>
<li>The &#8220;ISP&#8217;s Router&#8221; is IP address 1.1.1.1</li>
<li>The DSL model is IP address 2.2.2.2</li>
<li>The source interface that connects to the ISP router is FastEthernet0/0</li>
<li>There is an SMTP server that this router has permission to send via at 99.99.99.99</li>
<li>Your e-mail address is you@mail.com</li>
</ol>
<p>First we use &#8220;track&#8221; to create 2 track entries to do route tracking. The first defines a &#8220;reachability&#8221; track which will be used to monitor for and perform actions on the failure of the primary route. This also delays the actions it performs on failure and restore by 20 and 60 seconds respectively to negate the effect of temporary blips. The second is a stub which allows us to take the secondary route up or down.</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">track 1 rtr 123 reachability</div></li><li class="li1"><div class="de1"> delay down 20 up 60</div></li><li class="li1"><div class="de1">track 2 stub-object</div></li><li class="li1"><div class="de1"> default-state down</div></li></ol></pre></div></div>
<p>Next we add the routes. There&#8217;s 2 default gateways added, each associated with the track entries. There is also a route to ensure that all traffic to the &#8220;ISP&#8217;s Router&#8221; is sent out of the fa0/0 interface. This is for monitoring.</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">ip route 0.0.0.0 0.0.0.0 1.1.1.1 name FIBRE track 1</div></li><li class="li1"><div class="de1">ip route 0.0.0.0 0.0.0.0 2.2.2.2 254 name ADSL_BACKUP track 2</div></li><li class="li1"><div class="de1">ip route 1.1.1.1 255.255.255.255 FastEthernet0/0</div></li></ol></pre></div></div>
<p>Now we use ip sla to provide the details for our reachability track regarding what it should test. In this case, it pings the &#8220;ISP&#8217;s Router&#8221; every 4 seconds:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">ip sla 123</div></li><li class="li1"><div class="de1"> icmp-echo 1.1.1.1 source-interface FastEthernet0/0</div></li><li class="li1"><div class="de1"> timeout 2000</div></li><li class="li1"><div class="de1"> frequency 4</div></li><li class="li2"><div class="de2">ip sla schedule 123 life forever start-time now</div></li></ol></pre></div></div>
<p>Finally we add some event handling to perform some actions on the failure and restore of the primary line. These bring up the second route and e-mail you a notification:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">event manager applet TRACK-1-TIMEOUT</div></li><li class="li1"><div class="de1"> event track 1 state down</div></li><li class="li1"><div class="de1"> action 1.0 track set 2 state up</div></li><li class="li1"><div class="de1"> action 1.1 mail server &quot;99.99.99.99&quot; to &quot;you@mail.com&quot; from &quot;monitor@router.local&quot; subject &quot;IP SLA 123 Timeout&quot; body &quot;Timeout on the primary line&quot;</div></li><li class="li2"><div class="de2">event manager applet TRACK-1-OK</div></li><li class="li1"><div class="de1"> event track 1 state up</div></li><li class="li1"><div class="de1"> action 1.0 track set 2 state down</div></li><li class="li1"><div class="de1"> action 1.1 mail server &quot;99.99.99.99&quot; to &quot;you@mail.com&quot; from &quot;monitor@router.local&quot; subject &quot;IP SLA 123 Restored&quot; body &quot;Primary line restored&quot;</div></li></ol></pre></div></div>
<p>That&#8217;s largely it. It contrasts with my earlier post in such that it ignores the effect of temporary blips in the line and also sends e-mail notifications.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/04/how-to-set-up-internet-connection-wan-failover-in-cisco-ios-including-e-mail-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable ICMP redirects in pfSense</title>
		<link>http://phil.lavin.me.uk/2013/04/how-to-disable-icmp-redirects-in-pfsense/</link>
		<comments>http://phil.lavin.me.uk/2013/04/how-to-disable-icmp-redirects-in-pfsense/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 16:27:28 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[disable icmp redirect]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[pfsense]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=968</guid>
		<description><![CDATA[When a router&#8217;s next hop gateway is in the same subnet as the previous hop, it&#8217;ll send an redirect to the previous router in order to cut itself out of the routing. In some setups, this may not be desirable. To disable this on pfSense, go to System-&#62;Advanced and change to the System Tunables tab. [...]]]></description>
				<content:encoded><![CDATA[<p>When a router&#8217;s next hop gateway is in the same subnet as the previous hop, it&#8217;ll send an <a href="http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol" class="wikiprotip" target="_blank">ICMP</a><span class="wikiprotip-tip"><b>Wikipedia:</b> The Internet Control Message Protocol (ICMP) is one of the core protocols of the Internet Protocol Suite. It is used by the operating systems of networked computers to send error messages indicating, ...</span> redirect to the previous router in order to cut itself out of the routing. In some setups, this may not be desirable.</p>
<p>To disable this on pfSense, go to System-&gt;Advanced and change to the System Tunables tab. Edit <strong>net.inet.ip.redirect</strong> and/or <strong>net.inet6.ip6.redirect</strong> to change their values to 0 (zero).</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/04/how-to-disable-icmp-redirects-in-pfsense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is anycast? Anycast explained at a very basic level</title>
		<link>http://phil.lavin.me.uk/2013/03/what-is-anycast-anycast-explained-at-a-very-basic-level/</link>
		<comments>http://phil.lavin.me.uk/2013/03/what-is-anycast-anycast-explained-at-a-very-basic-level/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 14:05:16 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[anycast]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=950</guid>
		<description><![CDATA[, at a very basic level, is when a collection of servers share the same IP address and data is sent from a source computer to the server that is topographically closest. It is important to remember that topographically closer does not inherently mean geographically closer, though this is often the case. Anycast is used [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Anycast" class="wikiprotip" target="_blank">Anycast</a><span class="wikiprotip-tip"><b>Wikipedia:</b> Anycast is a network addressing and routing methodology in which datagrams from a single sender are routed to the topologically nearest node in a group of potential receivers, though it may be sent to...</span>, at a very basic level, is when a collection of servers share the same IP address and data is sent from a source computer to the server that is topographically closest. It is important to remember that topographically closer does not inherently mean geographically closer, though this is often the case.</p>
<p>Anycast is used primarily for <a href="http://en.wikipedia.org/wiki/Load_balancing_(computing)" class="wikiprotip" target="_blank">load balancing</a><span class="wikiprotip-tip"><b>Wikipedia:</b> Load balancing is a computer networking method to distribute workload across multiple computers or a computer cluster, network links, central processing units, disk drives, or other resources, to achi...</span> to allow the server topographically closest to a user to handle their request. This helps cut down on latency and bandwidth costs and improves load time for users.</p>
<p>Anycast is linked with the <a href="http://en.wikipedia.org/wiki/Border_Gateway_Protocol" class="wikiprotip" target="_blank">Border Gateway Protocol</a><span class="wikiprotip-tip"><b>Wikipedia:</b> Border Gateway Protocol (BGP) is the protocol which is used to make core routing decisions on the Internet; it involves a table of IP networks or "prefixes" which designate network reachability among ...</span>. This is a protocol used between <a href="http://en.wikipedia.org/wiki/Router_(computing)" class="wikiprotip" target="_blank">routers</a><span class="wikiprotip-tip"><b>Wikipedia:</b> A router is a device that forwards data packets between computer networks, creating an overlay internetwork. A router is connected to two or more data lines from different networks. When a data packet...</span> on the Internet with the intent of ensuring that all of a router&#8217;s neighbours are aware of the networks that can be reached through that router and the topographical distance to those networks. The principal of Anycast is that a single IP address is advertised in the BGP messages of multiple routers. As this propagates across the Internet, routers become aware of which of their neighbours provides the short topographical path to the advertised IP address.</p>
<p>IP addresses used in Anycast are often purchased directly from a <a href="http://en.wikipedia.org/wiki/Regional_Internet_registry" class="wikiprotip" target="_blank">Regional Internet registry</a><span class="wikiprotip-tip"><b>Wikipedia:</b> A regional Internet registry (RIR) is an organization that manages the allocation and registration of Internet number resources within a particular region of the world. Internet number resources inclu...</span>. Some <a href="http://en.wikipedia.org/wiki/data_centers" class="wikiprotip" target="_blank">data centers</a><span class="wikiprotip-tip"><b>Wikipedia:</b> A data center or computer centre (also datacenter) is a facility used to house computer systems and associated components, such as telecommunications and storage systems. It generally includes redunda...</span> are known to rent IP addresses to customers and allow them to be advertised by other data centres.</p>
<p>As with all routing, it cannot be guaranteed that a packet will take the same path across the Internet as its predecessor. With Anycast, it cannot be guaranteed that a packet will reach the same destination server as its predecessor. As such, Anycast is not suitable for protocols which track state. TCP is an example of one of these. UDP, however, is perfect for Anycast providing it does not try to track state at a higher level of the OSI model and that the application layer protocol does not rely on a large number of fragemented datagrams to transfer data.</p>
<p>The typical scenario for Anycast as a load balancer is thus:</p>
<ul>
<li>A server in London has its own IP address 3.3.3.3 and a shared Anycast IP address 1.1.1.1.</li>
<li>A server in New York has its own IP address 4.4.4.4 and a shared Anycast IP address 1.1.1.1.</li>
<li>Each of the above servers runs a <a href="http://en.wikipedia.org/wiki/Domain_Name_System" class="wikiprotip" target="_blank">DNS</a><span class="wikiprotip-tip"><b>Wikipedia:</b> The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with...</span> server listening on 1.1.1.1.</li>
<li>The DNS servers serve up an A record for anycastdomain.com. London would serve up 3.3.3.3 and New York would serve up 4.4.4.4.</li>
<li>When a DNS request is made for anycastdomain.com, Anycast would route this request to its topographically closest DNS server. This DNS server would, in turn, serve up the unique IP address of its own server and a TCP connection would be established over standard unicast.</li>
</ul>
<p>Feedback from companies such as <a title="ScaleEngine is the Technical CDN" href="http://www.scaleengine.com/">ScaleEngine</a> is that it&#8217;s quite difficult to persuade data centres to add IP addresses to their BGP. This appears to be best suited to larger organisations who lease their own <a href="http://en.wikipedia.org/wiki/Internet_transit" class="wikiprotip" target="_blank">transit</a><span class="wikiprotip-tip"><b>Wikipedia:</b> Internet transit is the service of allowing network traffic to cross or "transit" a computer network, usually used to connect a smaller Internet service provider (ISP) to the larger Internet. Technica...</span> and have BGP agreements with their transit providers.</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/what-is-anycast-anycast-explained-at-a-very-basic-level/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I don&#8217;t like database stored proceedures</title>
		<link>http://phil.lavin.me.uk/2013/03/why-i-dont-like-database-stored-proceedures/</link>
		<comments>http://phil.lavin.me.uk/2013/03/why-i-dont-like-database-stored-proceedures/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 10:27:46 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[bad idea]]></category>
		<category><![CDATA[hate them]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[stored procedures]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=943</guid>
		<description><![CDATA[There&#8217;s a number of compelling reasons not to use them. Here&#8217;s just a few: They can&#8217;t be stepped through and debugged by your standard IDE. Admittedly, neither can the other dirty SQL you shove in your code however because the majority of SQL lacks logic beyond IF() this is less of a problem. The errors [...]]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s a number of compelling reasons not to use them. Here&#8217;s just a few:</p>
<ol>
<li>They can&#8217;t be stepped through and debugged by your standard IDE. Admittedly, neither can the other dirty SQL you shove in your code however because the majority of SQL lacks logic beyond IF() this is less of a problem.</li>
<li>The errors created by the DBMS on the failure of a stored procedure are often very cryptic and relate to an underlying database error caused by a single line in the stored procedure.</li>
<li>You&#8217;re passing off the processing load to your database server. Databases, for example MySQL, are a lot harder to scale than hosting environments such as PHP-FPM. Research shows a very marginal performance boost in using stored procedures but I don&#8217;t think that this is enough to hide the fact that your database server will process less transactions per second.</li>
<li>You lose portability. A good database abstraction layer in your code should make it portable between databases. Using stored procedures negates this.</li>
<li>In the words of <a href="http://twitter.com/altreus" target="_BLANK">@altreus</a>&#8230; they&#8217;re not in the code base, they&#8217;re not in the code base, they&#8217;re not in the code base. As such, they don&#8217;t track via version control systems. Of course, your database migrations should contain the stored procedures but each change is a new file. This isn&#8217;t how version control works.</li>
<li>Further to the above, they&#8217;re anti-version control. Not only must a developer have his own version of a codebase, he must also have his own version of the database. When working in a team, this adds further complexities and makes it a fruitless task for individual developers to unit test builds prior to committing.</li>
<li>Stored procedures aren&#8217;t reusable in the same way that code is. This is because they lack library support.</li>
</ol>
<p>Any number or indeed all of the above may be total bollocks. Nevermind. At least it&#8217;ll serve to troll those in favor of stored procedures.</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/why-i-dont-like-database-stored-proceedures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add funds instantly with PayPal&#8217;s new feature</title>
		<link>http://phil.lavin.me.uk/2013/03/add-funds-instantly-with-paypals-new-feature/</link>
		<comments>http://phil.lavin.me.uk/2013/03/add-funds-instantly-with-paypals-new-feature/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 21:13:36 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[add funds instantly]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[online payments]]></category>
		<category><![CDATA[paypal]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=926</guid>
		<description><![CDATA[I stumbled across this the other day and can only assume it&#8217;s a new feature. I&#8217;m in the UK so if anyone could verify if it&#8217;s also on US, that&#8217;d be great. When adding funds to your PayPal account, there&#8217;s now 2 options: &#160; &#160; &#160; &#160; &#160; &#160; The left hand one is the [...]]]></description>
				<content:encoded><![CDATA[<p>I stumbled across this the other day and can only assume it&#8217;s a new feature. I&#8217;m in the UK so if anyone could verify if it&#8217;s also on <a href="http://en.wikipedia.org/wiki/PayPal" class="wikiprotip" target="_blank">PayPal</a><span class="wikiprotip-tip"><b>Wikipedia:</b> PayPal is a global e-commerce business allowing payments and money transfers to be made through the Internet. Online money transfers serve as electronic alternatives to paying with traditional paper m...</span> US, that&#8217;d be great.</p>
<p>When adding funds to your PayPal account, there&#8217;s now 2 options:</p>
<div id="attachment_927" class="wp-caption alignleft" style="width: 310px"><a href="http://phil.lavin.me.uk/wp-content/uploads/2013/03/paypal-add-funds.png"><img class="size-medium wp-image-927 " alt="Adding Funds with PayPal" src="http://phil.lavin.me.uk/wp-content/uploads/2013/03/paypal-add-funds-300x134.png" width="300" height="134" /></a><p class="wp-caption-text">Adding Funds with PayPal</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The left hand one is the interesting one. Using it allows you to make a direct transfer from your bank to PayPal. The money showed up within seconds. This is particularly useful as it makes PayPal a more viable option for paying friends and family as PayPal payments which are funded from PayPal funds (within the same country) don&#8217;t carry any fees.</p>
<p>I have also dealt with a few companies who accept PayPal but charge a hefty surplus to cover the fees. Using this option allows you to pay them instantly and not incur such an excess.</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/add-funds-instantly-with-paypals-new-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing pfSense on a Watchguard Firebox x550e and x750e</title>
		<link>http://phil.lavin.me.uk/2013/03/installing-pfsense-on-a-watchguard-firebox-x550e-and-x750e/</link>
		<comments>http://phil.lavin.me.uk/2013/03/installing-pfsense-on-a-watchguard-firebox-x550e-and-x750e/#comments</comments>
		<pubDate>Sun, 17 Mar 2013 11:42:27 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[bios flashing]]></category>
		<category><![CDATA[serial bios]]></category>
		<category><![CDATA[wacthguard firebox pfsense]]></category>
		<category><![CDATA[x550e]]></category>
		<category><![CDATA[x750e]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=910</guid>
		<description><![CDATA[I&#8217;ve done this enough times to be confident that it works. There&#8217;s some great instructions written by Daniel Bernhardt which cover the topic pretty well. Here&#8217;s a few things I&#8217;ve found: Some Fireboxes come with pre-installed 512MB CF cards whereas most come with 256MB cards. If you&#8217;re unlucky enough to get a box with a 512MB [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve done this enough times to be confident that it works. There&#8217;s some <a title="Installing pfSense on a Watchguard Firebox X" href="http://documentation.dbernhardt.com/pfsense/article.html" target="_blank">great instructions written by Daniel Bernhardt</a> which cover the topic pretty well. Here&#8217;s a few things I&#8217;ve found:</p>
<ul>
<li>Some Fireboxes come with pre-installed 512MB CF cards whereas most come with 256MB cards. If you&#8217;re unlucky enough to get a box with a 512MB card, you&#8217;ll need to purchase a 256MB card for flashing the BIOS. The 512MB card will not work for this purpose.</li>
<li>When Daniel notes that the &#8220;Baud Rate is going to change&#8221; it&#8217;s a little unclear what should be done here. You should allow the Firebox to boot until you start seeing gibberish coming out of the serial port. At this point, connect to the firebox with a baud rate of 115200 and power cycle it. After this, you can change the BIOS settings.</li>
<li>Use a fast compact flash card. I&#8217;ve had a lot of problems on pfSense 2.1 with slow CF cards. A 200x card works great. I used a Sandisk 4GB 30MB/s card. This has <a title="pfSense CF NID Not Found Error" href="http://doc.pfsense.org/index.php/DMA_and_LBA_Errors#CF_NID_Not_Found_Error" target="_blank">the side effect documented here</a> but this is purely cosmetic and does not affect the running of the system.</li>
<li>The firebox has a spare RAM slot. This will happily take an extra 512MB DDR2 PC2-4200 533MHz DIMM to give your router a bit of a memory boost. These DIMMs are going so cheap on eBay it&#8217;s silly not to.</li>
<li>At time of writing, the LCD screen is supported natively by the LCDproc-dev package. To use, do the following:
<ul>
<li>Install the LCDproc-dev package</li>
<li>Go to services-&gt;LCDproc</li>
<li>Tick &#8220;Enable LCDproc at startup&#8221;</li>
<li>Select the &#8220;Watchguard Firebox with SDEC (x86 only)&#8221; driver</li>
<li>Leave everything else as is</li>
<li>Click Save</li>
<li>Tick the &#8220;Screens&#8221; that you want to show on the screens tab</li>
<li>Go to status-&gt;services and start the LCDProc service</li>
<li>Use the up/down button on the firebox to turn on the back-light and move between &#8220;screens&#8221;</li>
</ul>
</li>
</ul>
<p>This firebox range has turned out to be fast and reliable on production networks.</p>
<p><strong>Edit: </strong>As per Stephen&#8217;s comment below, here&#8217;s <a title="PfSense on Watchguard Firebox devices reference" href="http://doc.pfsense.org/index.php/PfSense_on_Watchguard_Firebox" target="_blank">a definitive reference source for Pfsense on Watchguard Firebox devices</a>.</p>
<p>Below are mirrors of the files hosted by Daniel, just in-case they&#8217;ve vanished. These are possibly out of date. Use the pfsense docs link above as the definitive source.</p>
<p><a title="FreeDOS Bios" href="/downloads/firebox/FreeDOSBios.img" target="_blank">The image for flashing the BIOS</a><br />
<a title="X750e and x550e serial console BIOS" href="/downloads/firebox/X750EB2.BIN" target="_blank">The BIOS</a><br />
<a title="WGXepc by stephenw10" href="/downloads/firebox/WGXepc" target="_blank">WGXepc</a><br />
<a title="MD5 sums" href="/downloads/firebox/md5.txt" target="_blank">MD5 sums of all the above</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/installing-pfsense-on-a-watchguard-firebox-x550e-and-x750e/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How to get a status update out of a running dd process on Linux</title>
		<link>http://phil.lavin.me.uk/2013/03/how-to-get-a-status-update-out-of-a-running-dd-process-on-linux/</link>
		<comments>http://phil.lavin.me.uk/2013/03/how-to-get-a-status-update-out-of-a-running-dd-process-on-linux/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 20:08:52 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[dd status]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=905</guid>
		<description><![CDATA[With dd running in a terminal, open a new terminal to the server and send the USR1 signal to the dd process. You can either do this by looking up the process ID and doing: Or use killall to send the signal to all dd processes: You&#8217;ll see output similar to this in the terminal [...]]]></description>
				<content:encoded><![CDATA[<p>With dd running in a terminal, open a new terminal to the server and send the USR1 signal to the dd process. You can either do this by looking up the process ID and doing:</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw2">kill</span> <span class="re5">-USR1</span> pid_here</div></li></ol></pre></div></div>
<p>Or use killall to send the signal to all dd processes:</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="kw2">killall</span> <span class="re5">-USR1</span> <span class="kw2">dd</span></div></li></ol></pre></div></div>
<p>You&#8217;ll see output similar to this in the terminal dd is running in:</p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">45900+0 records in</div></li><li class="li1"><div class="de1">45900+0 records out</div></li><li class="li1"><div class="de1">752025600 bytes (752 MB) copied, 541.855 s, 1.4 MB/s</div></li></ol></pre></div></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/how-to-get-a-status-update-out-of-a-running-dd-process-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cisco IOS: Disable Telnet access&#8230; or enable SSH</title>
		<link>http://phil.lavin.me.uk/2013/03/cisco-ios-disable-telnet-access-or-enable-ssh/</link>
		<comments>http://phil.lavin.me.uk/2013/03/cisco-ios-disable-telnet-access-or-enable-ssh/#comments</comments>
		<pubDate>Sun, 10 Mar 2013 09:27:21 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[disable telnet]]></category>
		<category><![CDATA[enable ssh]]></category>
		<category><![CDATA[ios]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=900</guid>
		<description><![CDATA[Telnet access is enabled by default on some IOS releases. See this article for why this is bad. If you don&#8217;t need Telnet access, you should disable it. The commands are as follows: If you do need remote terminal access, you should switch Telnet to SSH where possible. Be sure to set a secure password. [...]]]></description>
				<content:encoded><![CDATA[<p>Telnet access is enabled by default on some IOS releases. See <a title="The Internet is full of Cisco routers whose password is ‘cisco’" href="http://phil.lavin.me.uk/2011/11/the-internet-is-full-of-cisco-routers-whose-password-is-cisco/" target="_blank">this article</a> for why this is bad.</p>
<p>If you don&#8217;t need Telnet access, you should disable it. The commands are as follows:</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">line vty 0 4</div></li><li class="li1"><div class="de1"> transport input none</div></li></ol></pre></div></div>
<p>If you do need remote terminal access, you should switch Telnet to SSH where possible. Be sure to set a secure password.</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">ip domain-name your.domain.com</div></li><li class="li1"><div class="de1">crypto key generate rsa</div></li><li class="li1"><div class="de1">username yourusername secret supersecretpassword</div></li><li class="li1"><div class="de1">line vty 0 4</div></li><li class="li2"><div class="de2"> transport input ssh</div></li><li class="li1"><div class="de1"> login local</div></li></ol></pre></div></div>
<p>The <em><strong>crypto key generate rsa</strong> </em>command will ask you &#8220;How many bits in the modulus&#8221;. It is recommended to use at least 2048.</p>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/cisco-ios-disable-telnet-access-or-enable-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Injecting jQuery into a web site</title>
		<link>http://phil.lavin.me.uk/2013/03/injecting-jquery-into-a-web-site/</link>
		<comments>http://phil.lavin.me.uk/2013/03/injecting-jquery-into-a-web-site/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 13:01:20 +0000</pubDate>
		<dc:creator>Phil Lavin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[inject jQuery]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://phil.lavin.me.uk/?p=893</guid>
		<description><![CDATA[This is really useful if you need to hack around with a site that doesn&#8217;t use jQuery. In my case, the web interface of a crappy Chinese IP camera which did its recording scheduling by making you click every 15 minute block in the week that you want to record. Full credit should be given [...]]]></description>
				<content:encoded><![CDATA[<p>This is really useful if you need to hack around with a site that doesn&#8217;t use jQuery. In my case, the web interface of a crappy Chinese IP camera which did its recording scheduling by making you click every 15 minute block in the week that you want to record.</p>
<p>Full credit should be given to http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet.</p>
<p>Code which you can put into your browser&#8217;s debugging console is as follows:</p>
<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img border="0" style="border: 0 none" src="http://phil.lavin.me.uk/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><pre class="javascript" style="font-family:monospace;"><ol><li class="li1"><div class="de1"><span class="br0">&#40;</span><span class="kw2">function</span> getScript<span class="br0">&#40;</span>url<span class="br0">&#41;</span><span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">	<span class="kw2">var</span> script<span class="sy0">=</span>document.<span class="me1">createElement</span><span class="br0">&#40;</span><span class="st0">'script'</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">	script.<span class="me1">src</span><span class="sy0">=</span>url<span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li2"><div class="de2">	<span class="kw2">var</span> head<span class="sy0">=</span>document.<span class="me1">getElementsByTagName</span><span class="br0">&#40;</span><span class="st0">'head'</span><span class="br0">&#41;</span><span class="br0">&#91;</span>0<span class="br0">&#93;</span><span class="sy0">,</span></div></li><li class="li1"><div class="de1">	done<span class="sy0">=</span><span class="kw2">false</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	<span class="co1">// Attach handlers for all browsers</span></div></li><li class="li1"><div class="de1">	script.<span class="kw3">onload</span><span class="sy0">=</span>script.<span class="me1">onreadystatechange</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div></li><li class="li2"><div class="de2">		<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="sy0">!</span>done <span class="sy0">&amp;&amp;</span> <span class="br0">&#40;</span><span class="sy0">!</span><span class="kw1">this</span>.<span class="me1">readyState</span> <span class="sy0">||</span> <span class="kw1">this</span>.<span class="me1">readyState</span> <span class="sy0">==</span> <span class="st0">'loaded'</span> <span class="sy0">||</span> <span class="kw1">this</span>.<span class="me1">readyState</span> <span class="sy0">==</span> <span class="st0">'complete'</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span></div></li><li class="li1"><div class="de1">			done<span class="sy0">=</span><span class="kw2">true</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">			script.<span class="kw3">onload</span> <span class="sy0">=</span> script.<span class="me1">onreadystatechange</span> <span class="sy0">=</span> <span class="kw2">null</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">			head.<span class="me1">removeChild</span><span class="br0">&#40;</span>script<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li2"><div class="de2">		<span class="br0">&#125;</span></div></li><li class="li1"><div class="de1">	<span class="br0">&#125;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1">&nbsp;</div></li><li class="li1"><div class="de1">	head.<span class="me1">appendChild</span><span class="br0">&#40;</span>script<span class="br0">&#41;</span><span class="sy0">;</span></div></li><li class="li1"><div class="de1"><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="br0">&#40;</span><span class="st0">'http://code.jquery.com/jquery.min.js'</span><span class="br0">&#41;</span><span class="sy0">;</span></div></li></ol></pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://phil.lavin.me.uk/2013/03/injecting-jquery-into-a-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
