<?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>Sun, 23 Oct 2011 16:13:24 +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>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>
		<item>
		<title>FreeBSD massive port forwarding</title>
		<link>http://simon.zekar.com/2009/02/07/freebsd-massive-port-forwarding/</link>
		<comments>http://simon.zekar.com/2009/02/07/freebsd-massive-port-forwarding/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 20:15:08 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[forwarding]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[pf]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=68</guid>
		<description><![CDATA[Portfwd was the choice of software when I ever needed to forward a port from the server to another server &#8211; multiple hops away (not NAT port mapping). It uses configuration like this (193.2.1.66 is the local ip, 193.2.1.80 is destination server IP): bind-address 193.2.1.66 tcp { 55443 { =&#62; 193.2.1.80:443 } } tcp { [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://portfwd.sourceforge.net/" target="_blank">Portfwd</a> was the choice of software when I ever needed to forward a port from the server to another server &#8211; multiple hops away (not NAT port mapping).</p>
<p>It uses configuration like this (193.2.1.66 is the local ip, 193.2.1.80 is destination server IP):</p>
<p><code>bind-address 193.2.1.66<br />
tcp { 55443 { =&gt; 193.2.1.80:443 } }<br />
tcp { 55022 { =&gt; 193.2.1.80:22 } }</code></p>
<p>But it fails doing its job right when you use this on a really busy port/service (500 or more simultaneous established TCP connections).</p>
<p><a href="http://www.openbsd.org/faq/pf/" target="_blank">pf</a> does the forwarding well even over 1000 TCP connections. Example:</p>
<p><code>rdr on em0 proto tcp from any to 193.2.1.66 port 55443 -&gt; 193.2.1.80 port 443<br />
rdr on em0 proto tcp from any to 193.2.1.66 port 55022 -&gt; 193.2.1.80 port 22<br />
nat on em0 from any to 193.2.1.80 -&gt; 193.2.1.66</code></p>
<p>- the em0 is the name of the outside interface. Without the nat rule, destination server would see a packet with source ip of the client so it would send a packet back directly to the client which causes asymmetric routing and very possible problems. The nat rule changes the source IP to the port forwarders one.</p>
<p>Happy forwarding,<br />
S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2009/02/07/freebsd-massive-port-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>swatch &#8211; alerting you of certain log entries</title>
		<link>http://simon.zekar.com/2009/02/04/swatch-log-monitor/</link>
		<comments>http://simon.zekar.com/2009/02/04/swatch-log-monitor/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 20:53:24 +0000</pubDate>
		<dc:creator>sIMON</dc:creator>
				<category><![CDATA[general bluez]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[swatch]]></category>

		<guid isPermaLink="false">http://simon.zekar.com/?p=65</guid>
		<description><![CDATA[A few minutes before coding my own perl script, which would alert me on certain log entries, I&#8217;ve found a software which does it&#8217;s job very well. It&#8217;s called swatch &#8211; yes, really impressing web site and lack of documentation, examples is tipical for a geek&#8217;s tool. example config &#8211; very simple: watchfor /Security violation [...]]]></description>
			<content:encoded><![CDATA[<p>A few minutes before coding my own <a href="http://www.perl.org/" target="_blank">perl</a> script, which would alert me on certain log entries, I&#8217;ve found a software which does it&#8217;s job very well.</p>
<p>It&#8217;s called <a href="http://swatch.sourceforge.net/" target="_blank">swatch</a> &#8211; yes, really impressing web site and lack of documentation, examples is tipical for a geek&#8217;s tool.</p>
<p>example config &#8211; very simple:<br />
<code>watchfor /Security violation occurred/<br />
mail addresses=ninja@level13.org,subject="SWATCH warning - switch_name"</code></p>
<p>and the command line invocation:<br />
<code># /usr/local/bin/swatch -c /usr/local/etc/swatch/switch_name.conf -t /var/log/syslog/switch_name.log --daemon --use-cpan-file-tail</code></p>
<p><strong>&#8211;daemon</strong> for forking it in the background</p>
<p><strong>&#8211;use-cpan-file-tail</strong> is needed so that the swatch will tail file even after it&#8217;s rotated by the rotating script, but make sure that the perl module <a href="http://search.cpan.org/perldoc?File::Tail" target="_blank">File::Tail</a> is installed</p>
<p>It can of course match multiple patterns (multiple watchfor sections) on the same log file, but you must run multiple instances of the software for tailing multiple log files.</p>
<p>Make sure to read <a href="http://linux.die.net/man/1/swatch" target="_blank">swatch man page</a>.</p>
<p>S.</p>
]]></content:encoded>
			<wfw:commentRss>http://simon.zekar.com/2009/02/04/swatch-log-monitor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

