<?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>OpenBSD and FreeBSD resources &#187; tip</title>
	<atom:link href="http://purebsd.com/tag/tip/feed" rel="self" type="application/rss+xml" />
	<link>http://purebsd.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jun 2010 06:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Security tips</title>
		<link>http://purebsd.com/security-tips.html</link>
		<comments>http://purebsd.com/security-tips.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:29:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=50</guid>
		<description><![CDATA[Here I try to explain what further measures I took to further secure my system. Note: it is Considered Wise(tm) to backup any files before you edit them to something likeorigfile-dist where origfile is the name of the file you&#8217;re about to modify. I tortured my system with the following: Login to the machine as root. [...]]]></description>
			<content:encoded><![CDATA[<p>Here I try to explain what further measures I took to further secure my system.</p>
<p>Note: it is Considered Wise(tm) to backup any files before you edit them to something like<code>origfile-dist</code> where <code>origfile</code> is the name of the file you&#8217;re about to modify.</p>
<p>I tortured my system with the following:</p>
<ol type="1">
<li>Login to the machine as root.<br />
Add your own user account.<br />
Put that account in de group wheel, so you will be able to su to root.</li>
<li>If you&#8217;re just a little paranoid, you should edit /etc/sshd_config:<br />
&laquo;PermitRootLogin yes&raquo; -&gt; &laquo;PermitRootLogin no&raquo;<br />
This disables root logins over the network and that&#8217;s a Good Thing(tm).</li>
<li>Different versions of OpenBSD have different services enabled/disabled by default. Check /etc/inetd.conf and /etc/rc.conf and disable what you don&#8217;t like and enable what pleases you. Use a portscanner like <code><a href="http://web.archive.org/web/20060313055505/http://www.insecure.org/nmap">nmap</a></code> to double check you haven&#8217;t forgotten anything to turn on or off.</li>
<li>OpenBSD&#8217;s 2.7 <code>/etc/inetd.conf</code> file contains some lines I like to comment out:
<pre>    ..
    finger
    ..
    comsat
    ntalk
    ..
    daytime
    time
    ..
    rstatd/1-3
    rusersd/1-3
    ..</pre>
<p>So I commented them out (-:</li>
<li>If <code>portmap</code> makes you puke, edit <code>/etc/rc.conf</code> and change <code>portmap=YES</code> into something better. For instance: <code>portmap=NO</code>.</li>
<li>/etc/inetd.conf contains a line for the ident daemon:<br />
<em>ident stream tcp nowait nobody /usr/libexec/identd identd -elo</em><br />
But I&#8217;d like to run it through the tcp_wrapper, so I changed it to:<br />
<em>ident stream tcp nowait nobody /usr/libexec/tcpd identd -elo</em></li>
<li>/etc/hosts.allow and /etc/hosts.deny define which hosts may or may not use certain system facilities. If you&#8217;re paranoid you place only one line in /etc/hosts.deny:
<p><em>ALL: ALL</em></p>
<p>After that you define the hosts that do may connect to your system in /etc/hosts.allow, e.g.:</p>
<p><em>in.proftpd: 192.168.0. trusted-host.microsoft.com .no-evil-here.net<br />
identd: ALL<br />
</em></li>
<li><code>cron</code> is a neat, but powerful scheduler for Unices. But you might not want to have anyone being able to use it. For limited access create a file in <code>/var/cron</code> called <code>allow</code> if only a limited set of people may have a crontab. Create a <code>deny</code> file in that same directory if you want everyone to be able to use cron except a few nasty bastards you don&#8217;t like/trust enough.
<p><code>/var/cron/allow:</p>
<p>root<br />
alex<br />
forge<br />
</code></li>
<li>Remote syslog. It is possible for whisper in <code>syslogd</code>&#8216;s ear that it should send it&#8217;s log entries not only to the various files in <code>/var/log</code>, but also to a remote host listening to the UDP syslog port (udp/514).<br />
Fire up /etc/syslog.conf in <code>vi</code> and place anywhere you like the following line:</p>
<pre>*.*			@192.168.5.14</pre>
<p>Now syslogd will send ALL entries feeded to it also to <code>udp/192.168.5.14:514</code>. Be careful to only use tabs when editing <code>/etc/syslog.conf</code>. Spaces are poison for<code>syslogd</code>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/security-tips.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL and OpenBSD</title>
		<link>http://purebsd.com/mysql-and-openbsd.html</link>
		<comments>http://purebsd.com/mysql-and-openbsd.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:28:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=48</guid>
		<description><![CDATA[A tip. After installation of MySQL, you should edit the file /usr/local/bin/safe_mysqld: Look for the line with a #-sign in front of ulimit -n 256. Remove that comment token and MySQL has some room to breathe. Explanation: by default, a user is permitted to open only 64 files at a time. When you are greedy and [...]]]></description>
			<content:encoded><![CDATA[<p>A tip.</p>
<p>After installation of MySQL, you should edit the file /usr/local/bin/safe_mysqld:<br />
Look for the line with a #-sign in front of <code>ulimit -n 256</code>. Remove that comment token and MySQL has some room to breathe.</p>
<p>Explanation: by default, a user is permitted to open only 64 files at a time. When you are greedy and want more, you should execute a <code>ulimit -n 256</code> for instance. The MySQL binary package in de OpenBSD packages directory does not raise its limit of 64 files by default, so it runs out of file descriptors rather fast, leading to strange, seamingly inconsistent, errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/mysql-and-openbsd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

