<?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>MWC Labs &#187; Ports</title>
	<atom:link href="https://www.conceicao.eti.br/blog/tag/ports/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.conceicao.eti.br/blog</link>
	<description>TI, BSD, Linux, Network &#38; Security !</description>
	<lastBuildDate>Fri, 23 May 2014 22:37:30 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Erro ao instalar o port security/openvpn-auth-ldap no FreeBSD 9</title>
		<link>https://www.conceicao.eti.br/blog/2013/11/04/erro-ao-instalar-o-port-securityopenvpn-auth-ldap-no-freebsd-9/</link>
		<comments>https://www.conceicao.eti.br/blog/2013/11/04/erro-ao-instalar-o-port-securityopenvpn-auth-ldap-no-freebsd-9/#comments</comments>
		<pubDate>Mon, 04 Nov 2013 19:32:38 +0000</pubDate>
		<dc:creator><![CDATA[Matheus]]></dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[security/openvpn-auth-ldap]]></category>

		<guid isPermaLink="false">http://conceicao.eti.br/blog/?p=102</guid>
		<description><![CDATA[Buenas; No FreeBSD 9 o portÂ security/openvpn-auth-ldap estÃ¡ marcado comoÂ BROKEN devido ao seguinte erro na fase deÂ configure do port. configure: WARNING: Check library not found. Unit tests will not be built or run. checking for openvpn-plugin.h... no configure: error: Could not locate a working openvpn source tree. See `config.log' for more details. ===&#62; Script "configure" failed [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Buenas;</p>
<p>No FreeBSD 9 o portÂ <strong>security/openvpn-auth-ldap</strong> estÃ¡ marcado comoÂ <strong>BROKEN</strong> devido ao seguinte erro na fase deÂ <strong>configure</strong> do port.</p>
<pre>configure: WARNING: Check library not found. Unit tests will not be built or run.
checking for openvpn-plugin.h... no
configure: error: Could not locate a working openvpn source tree.
See `config.log' for more details.
===&gt; Script "configure" failed unexpectedly.
Please report the problem to snb@FreeBSD.org [maintainer] and attach the
"/usr/ports/security/openvpn-auth-ldap/work/auth-ldap-2.0.3/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/sbin/pkg_info -Ea).
*** Error code 1</pre>
<p>Olhando no config.log temos:</p>
<pre>configure:5511: checking for openvpn-plugin.h
configure:5544: cc -o conftest -O2 -pipe -DLDAP_DEPRECATED -fno-strict-aliasing -I/usr/ports/security/openvpn/work/openvpn-2.3.0 -export-dynamic conftest.c &gt;&amp;5
conftest.c:15:34: error: openvpn-plugin.h: No such file or directory</pre>
<p>Outro erro que tambÃ©m pode acontecer Ã© o seguinte:</p>
<pre>
checking how to run the Objective C preprocessor... /lib/cpp
configure: error: Objective C preprocessor "/lib/cpp" fails sanity check
</pre>
<p>Para resolver essa questÃ£o, basta aplicarmos um <a title="Patch security/openvpn-auth-ldap" href="http://conceicao.eti.br/pub/openvpn-auth-ldap.patch">patch</a> no port para que o mesmo funcione corretamente.</p>

<div class="wp-shkshell"><span class="wp-shkshell-prompt">#</span> <span class="wp-shkshell-command">cd</span> <span class="wp-shkshell-path">/usr/ports/security/openvpn-auth-ldap</span><br /><span class="wp-shkshell-prompt">#</span> <span class="wp-shkshell-command">wget</span> http://conceicao.eti.br/pub/openvpn-auth-ldap.patch<br /><span class="wp-shkshell-prompt">#</span> <span class="wp-shkshell-command">patch</span> -p0 <span class="wp-shkshell-special"><</span> openvpn-auth-ldap.patch<br /><span class="wp-shkshell-prompt">#</span> <span class="wp-shkshell-command">make</span> <span class="wp-shkshell-special">&</span><span class="wp-shkshell-special">&</span> <span class="wp-shkshell-command">make</span> install<br /></div>

]]></content:encoded>
			<wfw:commentRss>https://www.conceicao.eti.br/blog/2013/11/04/erro-ao-instalar-o-port-securityopenvpn-auth-ldap-no-freebsd-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erro &#8220;tar: Unrecognized archive format&#8221; no FreeBSD 8.2</title>
		<link>https://www.conceicao.eti.br/blog/2013/05/20/erro-tar-unrecognized-archive-format-no-freebsd-8-2/</link>
		<comments>https://www.conceicao.eti.br/blog/2013/05/20/erro-tar-unrecognized-archive-format-no-freebsd-8-2/#comments</comments>
		<pubDate>Mon, 20 May 2013 17:22:12 +0000</pubDate>
		<dc:creator><![CDATA[Matheus]]></dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[xz]]></category>

		<guid isPermaLink="false">http://conceicao.eti.br/blog/?p=83</guid>
		<description><![CDATA[Dica rÃ¡pida. Problema: Ao tentar instalar um Port no FreeBSD 8.2, estou recebendo o seguinte erro: tar: Unrecognized archive format Investigando um pouco, descobri que a versÃ£o do bsdtar em questÃ£o nÃ£o consegue reconhecer automaticamente a compressÃ£o &#8220;xz&#8221; entre -7 e -9. Como medida de contorno, enquanto nÃ£o Ã© possÃ­vel realizar o upgrade da versÃ£o [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Dica rÃ¡pida.</p>
<p>Problema:</p>
<p>Ao tentar instalar um Port no FreeBSD 8.2, estou recebendo o seguinte erro:</p>
<pre>tar: Unrecognized archive format</pre>
<p>Investigando um pouco, descobri que a versÃ£o do bsdtar em questÃ£o nÃ£o consegue reconhecer automaticamente a compressÃ£o &#8220;xz&#8221; entre <strong>-7</strong> e <strong>-9</strong>.</p>
<p>Como medida de contorno, enquanto nÃ£o Ã© possÃ­vel realizar o upgrade da versÃ£o do FreeBSD para a 8.3, pode-se realizar o seguinte procedimento:</p>
<p>Instalar o port <strong>archivers/libarchive</strong> e entÃ£o adicionar a linha abaixo no arquivo <em>/etc/make.conf</em>:</p>
<pre class="brush:shell">TAR=/usr/local/bin/bsdtar</pre>
<p>Com isso, a instalaÃ§Ã£o do Port funcionou corretamente.</p>
<p><a href="http://forums.freebsd.org/showthread.php?t=39404">Mais informaÃ§Ãµes.</a></p>
<p><strong>UPDATE</strong></p>
<p>Caso na compilaÃ§Ã£o do pacote <strong>archivers/libarchive</strong> aconteÃ§a o erro abaixo:</p>
<pre>error: spawn.h: No such file or directory</pre>
<p>VocÃª deverÃ¡ executar os seguintes comandos:</p>
<pre class="brush:shell">make clean
make ac_cv_header_spawn_h=no
make install</pre>
]]></content:encoded>
			<wfw:commentRss>https://www.conceicao.eti.br/blog/2013/05/20/erro-tar-unrecognized-archive-format-no-freebsd-8-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proxy Transparente com Squid e PF no OpenBSD</title>
		<link>https://www.conceicao.eti.br/blog/2009/04/17/proxy-transparente-com-squid-e-pf-no-openbsd/</link>
		<comments>https://www.conceicao.eti.br/blog/2009/04/17/proxy-transparente-com-squid-e-pf-no-openbsd/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 14:05:20 +0000</pubDate>
		<dc:creator><![CDATA[Matheus]]></dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[lusca]]></category>
		<category><![CDATA[PF]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[transparente]]></category>

		<guid isPermaLink="false">http://blog.matheuswc.com/blog/?p=7</guid>
		<description><![CDATA[E ai pessoal, tudo certo? EntÃ£o, aqui vamos dar uma olhada na instalaÃ§Ã£o e configuraÃ§Ã£o de um proxy Squid operando como transparente e tambÃ©m as regras que serÃ£o necessÃ¡rias adicionar nas regras de firewall (PF). Vamo lÃ¡.. InstalaÃ§Ã£o Realizei a instalaÃ§Ã£o pelo package manager do OpenBSD onde tem os pacotes prÃ©-compilados, mas nada impede de [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>E ai pessoal, tudo certo?</p>
<p>EntÃ£o, aqui vamos dar uma olhada na instalaÃ§Ã£o e configuraÃ§Ã£o de um proxy <a href="http://www.squid-cache.org/">Squid</a> operando como transparente e tambÃ©m as regras que serÃ£o necessÃ¡rias adicionar nas regras de firewall (<a href="http://www.openbsd.org/faq/pf/">PF</a>).</p>
<p>Vamo lÃ¡..</p>
<h2><strong>InstalaÃ§Ã£o</strong></h2>
<p>Realizei a instalaÃ§Ã£o pelo package manager do <a href="http://openbsd.org">OpenBSD</a> onde tem os pacotes prÃ©-compilados, mas nada impede de vocÃª instalar pelo <a title="OpenBSD Ports" href="http://www.openbsd.org/ports.html">Ports</a>.</p>
<h3>Package Manager (pkg_add)</h3>
<p>Primeiro de tudo vamos exportar a variÃ¡vel com o <em>mirror</em> onde se encontra os pacotes:</p>
<pre># export PKG_PATH=ftp://ftp.das.ufsc.br/pub/OpenBSD/4.4/packages/i386/</pre>
<p>Vamos instalar o pacote:</p>
<pre># pkg_add -i -v squid</pre>
<p>A versÃ£o do Squid que instalei aqui foi a <em>squid-2.7.STABLE3-ldap</em>.</p>
<h3>Ports</h3>
<pre>
# cd /usr/ports/www/squid
# env FLAVOR=transparent make install
</pre>
<h2>ConfiguraÃ§Ã£o</h2>
<h3>Squid</h3>
<p>Vamos configurar o Squid para subir no boot.</p>
<p>Edite o arquivo <strong>/etc/rc.local</strong> com seu editor de texto e adicione as linhas abaixo logo apÃ³s <em># Add your local startup actions here.</em></p>
<pre># Squid
/usr/local/sbin/squid</pre>
<p>Vamos editar agora o arquivo de configuraÃ§Ã£o do Squid, que Ã© o <strong>/etc/squid/squid.conf</strong>.</p>
<p>Faremos uma configuraÃ§Ã£o bÃ¡sica do Squid.</p>
<pre>http_port 3128 transparent

visible_hostname pr0xy.conceicao.eti.br

error_directory /usr/local/share/squid/errors/Portuguese

# Logs
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log

# SVN
extension_methods REPORT MERGE MKACTIVITY CHECKOUT PROPFIND

# ACLs
acl all src 0.0.0.0/0.0.0.0
acl rede src 192.168.1.0/24
acl SSL_Ports port 443 563 2096
acl Safe_ports port 80 21 443 563 70 210 1025-65535
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

#Pessoas com acesso total
acl vips arp "/etc/squid/controle.vips"

#BlackList
acl blacklist dstdomain "/etc/squid/controle.blacklist"

##
# Permite ou Nega

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow vips
http_access deny blacklist

http_access allow rede
http_access deny all
##</pre>
<p>Obs.: Crie os arquivos <strong>/etc/squid/controle.vips</strong> e <strong>/etc/squid/controle.blacklist</strong></p>
<p>Agora temos que iniciar o Squid com a opÃ§Ã£o -z para que seja criado os diretÃ³rios de swap.</p>
<pre># /usr/local/sbin/squid -z</pre>
<p>Pronto, agora jÃ¡ podemos iniciar o squid!</p>
<pre># /usr/local/sbin/squid</pre>
<p>Sempre que for feita uma alteraÃ§Ã£o no arquivo de configuraÃ§Ã£o do Squid, devemos executar o comando a seguir para que as configuraÃ§Ãµes sejam recarregadas:</p>
<pre># /usr/local/sbin/squid -k reconfigure</pre>
<h3>PF</h3>
<p>O arquivo de configuraÃ§Ã£o do PF Ã© o <strong>/etc/pf.conf</strong> (padrÃ£o). Adicione/adapte as seguintes regras:</p>
<pre>rdr on $int_if Â inet proto tcp from any to any port www-&gt; 127.0.0.1 port 3128

pass in on $int_if inet proto tcp from any to 127.0.0.1 port 3128
pass out on $ext_if inet proto tcp from any to any port www</pre>
<p>Ã‰ preciso tambÃ©m liberar o acesso do Squid ao <strong>/dev/pf</strong> para que o mesmo consulte o filtro de pacotes jÃ¡ que o padrÃ£o Ã© somente o <strong>root</strong> ter acesso. O Squid roda com o grupo <strong>_squid</strong>.</p>
<pre>
# chgrp _squid /dev/pf
# chmod g+rw /dev/pf
</pre>
<p>EntÃ£o Ã© isso.. qualquer coisa Ã© sÃ³ dar um grito. =]</p>
<p>T+</p>
<h6><em>ReferÃªncia: <a href="http://www.openbsd-br.org/index.php?q=node/15">http://www.openbsd-br.org/index.php?q=node/15</a></em></h6>
]]></content:encoded>
			<wfw:commentRss>https://www.conceicao.eti.br/blog/2009/04/17/proxy-transparente-com-squid-e-pf-no-openbsd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
