<?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>Simon Žekar - unix, communications, stupidities</title>
	<atom:link href="http://simon.zekar.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://simon.zekar.com</link>
	<description>"Unix is simple, but it takes a genious to understand the simplicity" --Dennis Ritchie</description>
	<lastBuildDate>Fri, 18 May 2012 20:00:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>FreeBSD disk/partition resize &#8211; grow on version 7.x or older under vmware ESXi</title>
		<link>http://simon.zekar.com/2012/05/18/freebsd-grow-partition-disk-vmware-esxi/</link>
		<comments>http://simon.zekar.com/2012/05/18/freebsd-grow-partition-disk-vmware-esxi/#comments</comments>
		<pubDate>Fri, 18 May 2012 20:00:26 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[FreeBSD hacks]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=188</guid>
		<description><![CDATA[I&#8217;ve tried this on vmware ESXi4.1. First, shut down the server and enlarge the disk size in the VM config. Boot into single user mode (press 4 and boot). Check the block count of the new disk (seen at boot &#8211; dmesg) &#8211; in our case 419430400. Update the partition size with fdisk -u /dev/da0 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried this on vmware ESXi4.1.</p>
<p>First, shut down the server and enlarge the disk size in the VM config.</p>
<p>Boot into single user mode (press 4 and boot).</p>
<p>Check the block count of the new disk (seen at boot &#8211; dmesg) &#8211; in our case 419430400.</p>
<p><a href="http://simon.zekar.com/wp-content/uploads/2012/05/resize-single.png"><img class="alignnone size-medium wp-image-189" title="boot block count" src="http://simon.zekar.com/wp-content/uploads/2012/05/resize-single-300x81.png" alt="" width="300" height="81" /></a></p>
<p>Update the partition size with <code>fdisk -u /dev/da0</code></p>
<p>when asked, the start of the updated partition stays the default but the end of the partition you can write the block count of the new disk (419430400). Actual end is less that this size, but fdisk sees that and it suggests the correct number which you can agree on.</p>
<p>you can check if all went well with <code>fdisk -s</code>. It should be the new block size (little less that the block cound of the disk) &#8211; <strong>write down this number</strong>.</p>
<p><a href="http://simon.zekar.com/wp-content/uploads/2012/05/resize-fdisk-s.png"><img class="alignnone size-medium wp-image-190" title="resize fdisk -s" src="http://simon.zekar.com/wp-content/uploads/2012/05/resize-fdisk-s-300x142.png" alt="fdisk -s" width="300" height="142" /></a></p>
<p>time to update the slice table. This is done by:</p>
<p><code>bsdlabel -e da0s1</code></p>
<p>There you edit the number under &#8220;# &#8220;raw&#8221; part, don&#8217;t edit&#8221;. Funny <img src='http://simon.zekar.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  You must change the number here to the block count seen with &#8220;fdisk -s&#8221; after updating partition.</p>
<p>And then change last line &#8211; usually entry &#8220;f&#8221; which is by default &#8220;/usr&#8221;. Remember that you can only grow the last partition !!.</p>
<p>Change the first number of the &#8220;f&#8221; entry with the <strong>number which is number of blocks</strong> seen via &#8220;fdisk -s&#8221; <strong>minus</strong> the <strong>offset</strong> of the f entry (next number in line).</p>
<p>Save this config.</p>
<p>Now the partition is bigger but the filesystem doesn&#8217;t know about it. This is where growfs comes in (was surprised to see that it has been introduced in BSD 3.x).</p>
<p><code>growfs /dev/da0s1f</code></p>
<p><a href="http://simon.zekar.com/wp-content/uploads/2012/05/resize-growfs.png"><img class="alignnone size-medium wp-image-191" title="resize growfs" src="http://simon.zekar.com/wp-content/uploads/2012/05/resize-growfs-300x167.png" alt="resize growfs" width="300" height="167" /></a></p>
<p>and there, you have resized partition.</p>
<p>type CTRL+D to boot into the new &#8211; grown partition.</p>
<p>I noticed that this procedure works only for version smaller than FreeBSD 8.<br />
It should work on higher versions but I&#8217;ve seen very unstable behaviour &#8211; kernel crashes&#8230; after using fdisk/diskabel.</p>
<p>For versions FreeBSD 8+ the utility gpart (don&#8217;t confuse with gparted !!!t) is used which will be described in next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2012/05/18/freebsd-grow-partition-disk-vmware-esxi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell output history in screen(1)</title>
		<link>http://simon.zekar.com/2012/05/14/shell-output-history-in-screen1/</link>
		<comments>http://simon.zekar.com/2012/05/14/shell-output-history-in-screen1/#comments</comments>
		<pubDate>Mon, 14 May 2012 18:45:04 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=182</guid>
		<description><![CDATA[We all know the great things screen can do for a sysadmin &#8211; you can detach running process and come back to see it anytime. But if you want to see what was happening while you were gone, you need to browse the history of the shell process. It&#8217;s simple, CTRL+A [. That means CTRL+A [...]]]></description>
			<content:encoded><![CDATA[<p>We all know the great things <a href="http://www.gnu.org/software/screen/">screen</a> can do for a sysadmin &#8211; you can detach running process and come back to see it anytime.</p>
<p>But if you want to see what was happening while you were gone, you need to browse the history of the shell process.</p>
<p>It&#8217;s simple, CTRL+A [. That means CTRL+A to enter command mode, then release it and press character &#8220;[&#8220;.</p>
<p>More in detail <a href="http://www.samsarin.com/blog/2007/03/11/gnu-screen-working-with-the-scrollback-buffer/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2012/05/14/shell-output-history-in-screen1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>syncing FreeBSD server with NTP is simpler than you may think</title>
		<link>http://simon.zekar.com/2011/03/25/syncing-freebsd-server-with-the-ntp-clock/</link>
		<comments>http://simon.zekar.com/2011/03/25/syncing-freebsd-server-with-the-ntp-clock/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 20:55:24 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[ntp]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=157</guid>
		<description><![CDATA[After setting up a config file for the NTP on every server, i figured out that a stock settings just work. so adding: ntpd_enable="YES" ntpdate_enable="YES" to the /etc/rc.conf just does the trick (and starting services if not rebooting the server). After some moments of running the ntp client you can check it with: # ntpq [...]]]></description>
			<content:encoded><![CDATA[<p>After setting up a config file for the <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ntp.html">NTP on every server</a>, i figured out that a stock settings just work.</p>
<p>so adding:</p>
<p><code>ntpd_enable="YES"<br />
ntpdate_enable="YES"</code></p>
<p>to the /etc/rc.conf just does the trick (and starting services if not rebooting the server).</p>
<p>After some moments of running the ntp client you can check it with:</p>
<p><code># ntpq -c peers<br />
    remote           refid      st t when poll reach   delay   offset  jitter<br />
==============================================================================<br />
*ntp2.Housing.Be 128.32.206.55    2 u   16   64  377  189.371  -14.785   5.513<br />
mighty.poclabs. 169.229.70.64    3 u   28   64  377  132.913  -14.411   5.034<br />
+vps1.cobryce.co 64.235.98.66     3 u   16   64  377  180.600  -22.410   5.258</code></p>
<p>where servers marked with * are the selected server and + are the candidates for ntp sync.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2011/03/25/syncing-freebsd-server-with-the-ntp-clock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>blocking certain MAC addresses from joining your Cisco AP</title>
		<link>http://simon.zekar.com/2010/10/18/blocking-mac-addresses-cisco-ap/</link>
		<comments>http://simon.zekar.com/2010/10/18/blocking-mac-addresses-cisco-ap/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 17:34:05 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[Cisco Disco]]></category>
		<category><![CDATA[access-point]]></category>
		<category><![CDATA[ap]]></category>
		<category><![CDATA[ban]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=152</guid>
		<description><![CDATA[In hope for an energy to revive this blog, a quick post. If you need to block an abuser flood-trying to connect to your AP, resulting in multiple radius connections and error messages, you can make ACL on AP like this: # access-list 760 deny 0002.725f.93c3 0000.0000.0000 # dot11 association mac-list 760 where 0002.725f.93c3 is [...]]]></description>
			<content:encoded><![CDATA[<p>In hope for an energy to revive this blog, a quick post.</p>
<p>If you need to block an abuser flood-trying to connect to your AP, resulting in multiple radius connections and error messages, you can make ACL on AP like this:</p>
<p><code># access-list 760 deny <strong>0002.725f.93c3</strong> 0000.0000.0000<br />
# dot11 association mac-list 760<br />
</code></p>
<p>where 0002.725f.93c3 is the abusers mac address.</p>
<p>Happy banning,<br />
S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2010/10/18/blocking-mac-addresses-cisco-ap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD and shared iLo 2 port on HP servers</title>
		<link>http://simon.zekar.com/2010/04/24/freebsd-and-shared-ilo-2-port-on-hp-servers/</link>
		<comments>http://simon.zekar.com/2010/04/24/freebsd-and-shared-ilo-2-port-on-hp-servers/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 22:10:53 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[ilo]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=147</guid>
		<description><![CDATA[In order for HP iLo 2 management interface to continue working on a shared ethernet port after FreeBSD kernel loads the bge drivers, you must add following line to /boot/loader.conf hw.bge.allow_asf="1" And reboot. Hope it will save you some minutes figuring it out&#8230; S.]]></description>
			<content:encoded><![CDATA[<p>In order for <a href="http://h18000.www1.hp.com/products/servers/management/remotemgmt.html">HP iLo 2 management interface</a> to continue working on a shared ethernet port after <a href="http://www.freebsd.org/">FreeBSD</a> kernel loads the bge drivers, you must add following line to /boot/loader.conf</p>
<p><code>hw.bge.allow_asf="1"</code></p>
<p>And reboot.</p>
<p>Hope it will save you some minutes figuring it out&#8230;</p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2010/04/24/freebsd-and-shared-ilo-2-port-on-hp-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>automatic login to Cisco routers / firewalls</title>
		<link>http://simon.zekar.com/2010/02/28/automatic-login-to-cisco-routers-firewalls/</link>
		<comments>http://simon.zekar.com/2010/02/28/automatic-login-to-cisco-routers-firewalls/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 23:37:34 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[rancid]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=142</guid>
		<description><![CDATA[Since many of you are still connecting to your Cisco boxes with the plain ssh/telnet command (typing password every time) and since Cisco boxes don&#8217;t have SSH public key authentication, the tool to use comes from Rancid (Really Awesome New Cisco confIg Differ) package. It&#8217;s called &#8220;clogin&#8221; as Cisco login script. It requires all the [...]]]></description>
			<content:encoded><![CDATA[<p>Since many of you are still connecting to your Cisco boxes with the plain ssh/telnet command (typing password every time) and since Cisco boxes don&#8217;t have SSH public key authentication, the tool to use comes from <a href="http://www.shrubbery.net/rancid/">Rancid</a> (Really Awesome New Cisco confIg Differ) package.</p>
<p>It&#8217;s called &#8220;<strong>clogin</strong>&#8221; as <a href="http://www.shrubbery.net/rancid/man/clogin.1.html">Cisco login script</a>.</p>
<p>It requires all the credentials in ~/.cloginrc file (protocol / password / enable).</p>
<p>Syntax of .cloginrc file can be found <a href="http://www.shrubbery.net/rancid/man/cloginrc.5.html">here</a>.</p>
<p>and usage is simple, just <code>clogin hostname</code></p>
<p>And besides loging it&#8217;s very usefull for multiple box configuration. Let&#8217;s say you just need to write configs of your 5 routers.</p>
<p><code>clogin -c "write;exit" router1 router2 router3 router4 router5</code></p>
<p>and Voila !</p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2010/02/28/automatic-login-to-cisco-routers-firewalls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik simple bandwidth control</title>
		<link>http://simon.zekar.com/2009/10/14/mikrotik-simple-bandwidth-control/</link>
		<comments>http://simon.zekar.com/2009/10/14/mikrotik-simple-bandwidth-control/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 19:59:30 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[mikrotik]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=137</guid>
		<description><![CDATA[There&#8217;s a really easy way of controlling bandwidth of an interface (e.g. guest interface). It&#8217;s done via queues: /queue simple add interface=guest max-limit=2M/2M disabled=no Where &#8220;guest&#8221; is the interface name and 2M is the down/uplink speed in bps you want to shape it to. More about this on Mikrotik Wiki S.]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a really easy way of controlling bandwidth of an interface (e.g. guest interface).</p>
<p>It&#8217;s done via queues:<br />
<code>/queue simple add interface=guest max-limit=2M/2M disabled=no</code></p>
<p>Where &#8220;guest&#8221; is the interface name and 2M is the down/uplink speed in bps you want to shape it to.</p>
<p>More about this on <a href="http://wiki.mikrotik.com/wiki/Bandwidth_Managment_and_Queues">Mikrotik Wiki</a></p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2009/10/14/mikrotik-simple-bandwidth-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP-UX ssh X11 forwarding not working for certain applications</title>
		<link>http://simon.zekar.com/2009/10/08/hp-ux-ssh-x11-forwarding-not-working-for-certain-applications/</link>
		<comments>http://simon.zekar.com/2009/10/08/hp-ux-ssh-x11-forwarding-not-working-for-certain-applications/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:51:30 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[hp-ux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[x11]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=133</guid>
		<description><![CDATA[I had a strange issue with hp-ux x11 forwarding over ssh. xclock, xterm ran fine but hpterm and some other x11 programs didn&#8217;t start, claiming error: X11 connection rejected because of wrong authentication. after some searching I found following fixed the issue: /opt/ssh/etc/sshd_config: X11UseLocalhost no (must be set to no, default is yes) S.]]></description>
			<content:encoded><![CDATA[<p>I had a strange issue with <a href="http://www.hp.com/products1/unix/">hp-ux</a> <a href="http://www.ssh.com/support/documentation/online/ssh/adminguide/32/X11_Forwarding.html">x11 forwarding over ssh</a>. xclock, xterm ran fine but hpterm and some other x11 programs didn&#8217;t start, claiming error:</p>
<p><code>X11 connection rejected because of wrong authentication.</code></p>
<p>after some searching I found following fixed the issue:</p>
<p><code>/opt/ssh/etc/sshd_config:<br />
X11UseLocalhost no<br />
(must be set to no, default is yes)</code></p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2009/10/08/hp-ux-ssh-x11-forwarding-not-working-for-certain-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco ASA failover fail if IPv6 enabled</title>
		<link>http://simon.zekar.com/2009/10/02/cisco-asa-failover-fail-if-ipv6-enabled/</link>
		<comments>http://simon.zekar.com/2009/10/02/cisco-asa-failover-fail-if-ipv6-enabled/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:14:05 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[IPv6]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=128</guid>
		<description><![CDATA[I can&#8217;t believe it&#8230; Failover on Cisco ASA silently stops working after you enable ipv6 configuration. We&#8217;re used of stupid Cisco bugs, but this wins it all ! S.]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t believe it&#8230;</p>
<p><a href="http://rogierm.redbee.nl/blog/2009/07/24/cisco-asa-ipv6-failover-not-supported/">Failover on Cisco ASA silently stops working after you enable ipv6 configuration.</a></p>
<p>We&#8217;re used of stupid Cisco bugs, but this wins it all !</p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2009/10/02/cisco-asa-failover-fail-if-ipv6-enabled/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IPv6 over IPv4 tunnel with Mikrotik &amp; Cisco router</title>
		<link>http://simon.zekar.com/2009/09/27/ipv6-over-ipv4-tunnel-with-mikrotik-cisco-router/</link>
		<comments>http://simon.zekar.com/2009/09/27/ipv6-over-ipv4-tunnel-with-mikrotik-cisco-router/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 20:44:15 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=114</guid>
		<description><![CDATA[Time when native IPv6 network will come right to your home is still far away. So tunneling IPv6 network over IPv4 to some IPv6 enabled site is a way to go. Configuration is easier than expected and it worked right away. In my case Cisco 7600 series is at the data center where native IPv6 [...]]]></description>
			<content:encoded><![CDATA[<p>Time when native <a href="http://en.wikipedia.org/wiki/IPv6">IPv6 network</a> will come right to your home is still far away. So <a href="http://en.wikipedia.org/wiki/6to4">tunneling IPv6 network over IPv4</a> to some IPv6 enabled site is a way to go.</p>
<p>Configuration is easier than expected and it worked right away. In my case <a href="http://www.cisco.com/en/US/products/hw/routers/ps368/">Cisco 7600</a> series is at the data center where native IPv6 is established and <a href="http://www.routerboard.com/">Mikrotik RB450</a> ( a choice for home router &#8211; really powerful and really cheap).</p>
<p>One /64 subnet is assigned for the tunnel (point-to-point) and /48 is then routed to it. Yes. In IPv6 /64 subnet of 18446744073709551616 IPs is used for point-to-point tunnel (2 IPs).</p>
<p>On Cisco 7600 &#8211; interface (99.. is a 7600 public IP as 22.. is my home public IP):<br />
<code>interface Tunnel0<br />
 description --- test ipv6 in ipv4 tunnel ---<br />
 no ip address<br />
 ipv6 address 2AAA:BABA:101:1::1/64<br />
 tunnel source 99.99.99.99<br />
 tunnel destination 22.22.22.22<br />
 tunnel mode ipv6ip</code></p>
<p>and route:<br />
<code>ipv6 route 2AAA:BABA:BEEF::/48 2AAA:BABA:101:1::2</code></p>
<p>and on Mikrotik:<br />
<code>/interface 6to4 add disabled=no local-address=22.22.22.22 mtu=1280 name=ipv6tunnel remote-address=99.99.99.99<br />
/ipv6 address add address=2AAA:BABA:101:1::2/64 interface=ipv6tunnel<br />
/ipv6 route add disabled=no dst-address=::/0 gateway=ipv6tunnel<br />
</code></p>
<p>And that&#8217;s it. You can configure local interface on Mikrotik, like this:<br />
<code>/ipv6 add address=2AAA:BABA:BEEF:DEAD:1/64 advertise=yes interface=ether2</code></p>
<p>Local machines, if properly configured should receive <a href="http://www.faqs.org/rfcs/rfc2461.html">advertised IPv6 prefix</a> and configure itself for IPv6.</p>
<p>That&#8217;s for now, more about IPv6 soon ! HaveAnice !!</p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2009/09/27/ipv6-over-ipv4-tunnel-with-mikrotik-cisco-router/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

