<?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>logIt &#187; proxy</title>
	<atom:link href="https://lakm.us/logit/tag/proxy/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How DHCP/DNS Server Works in Web Proxy Autodiscovery Protocol (WPAD) for Today&#8217;s Browsers</title>
		<link>https://lakm.us/logit/2013/05/how-dhcp-dns-server-works-web-proxy-autodiscovery-protocol-wpad-today-major-browsers/</link>
		<comments>https://lakm.us/logit/2013/05/how-dhcp-dns-server-works-web-proxy-autodiscovery-protocol-wpad-today-major-browsers/#comments</comments>
		<pubDate>Wed, 15 May 2013 07:22:42 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[General Linux]]></category>
		<category><![CDATA[autodiscovery]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[MikroTik]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=665</guid>
		<description><![CDATA[Web Proxy Autodiscovery Protocol (WPAD) protocol draft expired in 1999, but today&#8217;s major browsers are still supporting it as will be shown later. Two types of DHCP server are tested to describe how WPAD behaves prior to/after starting up the internet browser. To be clear, uploaded packet captures are shared in CloudShark. DNS and domain [...]]]></description>
				<content:encoded><![CDATA[<p>Web Proxy Autodiscovery Protocol <a href="http://tools.ietf.org/html/draft-ietf-wrec-wpad-01" title="Web Proxy Auto-Discovery Protocol" target="_blank">(WPAD) protocol draft</a> expired in 1999, but today&#8217;s major browsers are still supporting it as will be shown later. Two types of DHCP server are tested to describe how WPAD behaves prior to/after starting up the internet browser. To be clear, uploaded packet captures are shared in <a href="http://www.cloudshark.org/" title="CloudShark" target="_blank">CloudShark</a>. DNS and domain resolution is a must for the WPAD to work when MS Windows Internet Options configured to &#8220;<a href="http://https://github.com/bandono/proxyConf/blob/v1.1/www/images/winxp-internet-properties-02-lan-settings.png" title="proxyConf Github: screenshot of Windows Internet Options proxy setting" target="_blank">Automatically detect settings</a>&#8221; (for <a href="http://en.wikipedia.org/wiki/Internet_Explorer_6">IE 6 in Windows XP desktop</a>, <a href="http://en.wikipedia.org/wiki/Internet_Explorer_8" target="_blank">IE 8 in Windows 7 desktop</a>, and <a href="https://www.google.com/intl/en/chrome/browser/" title="Chrome Browser - Google" target="_blank">Google Chrome</a>) or Firefox to &#8220;<a href="https://github.com/bandono/proxyConf/blob/v1.1/www/images/firefox-03-auto-proxy-config-url.png" title="proxyConf Github: screenshot of Firefox proxy setting" target="_blank">Auto-detect proxy settings for this network</a>&#8220;. As simplest DNS setting should work, this post will not cover its configuration. </p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="Low level view of WPAD interactions involving DHCP, DNS, and HTTP servers in packet capture (shared in CloudShark)" src="../../../../images/proxy-wpad-dhcp-dns-packet-capture-cloudshark.png" title="Low level view of WPAD interactions involving DHCP, DNS, and HTTP servers in packet capture (shared in CloudShark)" width="390" height="328" /><p class="wp-caption-text">Low level view of WPAD interactions involving DHCP, DNS, and HTTP servers in packet capture (shared in CloudShark)</p></div>
<p>In DHCP discovery-offer-request-acknowledgement cycle, WPAD information is given in option 252 (check <a href="http://tools.ietf.org/html/draft-ietf-wrec-wpad-01#section-4.4.1" target="_blank">section 4.4.1 of the draft</a>). I used <a href="http://packages.ubuntu.com/precise/dhcp3-server" target="_blank"><code>dhcpd3-server</code> package</a> in Ubuntu and setup <code>/ip dhcp-server option add code=252 ...</code> in <a href="http://www.mikrotik.com/download/CHANGELOG_5" target="_blank">Mikrotik 5.20</a> for example variations. For both, trailing &#8220;<code>\n</code>&#8221; are added to <code>wpad.dat</code> URL value as most howtos recommend.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #ff0000;">&quot;http://wpad.some-company.net/wpad.dat<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span></pre></div></div>

<p>In the above example value, <code>wpad.dat</code> is hosted in <a href="http://packages.ubuntu.com/precise/apache2" target="_blank">Apache2 HTTP server</a> resolvable by the DNS to the actual host IP of <code>wpad.some-company.net</code>. When the client use all DHCP offered items, it gets domain name (option 15) <code>some-company.net</code> besides other things e.g.  router (option 3), DNS (option 6), etc. In a case where the client use its own DNS (only use IP from DHCP), <strong>WPAD likely won&#8217;t work</strong> unless it is able to resolve the example <code>some-company.net</code> or <code>wpad.some-company.net</code>. Following the tail of <code>/var/log/apache2/access.log</code>, successful <code>wpad.dat</code> request will appear as</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">192.168.40.75 - - <span style="color: #7a0874; font-weight: bold;">&#91;</span>01<span style="color: #000000; font-weight: bold;">/</span>May<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2013</span>:<span style="color: #000000;">21</span>:<span style="color: #000000;">51</span>:<span style="color: #000000;">15</span> +0700<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;GET /wpad.dat HTTP/1.1&quot;</span> <span style="color: #000000;">200</span> <span style="color: #000000;">1070</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">&quot;-&quot;</span></pre></div></div>

<p><span id="more-665"></span><br />
In the above tail, I enabled a Windows 7&#8242;s network adapter (from previously disabled) and it would soon try to HTTP <code>GET</code> the <code>wpad.dat</code> even when no browser opened yet.</p>
<p>From testing with Windows XP, Windows 7, and Ubuntu (with different browsers mostly), <code>DHCP Inform</code>&#8216;s WPAD behavior can be seen with Windows 7 test by analyzing the packet going out after some time since the initial DHCP stream (check <a href="http://www.cloudshark.org/captures/1dc9e4cb8ca1" title="WPAD packet capture: Windows 7 client with ISC DHCP server running in Ubuntu 12.04" target="_blank">the packet capture</a> for 7 seconds after <code>DHCP Discover</code>). It asked for WPAD in one of the <code>Parameter Request List Item</code> (apply the filter <code>bootp.option.request_list_item == 252</code> for a closer look), but received no answer.</p>
<p>I failed to reproduce other samples of <code>DHCP Inform</code> packet asking for WPAD. Hence, for the rest, it&#8217;s the browser who is doing the <code>GET</code> to <code>http://wpad.some-company.net/wpad.dat</code> with DHCP only supplied domain name instead of complete WPAD (check <a href="http://www.cloudshark.org/captures/5d73416a18d5" target="_blank">another packet capture</a>, this time for <a href="http://packages.ubuntu.com/precise/firefox" target="_blank">Ubuntu with Firefox 20</a>). The <code>GET</code> attempt isn&#8217;t actually one shot attempt. When it fails to find the <code>wpad.dat</code> in <code>http://wpad.some-company.net/wpad.dat</code>, it should iteratively try to find within the higher domain e.g. <code>http://some-company.net/wpad.dat</code>.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="Getting proxy setting (WPAD) from DHCP or directly by browser iterative decision" src="../../../../images/proxy-wpad-dhcp-browser-iteration-decision-illustration.png" title="Getting proxy setting (WPAD) from DHCP or directly by browser iterative decision" width="292" height="193" /><p class="wp-caption-text">Getting proxy setting (WPAD) from DHCP or directly by browser iterative decision</p></div>
<p>DHCP server configuration used, <code>wpad.dat</code> file example (I simply use symbolic link to <code>proxy.pac</code>), and Apache2 <code>VirtualHost</code> config are available in <a href="https://github.com/bandono/proxyConf/tree/v1.1" target="_blank">my github, an attempt to integrate Squid3 cache with WPAD, PAC, and DHCP</a>.</p>
<p><a id="History" href="#History" rel="bookmark" title="History"><br />
<h4>History</h4>
<p></a></p>
<p>For trailing character in WPAD value mentioned earlier, I once configured option 252 value with &#8220;<code>wpad.dat\?</code>&#8220;, &#8220;<code>proxy.pa</code>&#8220;, and some other likely wrong variations. I also configured the browser in Windows XP and 7 with these variations of wrong values before getting the browser to use proxy auto-discovery again. Somehow it kept the wrong <code>GET</code> with trailing character resulting in 404 (page not found):</p>
<ol>
<li>Firefox</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">192.168.40.78 - - <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">30</span><span style="color: #000000; font-weight: bold;">/</span>Apr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2013</span>:<span style="color: #000000;">16</span>:<span style="color: #000000;">20</span>:<span style="color: #000000;">39</span> +0700<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;GET /wpad.dat/ HTTP/1.1&quot;</span> <span style="color: #000000;">404</span> <span style="color: #000000;">478</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Win32)&quot;</span></pre></div></div>

<li>IE 6</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">192.168.40.78 - - <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">30</span><span style="color: #000000; font-weight: bold;">/</span>Apr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2013</span>:<span style="color: #000000;">16</span>:<span style="color: #000000;">28</span>:07 +0700<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;GET /wpad.dat/ HTTP/1.1&quot;</span> <span style="color: #000000;">404</span> <span style="color: #000000;">478</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">&quot;Mozilla/4.0 (compatible; MSIE 6.0; Win32)&quot;</span></pre></div></div>

<li>IE 8</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">192.168.40.77 - - <span style="color: #7a0874; font-weight: bold;">&#91;</span>01<span style="color: #000000; font-weight: bold;">/</span>May<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2013</span>:<span style="color: #000000;">20</span>:07:<span style="color: #000000;">24</span> +0700<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;GET /wpad.dat/? HTTP/1.1&quot;</span> <span style="color: #000000;">404</span> <span style="color: #000000;">534</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">&quot;-&quot;</span></pre></div></div>

</ol>
<p>I was able to force it to <code>GET</code> the correct WPAD value by adding new network adapter which received different IP lease from DHCP server. Afterwards, connecting with the old adapter will also keep correct behavior.</p>
<p>I still don&#8217;t know how they keep the previously incorrect behavior. <strong>In short we can&#8217;t rely on WPAD alone</strong>, but there is probability that some portions of the network clients will find the proxy this way, automatically without technical assistance.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2013/05/how-dhcp-dns-server-works-web-proxy-autodiscovery-protocol-wpad-today-major-browsers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running Two Squid Instances in Upstart Init</title>
		<link>https://lakm.us/logit/2013/05/running-two-multiple-squid-instances-upstart-init-job/</link>
		<comments>https://lakm.us/logit/2013/05/running-two-multiple-squid-instances-upstart-init-job/#comments</comments>
		<pubDate>Fri, 10 May 2013 08:55:16 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[General Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=644</guid>
		<description><![CDATA[After installing squid3 from repository, Ubuntu will place the init in upstart style (instead of /etc/rc*.d/ or /etc/init.d/ style used to maintain backward compatibility to legacy System-V init). The upstart job is placed in /etc/init/squid3.conf with default runlevel (2,3,4 or 5) to start the instance during reboot and relevant start/stop command using service: $ sudo [...]]]></description>
				<content:encoded><![CDATA[<p>After installing <a href="http://www.squid-cache.org/" target="_blank">squid3</a> from <a href="http://packages.ubuntu.com/precise/squid3" target="_blank">repository</a>, Ubuntu will place the <code>init</code> in <a href="http://upstart.ubuntu.com/" target="_blank">upstart</a> style (instead of <code>/etc/rc*.d/</code> or <code>/etc/init.d/</code> style used to maintain backward compatibility to legacy <a href="http://en.wikipedia.org/wiki/Init" target="_blank">System-V init</a>). The upstart job is placed in <code>/etc/init/squid3.conf</code> with default <code>runlevel</code> (2,3,4 or 5) to start the instance during reboot and relevant start/stop command using <code>service</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> service squid3 <span style="color: #7a0874; font-weight: bold;">&#123;</span>start<span style="color: #000000; font-weight: bold;">|</span>stop<span style="color: #000000; font-weight: bold;">|</span>restart<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>To specify what to run, an <code>upstart</code> <a href="http://upstart.ubuntu.com/getting-started.html" target="_blank">must have</a> <code>exec</code> or <code>script</code> stanza. When the goal is to start two or more (multiple) instances of <code>squid3</code>, <code>exec</code> is meant <a href="http://manpages.ubuntu.com/manpages/precise/man3/exec.3.html" target="_blank">to replace existing process image</a> of <code>/usr/sbin/squid3</code> executable, therefore will not start two instances.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="Eltek Smartpack Controller type with SNMP Support" src="../../../../images/squid3-two-instances-illustration.png" title="Multiple squid3 instances started via upstart exec" width="385" height="188" /><p class="wp-caption-text">Multiple squid3 instances started via upstart exec</p></div>
<p>As workaround we can have symbolic link to <code>squid3</code> executable instead and add new <code>upstart</code> job configuration with <code>exec</code> call to the link. I need two instances running in the same machine due to the implementation design where the fist instance is HTTP proxy cache while the second one is accelerator/interceptor (reverse proxy) that serves default landing page telling user to use proxy (and how to do that). Hence, for the second instance I add:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">6</span> May  <span style="color: #000000;">3</span> 09:<span style="color: #000000;">25</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>squid3ins2 -<span style="color: #000000; font-weight: bold;">&gt;</span> squid3
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">1156</span> May  <span style="color: #000000;">6</span> <span style="color: #000000;">13</span>:<span style="color: #000000;">30</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>squid3ins2.conf</pre></div></div>

<p>and for the first instance I add:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">298</span> May  <span style="color: #000000;">3</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">13</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>squid3.override</pre></div></div>

<p><code>squid3ins2</code> is our link and <code>/etc/init/squid3ins2.conf</code> contains <code>exec</code> call to it to run second <code>squid3</code>. For the first instance I choose to write an override (<code>/etc/init/squid3.override</code>) so that the original job configuration file is left intact. For the complete content of all files check <a href="https://github.com/bandono/proxyConf/tree/v1.1/init" target="_blank">my github v1.1</a> of the Squid integration. There, in details you&#8217;ll also find how both instances PID, log, etc. are differentiated by each instance config via the following directives:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">http_port
cache_dir
pid_filename
cache_access_log
cache_log</pre></div></div>

</pre>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2013/05/running-two-multiple-squid-instances-upstart-init-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zabbix Proxy: distributed NMS monitoring via embedded Linux (Ubuntu on BeagleBoard)</title>
		<link>https://lakm.us/logit/2012/07/zabbix-proxy-distributed-nms-monitoring-embedded-linux-ubuntu-beagleboard/</link>
		<comments>https://lakm.us/logit/2012/07/zabbix-proxy-distributed-nms-monitoring-embedded-linux-ubuntu-beagleboard/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 07:26:15 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=404</guid>
		<description><![CDATA[As already mentioned in previous post&#8217;s introduction, proof of concept on how Zabbix Proxy works under unreliable communication is what this next post about. The idea is to have these scenarios tested: independent SNMP data polling by individual NMS proxy (embedded system) intermittent connection between main/master NMS server with its proxy Of course we&#8217;ll do [...]]]></description>
				<content:encoded><![CDATA[<p>As already mentioned in <a href="./2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/" title="Compile Zabbix Proxy in Ubuntu ARM (BeagleBoard)" target="_blank">previous post&#8217;s</a> introduction, proof of concept on how <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_proxy" title="Zabbix Proxy" target="_blank">Zabbix Proxy</a> works under unreliable communication is what this next post about. The idea is to have these scenarios tested:</p>
<ol>
<li>independent SNMP data polling by individual NMS proxy (embedded system)</li>
<li>intermittent connection between main/master NMS server with its proxy</li>
</ol>
<p>Of course we&#8217;ll do them in implementation context of <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_server" title="Zabbix Server" target="_blank">Zabbix Server</a> as main/master NMS server and our <a href="http://beagleboard.org/hardware-xM/" target="_blank">BeagleBoard xM</a> as its proxy.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="zabbix-proxy-routine-log-abstract-illustration.jpg" src="../../../../images/zabbix-proxy-routine-log-abstract-illustration.jpg" title="Zabbix Proxy - distributed NMS over embedded Linux" width="380" height="293" /><p class="wp-caption-text">Zabbix Proxy - distributed NMS over embedded Linux</p></div>
<p>In the technical details, I already followed pretty much the same steps showed in <a href="http://www.zabbix.com/wiki/howto/install/debian/zabbix_proxy_on_debian_sqlite" target="_blank">installation wiki</a> (with the exception that I didn&#8217;t put the process into startup <code>init.d</code> script as I would start it manually as needed).</p>
<p>The first test is to make our Ubuntu ARM board accepts configuration done in Zabbix Server web-GUI, retrieves SNMP data to it, and sends collected data to server. Mode passive is chosen so that the server will be the one initiating contact with the board. After enabling a certain SNMP host, i.e. <code>host-aaa</code>, as monitored-by-proxy, the Zabbix Server log will show:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">15677</span>:<span style="color: #000000;">20120601</span>:<span style="color: #000000;">022022.960</span> Sending configuration data to proxy <span style="color: #ff0000;">'beaglexm1'</span>. Datalen <span style="color: #000000;">9205</span></pre></div></div>

<p>Our board, &#8216;<code>beaglexm1</code>&#8216;, will start to poll SNMP data from <code>host-xxx</code> to then store it in designated <code>sqlite</code> database.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">975</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212024.098</span> proxy <span style="color: #666666; font-style: italic;">#8 started [poller #5]</span>
<span style="color: #000000;">984</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212024.128</span> proxy <span style="color: #666666; font-style: italic;">#17 started [discoverer #1]</span>
<span style="color: #000000;">968</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212025.423</span> Received configuration data from server. Datalen <span style="color: #000000;">9205</span>
<span style="color: #000000;">971</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212030.388</span> Enabling SNMP host <span style="color: #7a0874; font-weight: bold;">&#91;</span>host-aaa<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>From time to time as configured, our board will also run housekeeping to keep our board database file in small size.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">1081</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">224513.922</span> Executing housekeeper
<span style="color: #000000;">1081</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">224514.505</span> Deleted <span style="color: #000000;">4885</span> records from <span style="color: #7a0874; font-weight: bold;">history</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0.453765</span> seconds<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Under normal connection, in main Zabbix Server we&#8217;ll start seeing the collected data from <code>host-aaa</code> the same way as when the SNMP data is polled by the server directly. To emulate disruption to the connectivity, I choose to use simple <code>iptables</code> drop packet. This time the server will no longer seeing new data.</p>
<p>After the drop block is released, the server we&#8217;ll start seeing new data as well as data from the period of intermittent connection. It will take some time before all of that being sent to the server.</p>
<p>In general that proves it. I collected 44 OID values from the <code>host-aaa</code> every 30 seconds and in this case BeagleBoard utilization was very low as this wasn&#8217;t a stress test to see its performance. </p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/07/zabbix-proxy-distributed-nms-monitoring-embedded-linux-ubuntu-beagleboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile Zabbix Proxy in Ubuntu ARM (BeagleBoard)</title>
		<link>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/</link>
		<comments>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 08:28:57 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[make-install]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=401</guid>
		<description><![CDATA[I needed to tackle practical limitation of SNMP monitoring under unreliable communication, a serious consideration was made for Zabbix Proxy. It was an option said to be ready for embedded hardware. I already had BeagleBoard xM Rev C running Ubuntu 11.10 Oneiric and needed to proof that it would port functionally to this Linux ARM [...]]]></description>
				<content:encoded><![CDATA[<p>I needed to tackle practical limitation of SNMP monitoring under unreliable communication, a serious consideration was made for <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_proxy" title="Zabbix Proxy" target="_blank">Zabbix Proxy</a>. It was an option said to be <a href="http://www.zabbix.com/documentation/1.8/manual/proxies/proxy_vs_node" title="Zabbix: Proxy vs Node" target="_blank">ready for embedded hardware</a>. I already had BeagleBoard xM Rev C running <a href="./2011/12/ubuntu-on-beagleboard-xm-with-easycap-video-capture-compiling-driver/" title="Ubuntu on Beagleboard xM" target="_blank">Ubuntu 11.10 Oneiric</a> and needed to proof that it would port functionally to this Linux ARM board. There existed <code>zabbix-proxy-mysql</code> in <a href="https://launchpad.net/ubuntu/oneiric/armel/zabbix-proxy-mysql/1:1.8.5-1ubuntu2" title="armel zabbix-proxy-mysql" target="_blank">Oneiric repository</a>, but <code><a href="http://www.sqlite.org/" title="SQLite" target="_blank">sqlite</a></code> seemed to be a better scale option for embedded deployment.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="zabbix-proxy-abstract-illustration.png" src="../../../../images/zabbix-proxy-abstract-illustration.png" title="Zabbix Proxy Distributed NMS" width="330" height="253" /><p class="wp-caption-text">Zabbix Proxy Distributed NMS</p></div>
<p>An example set out for <a href="http://www.zabbix.com/wiki/howto/install/debian/zabbix_proxy_on_debian_sqlite" title="Wiki: Zabbix Proxy on Debian using sqlite" target="_blank">Zabbix Proxy on Debian</a> appears to be pretty straightforward to follow. With the ARM board already installed with <code>build-essential</code>, <code>snmp</code>, and <code>snmpd</code>, the following needs to be added:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libsnmp-dev libcurl4-openssl-dev fping curl sqlite libsqlite3-dev ntpdate</pre></div></div>

<p>then start the pre-compilation <code>configure</code> (in this case <a href="http://www.zabbix.com/rn1.8.7.php" title="Zabbix 1.8.7" target="_blank">Zabbix 1.8.7</a> is used):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> zabbix-1.8.7
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-proxy</span> <span style="color: #660033;">--enable-agent</span> <span style="color: #660033;">--with-sqlite3</span> <span style="color: #660033;">--with-net-snmp</span> <span style="color: #660033;">--with-libcurl</span></pre></div></div>

<p>It will go smooth. However, during <code>make</code> there are complains about undefined references to &#8216;<code>sqlite3_open</code>&#8216;, &#8216;<code>sqlite3_close</code>&#8216;, etc.:</p>
<p><span id="more-401"></span></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_connect<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:331: undefined reference to `sqlite3_open'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">343</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_busy_timeout<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:334: undefined reference to `sqlite3_errmsg'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">335</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_close<span style="color: #ff0000;">'
../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_init'</span><span style="color: #339933;">:</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">385</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_open<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:387: undefined reference to `sqlite3_errmsg'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_close<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:446: undefined reference to `sqlite3_close'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_vexecute<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:827: undefined reference to `sqlite3_exec'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">852</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_changes<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:833: undefined reference to `sqlite3_free'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `SQ_DBfree_result<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:1363: undefined reference to `sqlite3_free_table'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_vselect<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:1121: undefined reference to `sqlite3_get_table'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">1127</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_free<span style="color: #ff0000;">'</span></pre></div></div>

<p>this is obviously from the database related code compilation. I run the <code>gcc</code> manually for the <code>db.c</code> file inside its directory by adding the flag &#8216;<code>-lsqlite3</code>&#8216; in the tail of &#8216;<code>../../src/libs/zbxdb/libzbxdb.a</code>&#8216; to make it work. Afterward by going to the initial directory first, running <code>make</code> again will then continue successfully.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> src<span style="color: #000000; font-weight: bold;">/</span>zabbix_proxy
$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> -DZABBIX_DAEMON <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span>     -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi    -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>include -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.12</span><span style="color: #000000; font-weight: bold;">/</span>CORE -I. -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include      -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">-lsqlite3</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi <span style="color: #660033;">-lcurl</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lnetsnmp</span> <span style="color: #660033;">-lcrypto</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lnetsnmp</span> <span style="color: #660033;">-lcrypto</span>   <span style="color: #660033;">-rdynamic</span>    <span style="color: #660033;">-o</span> zabbix_proxy zabbix_proxy-servercomms.o zabbix_proxy-events.o zabbix_proxy-zlog.o zabbix_proxy-proxy.o heart<span style="color: #000000; font-weight: bold;">/</span>libzbxheart.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>dbsyncer<span style="color: #000000; font-weight: bold;">/</span>libzbxdbsyncer.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>discoverer<span style="color: #000000; font-weight: bold;">/</span>libzbxdiscoverer.a housekeeper<span style="color: #000000; font-weight: bold;">/</span>libzbxhousekeeper.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>httppoller<span style="color: #000000; font-weight: bold;">/</span>libzbxhttppoller.a proxyconfig<span style="color: #000000; font-weight: bold;">/</span>libzbxproxyconfig.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>pinger<span style="color: #000000; font-weight: bold;">/</span>libzbxpinger.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>poller<span style="color: #000000; font-weight: bold;">/</span>libzbxpoller.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>trapper<span style="color: #000000; font-weight: bold;">/</span>libzbxtrapper.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>nodewatcher<span style="color: #000000; font-weight: bold;">/</span>libzbxnodewatcher.a datasender<span style="color: #000000; font-weight: bold;">/</span>libzbxdatasender.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>selfmon<span style="color: #000000; font-weight: bold;">/</span>libzbxselfmon.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>libzbxserversysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>libspecsysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>libcommonsysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>simple<span style="color: #000000; font-weight: bold;">/</span>libsimplesysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxlog<span style="color: #000000; font-weight: bold;">/</span>libzbxlog.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdbcache<span style="color: #000000; font-weight: bold;">/</span>libzbxdbcache.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxmemory<span style="color: #000000; font-weight: bold;">/</span>libzbxmemory.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxalgo<span style="color: #000000; font-weight: bold;">/</span>libzbxalgo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxnix<span style="color: #000000; font-weight: bold;">/</span>libzbxnix.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsys<span style="color: #000000; font-weight: bold;">/</span>libzbxsys.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxconf<span style="color: #000000; font-weight: bold;">/</span>libzbxconf.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcommon<span style="color: #000000; font-weight: bold;">/</span>libzbxcommon.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcrypto<span style="color: #000000; font-weight: bold;">/</span>libzbxcrypto.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcomms<span style="color: #000000; font-weight: bold;">/</span>libzbxcomms.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcommshigh<span style="color: #000000; font-weight: bold;">/</span>libzbxcommshigh.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxjson<span style="color: #000000; font-weight: bold;">/</span>libzbxjson.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxexec<span style="color: #000000; font-weight: bold;">/</span>libzbxexec.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxself<span style="color: #000000; font-weight: bold;">/</span>libzbxself.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxserver<span style="color: #000000; font-weight: bold;">/</span>libzbxserver.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxicmpping<span style="color: #000000; font-weight: bold;">/</span>libzbxicmpping.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdbhigh<span style="color: #000000; font-weight: bold;">/</span>libzbxdbhigh.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdb<span style="color: #000000; font-weight: bold;">/</span>libzbxdb.a <span style="color: #660033;">-lsqlite3</span> <span style="color: #660033;">-lcurl</span>  <span style="color: #660033;">-lnetsnmp</span>    <span style="color: #660033;">-lm</span>  <span style="color: #660033;">-lresolv</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic squid In A Gateway</title>
		<link>https://lakm.us/logit/2009/08/basic-squid-in-a-gateway/</link>
		<comments>https://lakm.us/logit/2009/08/basic-squid-in-a-gateway/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 08:26:59 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[General Linux]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://localhost/it/?p=73</guid>
		<description><![CDATA[This trial is done in a RedHat (RHEL 5.2) inside VirtualBox. The required squid package is using squid-3.0.STABLE13-1.el5.i386.rpm. Two interfaces is configured in this box as shown in the following NAT masquerading which build a simple router at 192.168.40.40 (eth1) : 1 2 3 4 5 6 7 8 WAN=wan0 LAN=eth1 IPTABLES=/sbin/iptables &#160; $IPTABLES --flush                         [...]]]></description>
				<content:encoded><![CDATA[<p>This trial is done in a RedHat (RHEL 5.2) inside VirtualBox. The required squid package is using <code>squid-3.0.STABLE13-1.el5.i386.rpm</code>. Two interfaces is configured in this box as shown in the following NAT masquerading which build a simple router at <code>192.168.40.40</code> (<code>eth1</code>) :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">WAN</span>=wan0
<span style="color: #007800;">LAN</span>=eth1
<span style="color: #007800;">IPTABLES</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables
&nbsp;
<span style="color: #007800;">$IPTABLES</span> --flush                         <span style="color: #666666; font-style: italic;"># Flush all the rules in filter and nat tables</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">--table</span> nat <span style="color: #660033;">--flush</span>
<span style="color: #007800;">$IPTABLES</span> --delete-chain                  <span style="color: #666666; font-style: italic;"># Delete all chains that are not in default filter and nat table</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">--table</span> nat <span style="color: #660033;">--delete-chain</span></pre></td></tr></table></div>

<p><strong>the real script is just two command line below</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">--table</span> nat <span style="color: #660033;">--append</span> POSTROUTING <span style="color: #660033;">--out-interface</span> <span style="color: #007800;">$WAN</span> <span style="color: #660033;">-j</span> MASQUERADE
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">--append</span> FORWARD <span style="color: #660033;">--in-interface</span> <span style="color: #007800;">$LAN</span> <span style="color: #660033;">-j</span> ACCEPT</pre></td></tr></table></div>

<p>Default route gateway is <code>wan0</code> and <code>/etc/resolv.conf</code> is edited with relevant DNS. Internet works perfectly and then after squid is installed, I use the following <code>/etc/squid.conf</code> :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">visible_hostname mithrandir
http_port <span style="color: #000000;">3128</span>
cache_dir ufs <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>spool<span style="color: #000000; font-weight: bold;">/</span>squid <span style="color: #000000;">1000</span> <span style="color: #000000;">16</span> <span style="color: #000000;">256</span>
cache_access_log <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>squid<span style="color: #000000; font-weight: bold;">/</span>access.log
acl intranet src 192.168.40.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span>
http_access allow intranet</pre></td></tr></table></div>

<p>It is pretty straightforward and simple, a listening proxy <code>192.168.40.40</code> in port <code>3128</code>. It is also a router to the internet, NAT, via <code>wan0</code>.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2009/08/basic-squid-in-a-gateway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
