<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-8493265999793025679</id><updated>2009-07-26T01:46:27.044-03:00</updated><title type='text'>Rafael on OpenBSD</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://usingobsd.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default'/><link rel='alternate' type='text/html' href='http://usingobsd.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rafael Almeida</name><uri>http://www.blogger.com/profile/01702511319902661481</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8493265999793025679.post-4451740723869840870</id><published>2008-01-15T23:20:00.000-02:00</published><updated>2008-01-15T23:25:00.507-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kernel debug crash'/><title type='text'>Generating good crash reports</title><content type='html'>I just saw this link on #OpenBSD FreeNode IRC channel and I felt it certainly needed an entry on this blog. The link http://www.benzedrine.cx/crashreport.html explains how to understand what happened when your system crashes. I'm sure it'll be very helpful to anyone who wants to go a little deeper into some kernel crash.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8493265999793025679-4451740723869840870?l=usingobsd.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://usingobsd.blogspot.com/feeds/4451740723869840870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8493265999793025679&amp;postID=4451740723869840870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/4451740723869840870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/4451740723869840870'/><link rel='alternate' type='text/html' href='http://usingobsd.blogspot.com/2008/01/generating-good-crash-reports.html' title='Generating good crash reports'/><author><name>Rafael Almeida</name><uri>http://www.blogger.com/profile/01702511319902661481</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='18382983186470227922'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8493265999793025679.post-7401712286197974612</id><published>2007-11-17T22:10:00.000-02:00</published><updated>2007-11-17T22:17:57.241-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='example pf.conf'/><title type='text'>Changing pf.conf</title><content type='html'>Upgrading to 4.1 I had to change the pass rules, for ``keep state'' and ``flags S/SA'' work differently now. So I ended up making other changes that I think rendered it more readable. Also, since that bug on IPv6 networking I block any ipv6 stuff. It's usually not very wise to share this kind of stuff, I think. But I don't see any problems, after all, this is just my home firewall. So, this is my current pf.conf:&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Macros&lt;br /&gt;#&lt;br /&gt;ext_if="vr0"&lt;br /&gt;int_if="mtd0"&lt;br /&gt;&lt;br /&gt;laptop="192.168.0.5"&lt;br /&gt;desktop="192.168.0.2"&lt;br /&gt;alexandre="192.168.0.3"&lt;br /&gt;&lt;br /&gt;# 6111:6119 - starcraft&lt;br /&gt;# 6881:6999 - bittorrent&lt;br /&gt;# 4662      - emule&lt;br /&gt;# 4665      - emule&lt;br /&gt;# 2222      - ssh on this computer (my ISP won't let me use 22)&lt;br /&gt;# 8080      - httpd on this computer (my ISP won't let me use 80)&lt;br /&gt;# 8081      - httpd on my desktop&lt;br /&gt;# 9418      - git&lt;br /&gt;# 3690      - svn&lt;br /&gt;allowed_tcp="{ 6111:6119, 6881:6999, 4662, 2222, 8080, 8081, 9418, ident,\&lt;br /&gt;               3690 }"&lt;br /&gt;allowed_udp="{ 6111:6119, 4665, 4672, 3690 }"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Tables&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Options&lt;br /&gt;#&lt;br /&gt;set loginterface $ext_if&lt;br /&gt;set block-policy return&lt;br /&gt;&lt;br /&gt;set skip on lo0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Scrub&lt;br /&gt;#&lt;br /&gt;scrub in all max-mss 1440&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Queueing&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Translation&lt;br /&gt;#&lt;br /&gt;nat on egress from !(egress) -&gt; (egress:0) static-port&lt;br /&gt;&lt;br /&gt;#bittorrent&lt;br /&gt;rdr on egress proto tcp to port 6881:6999 -&gt; $laptop&lt;br /&gt;&lt;br /&gt;#emule ports&lt;br /&gt;rdr on egress proto tcp to port 4662 -&gt; $desktop&lt;br /&gt;rdr on egress proto udp to port { 4665, 4672 } -&gt; $desktop&lt;br /&gt;&lt;br /&gt;#git&lt;br /&gt;rdr on egress proto tcp to port 9418 -&gt; $laptop&lt;br /&gt;&lt;br /&gt;#http&lt;br /&gt;rdr on egress proto tcp to port 8081 -&gt; $desktop&lt;br /&gt;&lt;br /&gt;#starcraft ports&lt;br /&gt;rdr on egress proto { tcp, udp } to port 6111:6119 -&gt; $alexandre&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Filter rules&lt;br /&gt;#&lt;br /&gt;# I don't use IPv6&lt;br /&gt;block in quick inet6&lt;br /&gt;&lt;br /&gt;#allow everything from the internal network&lt;br /&gt;pass in quick on $int_if all modulate state&lt;br /&gt;&lt;br /&gt;#allow any packet to get out (this includes redirected stuff)&lt;br /&gt;pass out quick all modulate state&lt;br /&gt;&lt;br /&gt;#block everything by default&lt;br /&gt;block in on egress all&lt;br /&gt;&lt;br /&gt;#don't block this egressing traffic&lt;br /&gt;pass in on egress proto tcp from any to any port $allowed_tcp modulate state&lt;br /&gt;pass in on egress proto udp from any to any port $allowed_udp&lt;br /&gt;pass in inet proto icmp all icmp-type echoreq&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8493265999793025679-7401712286197974612?l=usingobsd.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://usingobsd.blogspot.com/feeds/7401712286197974612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8493265999793025679&amp;postID=7401712286197974612' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/7401712286197974612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/7401712286197974612'/><link rel='alternate' type='text/html' href='http://usingobsd.blogspot.com/2007/11/changing-pfconf.html' title='Changing pf.conf'/><author><name>Rafael Almeida</name><uri>http://www.blogger.com/profile/01702511319902661481</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='18382983186470227922'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8493265999793025679.post-323638694484862696</id><published>2007-11-15T21:18:00.000-02:00</published><updated>2007-11-15T21:52:42.397-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mergemaster openbsd 4.0 4.1 upgrade'/><title type='text'>Upgrading from 4.0 to 4.1 (mergemaster)</title><content type='html'>Yeah, yeah, I never post on this thing. But that's because I rarely have any issues with OpenBSD. I decided to upgrade from 4.0 to 4.1 (yep, I'm still running behind the latest version). I didn't use my etc-update script at all this time, instead I used the mergemaster. It's a very good program, but you have to know what parameters to call it with. I didn't at first and I think I might have done some minor damage to my system, oh well, it won't happen again.&lt;br /&gt;&lt;br /&gt;What I did was just calling mergemaster without any parameters or anything. It seems that it generates the stock options and let you chose what to upgrade. That's rather nice behaviour, but it wasn't clear to me at first. So I ended up using de /dev/MAKEDEV it generated. I relised that and copied the MAKEDEV on base41.tgz to /dev, I think I fixed it fine. Well, the system is working, so I guess I didn't do TERRIBLE bad.&lt;br /&gt;&lt;br /&gt;Now, for doing it right. All you need is upacking the etc41.tgz to /tmp and then use mergemaster like this:&lt;br /&gt;&lt;br /&gt;# mergemaster -rt /tmp&lt;br /&gt;&lt;br /&gt;It worked smoothly and now I have a upgraded system :).&lt;br /&gt;&lt;br /&gt;Later on I found out that if I had just changed the /usr/src for the openbsd 4.1 src it would work simply typing ``mergemaster''. I guess we only learn by trying, and you guys may learn by my mistakes.&lt;br /&gt;&lt;br /&gt;See you in a few months (or years, or decades)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8493265999793025679-323638694484862696?l=usingobsd.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://usingobsd.blogspot.com/feeds/323638694484862696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8493265999793025679&amp;postID=323638694484862696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/323638694484862696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/323638694484862696'/><link rel='alternate' type='text/html' href='http://usingobsd.blogspot.com/2007/11/upgrading-from-40-to-41-mergemaster.html' title='Upgrading from 4.0 to 4.1 (mergemaster)'/><author><name>Rafael Almeida</name><uri>http://www.blogger.com/profile/01702511319902661481</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='18382983186470227922'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8493265999793025679.post-5275632395912025498</id><published>2007-03-12T05:23:00.000-03:00</published><updated>2007-03-12T05:38:12.141-03:00</updated><title type='text'>Setting up pf</title><content type='html'>I have a local nat here at home, so I needed to configure pf right away after installing openbsd. I've actually done that when I installed a week ago or so. But only today I study the pf user's guide (I didn't read it all, some topics such as queueing and load balancing, and everything after that I didn't get to read). You can read it at: http://www.openbsd.org/faq/pf/index.html&lt;br /&gt;&lt;br /&gt;I think now I'm more confortable with the pf tool and I know a little more what it's capable of doing. I liked it, I thought it was far better to use than iptables (although I don't have much experience with iptables). I configured it this way:&lt;br /&gt;# Macros&lt;br /&gt;ext_if="vr0"&lt;br /&gt;int_if="mtd0"&lt;br /&gt;allowed_tcp="{ 6112:6119, 4662, 2222, ident }"&lt;br /&gt;allowed_udp="{ 6112:6119, 4665, 4672 }"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Tables&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Options&lt;br /&gt;set loginterface $ext_if&lt;br /&gt;set block-policy return&lt;br /&gt;&lt;br /&gt;set skip on lo0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Scrub&lt;br /&gt;scrub in all max-mss 1440&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Queueing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Translation&lt;br /&gt;nat on egress from !(egress) -&gt; (egress:0) static-port&lt;br /&gt;&lt;br /&gt;#ftp workaround&lt;br /&gt;nat-anchor "ftp-proxy/*"&lt;br /&gt;rdr-anchor "ftp-proxy/*"&lt;br /&gt;&lt;br /&gt;#starcraft ports&lt;br /&gt;rdr on egress proto { tcp, udp } to port 6112:6119 -&gt; \&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;192.168.0.3&lt;br /&gt;#emule ports&lt;br /&gt;rdr on egress proto tcp to port 4662 -&gt; 192.168.0.2&lt;br /&gt;rdr on egress proto udp to port { 4665, 4672 } -&gt; 192.168.0.2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Filter rules&lt;br /&gt;#allow everything from the internal network&lt;br /&gt;pass in quick on $int_if all modulate state flags S/SA&lt;br /&gt;#allow any packet to get out (this includes redirected stuff)&lt;br /&gt;pass out quick all modulate state flags S/SA&lt;br /&gt;&lt;br /&gt;block in on egress all&lt;br /&gt;&lt;br /&gt;#ftp workaround&lt;br /&gt;anchor "ftp-proxy/*"&lt;br /&gt;&lt;br /&gt;pass in on egress proto tcp from any to any port $allowed_tcp \&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;modulate state flags S/SA&lt;br /&gt;pass in on egress proto udp from any to any port \&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$allowed_udp keep state&lt;br /&gt;pass in inet proto icmp all icmp-type echoreq keep state&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8493265999793025679-5275632395912025498?l=usingobsd.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://usingobsd.blogspot.com/feeds/5275632395912025498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8493265999793025679&amp;postID=5275632395912025498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/5275632395912025498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/5275632395912025498'/><link rel='alternate' type='text/html' href='http://usingobsd.blogspot.com/2007/03/setting-up-pf.html' title='Setting up pf'/><author><name>Rafael Almeida</name><uri>http://www.blogger.com/profile/01702511319902661481</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='18382983186470227922'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8493265999793025679.post-2112312087479248720</id><published>2007-03-11T04:20:00.000-03:00</published><updated>2007-03-11T04:33:29.344-03:00</updated><title type='text'>Updating the etc.tgz set</title><content type='html'>After installing the OpenBSD I noticed that there were a few corrected bugs for my release (4.0) at &lt;a href="http://www.openbsd.org/errata40.html"&gt;www.openbsd.org/errata40.html&lt;/a&gt;. So, I figure it was time to upgrade. Everything went very smoothly, reading the release(8) manpage was enough to teach myself how to create a release with the patches. I'm currently following the -stable branch (patch branch), by the way.&lt;br /&gt;&lt;br /&gt;After creating my release and installing it I found out that I was to merge the differences on the configuration files by myself. Doing so by hand is very tedius, so I wrote my own script to help me out. It will be helpful when I'm to upgrade to openbsd 4.1 also.&lt;br /&gt;&lt;br /&gt;The usage of the script is very simple. Just decompress the etc.tgz set on some directory (in my case it was &lt;span style="font-style: italic;"&gt;/tmp/config&lt;/span&gt;) and execute the program like this:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sh update-etc /tmp/config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've done a little testing, but not too much, so it may still have some bugs, specially because I'm not really used to shell programming (I could write it in python, the scripting language I'm most confortable, but I wanted it to be compatible with openbsd out of the box). It has been working fine by now, if I find any bugs I'll make a new post telling everyone (I'll update this post also). If you find some bug tell me and I'll fix it.&lt;br /&gt;&lt;br /&gt;Without any further ado, this is the script:&lt;br /&gt;&lt;a href="http://www.dcc.ufmg.br/%7Erafaelc/update-etc"&gt;http://www.dcc.ufmg.br/~rafaelc/update-etc&lt;/a&gt;&lt;br /&gt;download it, and have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8493265999793025679-2112312087479248720?l=usingobsd.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://usingobsd.blogspot.com/feeds/2112312087479248720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=8493265999793025679&amp;postID=2112312087479248720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/2112312087479248720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8493265999793025679/posts/default/2112312087479248720'/><link rel='alternate' type='text/html' href='http://usingobsd.blogspot.com/2007/03/updating-etctgz-set.html' title='Updating the etc.tgz set'/><author><name>Rafael Almeida</name><uri>http://www.blogger.com/profile/01702511319902661481</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='18382983186470227922'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>