<?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>Dan&#039;s Thoughts &#187; linux</title>
	<atom:link href="http://danboykis.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://danboykis.com</link>
	<description>Thinking somewhat carefully</description>
	<lastBuildDate>Thu, 12 Aug 2010 21:28:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Converting a regular BIND ZONE to DNSSEC</title>
		<link>http://danboykis.com/2010/06/converting-a-regular-bind-zone-to-dnssec/</link>
		<comments>http://danboykis.com/2010/06/converting-a-regular-bind-zone-to-dnssec/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 02:57:08 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[dns]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://danboykis.com/?p=2070</guid>
		<description><![CDATA[Recently I wanted to sign a regular zone in BIND9.7. Google wasn't very helpful so I thought I'd write up a little bit about it here. My /etc/named.conf looks like this: zone &#34;myzone.com&#34; IN &#123; type master; file &#34;/var/named/zones/myzone.com/myzone.com&#34;; notify no; &#125;; I want to keep my dnssec zones in a separate directory. # mkdir [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wanted to sign a regular zone in BIND9.7. Google wasn't very helpful so I thought I'd write up a little bit about it here.</p>
<p>My <strong>/etc/named.conf</strong> looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zone <span style="color: #ff0000;">&quot;myzone.com&quot;</span> IN <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">type</span> master;
        <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/var/named/zones/myzone.com/myzone.com&quot;</span>;
        notify no;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>I want to keep my dnssec zones in a separate directory.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># mkdir -p /var/named/signed/myzone.com/
# cp /var/named/zones/myzone.com/myzone.com /var/named/signed/myzone.com/</pre></div></div>

<p>Now I sign the zone.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># cd /var/named/signed/myzone.com/
# dnssec-keygen -r /dev/urandom myzone.com
# dnssec-keygen -r /dev/urandom -f KEY myzone.com
# dnssec-signzone -r /dev/urandom -S myzone.com
# ls 
myzone.com         Kmyzone.com.+005+02971.key      Kmyzone.com.+005+29262.private
myzone.com.signed  Kmyzone.com.+005+02971.private
dsset-myzone.com.  Kmyzone.com.+005+29262.key</pre></div></div>

<p>Finally I want to change the <strong>named.conf</strong> to the <strong>myzone.com.signed</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zone <span style="color: #ff0000;">&quot;myzone.com&quot;</span> IN <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">type</span> master;
        <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/var/named/signed/myzone.com/myzone.com.signed&quot;</span>;
        notify no;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>Make sure that all the files are owned by user "named" and reload bind</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># chown -R named:named /var/named/signed
# /etc/init.d/named reload</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://danboykis.com/2010/06/converting-a-regular-bind-zone-to-dnssec/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XeLaTeX fun</title>
		<link>http://danboykis.com/2008/07/xelatex-fun/</link>
		<comments>http://danboykis.com/2008/07/xelatex-fun/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 14:44:00 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[latex]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://danboykis.com/2008/07/18/xelatex-fun/</guid>
		<description><![CDATA[After reading this post I wanted to dabble with TeX again. I haven't used it since university days so I thought it was time to polish off the rust. I am on a Debian box, so these are the steps I took to get XeLateX to work. $ apt-get install texlive-full texlive-formats-extra $ mkdir ~/.fonts [...]]]></description>
			<content:encoded><![CDATA[<p>After reading <a href="http://existentialtype.net/2008/07/12/fonts-in-latex-part-one-xelatex/">this post</a> I wanted to dabble with TeX again. I haven't used it since university days so I thought it was time to polish off the rust. I am on a Debian box, so these are the steps I took to get XeLateX to work.</p>
<pre>$ apt-get install texlive-full texlive-formats-extra
$ mkdir ~/.fonts &amp;&amp; cd ~/.fonts
$ wget http://www.gust.org.pl/projects/e-foundry/tex-gyre/pagella/qpl1.103otf.zip
$ unzip qpl1.103otf.zip
$ rm qpl1*.zip</pre>
<p>After about 20 minutes I had everything set up and was ready to follow the tutorial.<br />
My <span style="font-style: italic;">sample.tex </span>file looks like this:</p>
<pre>\documentclass{article}
\usepackage{fontspec}
\setromanfont{TeX Gyre Pagella}
\begin{document}
Testing XeLaTeX!

Greek: τεχ
\end{document}</pre>
<p>Now to make sure everything works...</p>
<pre>$ xelatex sample.tex
This is XeTeXk, Version 3.141592-2.2-0.996-patch1 (Web2C 7.5.6)
%&amp;-line parsing enabled.
entering extended mode
(./sample.tex
LaTeX2e &lt;2005/12/01&gt;
Babel  and hyphenation patterns for english, usenglishmax, dumylang, no
yphenation, arabic, farsi, croatian, ukrainian, russian, bulgarian, czech, slo
ak, danish, dutch, finnish, basque, french, german, ngerman, ibycus, greek, mo
ogreek, ancientgreek, hungarian, italian, latin, mongolian, norsk, icelandic,
nterlingua, turkish, coptic, romanian, welsh, serbian, slovenian, estonian, es
eranto, uppersorbian, indonesian, polish, portuguese, spanish, catalan, galici
n, swedish, ukenglish, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-texlive/tex/latex/tools/calc.sty)
(/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.tex
(/usr/share/texmf-texlive/tex/latex/xkeyval/keyval.tex)))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/xelatex/euenc/eu1enc.def)
(/usr/share/texmf-texlive/tex/xelatex/euenc/lm/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.cfg)) (./sample.aux)
[1] (./sample.aux) )
Output written on sample.pdf (1 page).
Transcript written on sample.log.</pre>
<p>Success!<br />
Next time I'll create something a little more substantive.</p>
]]></content:encoded>
			<wfw:commentRss>http://danboykis.com/2008/07/xelatex-fun/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>aria2 download tool</title>
		<link>http://danboykis.com/2008/07/aria2-download-tool/</link>
		<comments>http://danboykis.com/2008/07/aria2-download-tool/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 20:27:00 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://danboykis.com/2008/07/13/aria2-download-tool/</guid>
		<description><![CDATA[I ran into an interesting downloading application, Aria2. I was reminded of a GetRight utility I ran into years ago. The thing I really liked about GetRight at the time was the ability to download linux ISOs from multiple mirrors and merge the results into one coherent file. It really sped up downloading new Slackware [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an interesting downloading application, <a href="http://aria2.sourceforge.net/">Aria2.</a> I was reminded of a GetRight utility I ran into years ago. The thing I really liked about GetRight at the time was the ability to download linux ISOs from multiple mirrors and merge the results into one coherent file. It really sped up downloading new Slackware releases :-) This to me is the most compelling feature of Aria2 and it works thus:
<pre>aria2c -s2 http://host/image.iso http://mirror1/image.iso http://mirror2/image.iso</pre>
<p>The main page has plenty of examples with many different transfer protocols. Too bad the parallel download features seem to have disappeared with the invention of bit torrent.</p>
]]></content:encoded>
			<wfw:commentRss>http://danboykis.com/2008/07/aria2-download-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IpTables</title>
		<link>http://danboykis.com/2008/07/ipchains/</link>
		<comments>http://danboykis.com/2008/07/ipchains/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 01:04:43 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://danboykis.com/?p=68</guid>
		<description><![CDATA[Task Write a iptables script that blocks everything except ping (icmp) and ssh (port 22), http (80) and https (443). Solution #!/bin/bash export ipt=/sbin/iptables $ipt -F #Flush all the rules one by one &#160; #Allow SSH $ipt -A INPUT -p tcp --dport 22 -j ACCEPT #Allow HTTP $ipt -A INPUT -p tcp --dport 80 -j [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold;">Task</span></p>
<p>Write a iptables script that blocks everything except ping (icmp) and ssh (port 22), http (80) and https (443).</p>
<p><span style="font-weight: bold;">Solution</span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ipt</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-F</span> <span style="color: #666666; font-style: italic;">#Flush all the rules one by one</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Allow SSH</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">22</span> <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #666666; font-style: italic;">#Allow HTTP</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">80</span> <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #666666; font-style: italic;">#Allow HTTPS</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">443</span> <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;"># Set default policies for INPUT, FORWARD and OUTPUT chains</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-P</span> INPUT DROP
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-P</span> FORWARD DROP
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-P</span> OUTPUT ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;"># Set access for localhost</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;"># Accept packets belonging to established and related connections</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> ESTABLISHED,RELATED <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;">#Allow pings</span>
<span style="color: #666666; font-style: italic;">#Ping requires the ability to accept packets and send packet back out.</span>
<span style="color: #666666; font-style: italic;">#Ping is a layer 3,ICMP operation.</span>
<span style="color: #666666; font-style: italic;">#In order to allow it our protocol now becomes icmp instead of tcp.</span>
<span style="color: #666666; font-style: italic;">#Ping packets are able to be received.</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-I</span> INPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;">#Ping packets are able to be sent</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-I</span> OUTPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;"># List rules</span>
<span style="color: #007800;">$ipt</span> <span style="color: #660033;">-L</span> <span style="color: #660033;">-v</span></pre></div></div>

<p>-m says load a module state which allows access to the connection tracking state of the packets<br />
--state precedes a comma separated list of the connection states to match. In this case it's NEW.<br />
NEW the packet has started a new connection or a connection that has not seen packets going in both directions<br />
-m tcp load the tcp module (just like we loaded the state module) this module allows us extra functionality with tcp<br />
-p tcp specifies protocol, in my case TCP<br />
--dport 22 feature provided by the -m tcp module, in this case I want the rule to be applicable to port 22 (ssh).<br />
-j ACCEPT means the results of this chain is to accept the packets. (-j specifies the target of the rule if the packet matches the rule. If I said -j DROP we would block all traffic to port 22).</p>
]]></content:encoded>
			<wfw:commentRss>http://danboykis.com/2008/07/ipchains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
