<?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>Blog &#187; Linux</title>
	<atom:link href="http://blog.marcuscobden.co.uk/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.marcuscobden.co.uk</link>
	<description>Reflections of a compulsive engineer</description>
	<lastBuildDate>Wed, 01 Sep 2010 10:05:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>On-demand TCP over DNS server</title>
		<link>http://blog.marcuscobden.co.uk/2010/08/on-demand-tcp-over-dns-server/</link>
		<comments>http://blog.marcuscobden.co.uk/2010/08/on-demand-tcp-over-dns-server/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 13:24:39 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://blog.marcuscobden.co.uk/?p=40</guid>
		<description><![CDATA[Virtual servers have become quite cheap these days, to the point where I can justify paying the monthly charge on one when I&#8217;m not sure how much I&#8217;ll use it. One of the things I have been running on my VM is a TCP-over-DNS server; it will allow you access to the Internet through some [...]]]></description>
			<content:encoded><![CDATA[<p>Virtual servers have become quite cheap these days, to the point where I can justify paying the monthly charge on one when I&#8217;m not sure how much I&#8217;ll use it.</p>
<p>One of the things I have been running on my <abbr title="Virtual Machine">VM</abbr> is a <a href="http://analogbit.com/software/tcp-over-dns">TCP-over-DNS server</a>; it will allow you access to the Internet through some access points where you&#8217;re forced to login, though it relies on the network administrator neglecting to block certain types of DNS query.  The author has posted a good <a href="http://analogbit.com/tcp-over-dns_howto">how-to and overview</a> of how it works so I&#8217;m not going to go into that here.</p>
<p>Now, I don&#8217;t anticipate using this tunneller very often so it&#8217;d be nice to not run the daemon all the time, but I obviously can&#8217;t enable myself unless I know in advance that I won&#8217;t have Internet access. Therefore, ideally I want the server to run only when I want to use it. Fortunately Linux has long had a means of doing this with the inetd daemon.</p>
<p>The inetd daemon will monitor a network socket, waiting for incoming traffic, and launch your daemon only when it is needed. It then passes the daemon process the existing sockets and waits for it to finish, at which point it&#8217;ll go back to watching for traffic again.</p>
<p>The config line you&#8217;ll need for inetd is as follows (you may need to highlight it and copy it elsewhere, as it doesn&#8217;t show up well in this theme):</p>
<pre>domain  dgram   udp     wait    root    /usr/bin/java   java -jar /path/to/tcp-over-dns-server.jar --domain delegated.domain.com --forward-port 22 --forward-address 127.0.0.1 --mtu 1500 --log-level 1 --idle-timeout 10 --log-file /var/log/tcp-over-dns</pre>
<p>Aside from modifying the server to support inherited channels I have:</p>
<ol>
<li>Added an idle time limit (so the program can exit if it sees no clients after a set number of seconds, and let inetd monitor the port again)</li>
<li>Added a log file option (programs launched by inetd can&#8217;t log to the standard output or error channels as inetd will pipe them into the inherited connection.)</li>
<li>Changed the default behaviour (If a channel is inherited the server will no longer try to bind on its default port)</li>
</ol>
<p>If you&#8217;re interested you can download <a href="http://blog.marcuscobden.co.uk/wp-content/uploads/2010/08/TCP-over-DNS-inetd.tgz">the source code</a> or just the <a href="http://blog.marcuscobden.co.uk/wp-content/uploads/2010/08/tcp-over-dns-server.jar">pre-compiled jar file</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marcuscobden.co.uk/2010/08/on-demand-tcp-over-dns-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dual Booting Windows Vista and XP</title>
		<link>http://blog.marcuscobden.co.uk/2009/08/dual-booting-windows-vista-and-xp/</link>
		<comments>http://blog.marcuscobden.co.uk/2009/08/dual-booting-windows-vista-and-xp/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 20:10:00 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Drive letters]]></category>
		<category><![CDATA[Dual boot]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://newblog.marcuscobden.co.uk/?p=13</guid>
		<description><![CDATA[You can use grub to hide an NTFS partition from the Windows XP installer, coaxing it to install on "C:" rather than something like "H:".]]></description>
			<content:encoded><![CDATA[<p>At work I have 3 Operating systems installed on my PC; Ubuntu Linux, Vista and XP. Originally I only had Ubuntu and Vista, and a big empty portion of the disk intended for XP if I needed it.</p>
<p>Due to these existing partitions, and a USB media card reader, the Windows XP installer would decide label it&#8217;s system partition &#8220;H:&#8221;, instead of the usual &#8220;C:&#8221;. I&#8217;m not sure how much this would have broken, but it annoyed me to the point that I found a hack to fix it.</p>
<p>I found that grub (the linux boot-loader) on my Linux partition allows you to <a href="http://www.gnu.org/software/grub/manual/html_node/DOS-Windows.html">edit the partition table and set the Vista NTFS partition to &#8216;hidden&#8217;</a>. The XP installer could still see there was a partition there, but it didn&#8217;t understand it, and thus labelled it&#8217;s new partition &#8220;C:&#8221;. XP will of course then proceed to clobber your existing bootloader, but that&#8217;s a common occurrence, and fixable from a LiveCD, google is your friend here.</p>
<p>You should also be able to use a copy of grub on a LiveCD to mark the partition as (un)hidden if you don&#8217;t have Linux on your system normally.</p>
<p>Apologies for any vagueness and lack of technical details, this post has been on the back burner for a few months now, and I&#8217;ve actually forgotten most of the details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marcuscobden.co.uk/2009/08/dual-booting-windows-vista-and-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
