<?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>Solusan &#187; Red Hat</title>
	<atom:link href="http://www.solusan.com/blog/red-hat/feed" rel="self" type="application/rss+xml" />
	<link>http://www.solusan.com</link>
	<description>..:: Solusan - Otro blog más ::..</description>
	<lastBuildDate>Thu, 25 Aug 2011 16:39:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=106</generator>
		<item>
		<title>Analizando logs</title>
		<link>http://www.solusan.com/analizando-logs.html</link>
		<comments>http://www.solusan.com/analizando-logs.html#comments</comments>
		<pubDate>Thu, 02 Jul 2009 09:35:17 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[CentoOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[/var/log/secure]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1193</guid>
		<description><![CDATA[Un pequeño apunte para sacar datos de /var/log/secure En este caso un listado de ataques a uno de los servidores. root@elserver [~]# cat /var/log/secure &#124; grep Failed &#124; cut -d: -f7 &#124; cut -d' ' -f1 &#124; sort&#124; uniq -c 8 148.228.20.240 5 190.196.23.163 8 200.164.76.166 8 200.234.201.121 12 202.103.25.132 6 61.37.158.250 11 77.51.250.130 3 [...]]]></description>
			<content:encoded><![CDATA[<p>Un pequeño apunte para sacar datos de /var/log/secure</p>
<p>En este caso un listado de ataques a uno de los servidores.</p>
<pre lang="bash">
root@elserver [~]#  cat /var/log/secure | grep Failed | cut -d: -f7 | cut -d' ' -f1 | sort| uniq -c
 8 148.228.20.240
 5 190.196.23.163
 8 200.164.76.166
 8 200.234.201.121
 12 202.103.25.132
 6 61.37.158.250
 11 77.51.250.130
 3 80.108.210.147

root@elserver [~]#  netstat -np | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | awk '{if ($1&gt;2){print $0}}'
 49
 16 127.0.0.1
 19 DGRAM
 70 STREAM</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/analizando-logs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iptables TIP</title>
		<link>http://www.solusan.com/iptables-tip.html</link>
		<comments>http://www.solusan.com/iptables-tip.html#comments</comments>
		<pubDate>Fri, 25 Apr 2008 11:49:06 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[CentoOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[SuSE]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=1008</guid>
		<description><![CDATA[Necesitamos que un equipo tenga acceso a toda la red corporativa y a si mismo, pero no al &#8216;resto del mundo&#8217;. #!/bin/bash iptables -F iptables -X iptables -Z # abrimos trafico a la red interna iptables -A INPUT -s 127.0.0.0/8 -j ACCEPT iptables -A OUTPUT -s 127.0.0.0/8 -j ACCEPT iptables -A INPUT -s 10.120.0.0/16 -j [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.solusan.com/wp-content/2008/04/iptablespz5.jpg"><img class="alignnone size-thumbnail wp-image-1009 alignright" style="float: right;" title="iptablespz5" src="http://www.solusan.com/wp-content/2008/04/iptablespz5-150x150.jpg" alt="" width="96" height="96" /></a>Necesitamos que un equipo tenga acceso a toda la red corporativa y a si mismo, pero no al &#8216;resto del mundo&#8217;.</p>
<blockquote><p><code>#!/bin/bash<br />
iptables -F<br />
iptables -X<br />
iptables -Z</code></p>
<p><code># abrimos trafico a la red interna</code></p>
<p><code>iptables -A INPUT -s 127.0.0.0/8 -j ACCEPT<br />
iptables -A OUTPUT -s 127.0.0.0/8 -j ACCEPT<br />
iptables -A INPUT -s 10.120.0.0/16 -j ACCEPT<br />
iptables -A INPUT -s 10.120.0.0/16 -j ACCEPT</code></p>
<p><code>iptables -A OUTPUT -d ! 10.120.0.0/16 -j DROP</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/iptables-tip.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sombreros rojos&#8230;</title>
		<link>http://www.solusan.com/sombreros-rojos.html</link>
		<comments>http://www.solusan.com/sombreros-rojos.html#comments</comments>
		<pubDate>Wed, 16 Apr 2008 09:42:30 +0000</pubDate>
		<dc:creator>Solusan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://www.solusan.com/?p=995</guid>
		<description><![CDATA[1) Para buscar un RPM _instalado_ en tu máquina, p. ej. el very-good_foo-4.3.2-1.rpm: shell# rpm -qa &#124; grep -i &#8216;foo&#8217; Si /var/log/rpmpkgs es reciente: shell# grep -i &#8216;foo&#8217; /var/log/rpmpkgs Nota: el &#8216;foo&#8217; no hace falta que vaya entre comillas; sí que es aconsejable cuando utilizas expresiones regulares: shell# echo &#8220;Very_Good_Foo-4.3.2.rpm&#8221; &#124; grep -i &#8216;^ve.*foo.4&#8242; 2) [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://www.solusan.com/wp-content/2008/04/redhat001.jpg"><img class="alignright size-thumbnail wp-image-996" style="float: right;" title="redhat001" src="http://www.solusan.com/wp-content/2008/04/redhat001-150x150.jpg" alt="" width="150" height="150" /></a>1) Para buscar un RPM _instalado_ en tu máquina, p. ej. el</div>
<div>very-good_foo-4.3.2-1.rpm:</div>
<div>shell# rpm -qa | grep -i &#8216;foo&#8217;</div>
<div>Si /var/log/rpmpkgs es reciente:</div>
<div>shell# grep -i &#8216;foo&#8217; /var/log/rpmpkgs</div>
<div>Nota: el &#8216;foo&#8217; no hace falta que vaya entre comillas; sí que es aconsejable cuando utilizas expresiones regulares:</div>
<div>shell# echo &#8220;Very_Good_Foo-4.3.2.rpm&#8221; | grep -i &#8216;^ve.*foo.4&#8242;</div>
<div>
</div>
<div>
</div>
<div>2) Si el RPM no está instalado:</div>
<ul>
<li>en el CD/DVD de la distro, en un directorio media/RPMS</li>
<li>en la propia web de Red Hat</li>
</ul>
<div>Otras webs con repositorios de RPMs:</div>
<ul>
<li>RPMfind:   <a href="http://www.rpmfind.net/" target="_blank">http://www.rpmfind.net</a></li>
<li>Pbone:   <a href="http://rpm.pbone.net/" target="_blank">http://rpm.pbone.net</a></li>
<li>Seer of Souls:   <a href="http://www.seerofsouls.com/" target="_blank">http://www.seerofsouls.com</a></li>
<li>Penguin Liberation Front:   <a href="http://plf.zarb.org/" target="_blank">http://plf.zarb.org</a></li>
<li>buscar San Google! (ora pro nobis)</li>
</ul>
<div>3) Actualizar la BBDD de ficheros. Es preferible esto que hacer una sola búsqueda con &#8216;find&#8217;!</div>
<div>Hay que encontrar el ejecutable, que puede ser&#8230;</div>
<div>
</div>
<div>
</div>
<p><code>
<div>shell# /etc/cron.daily/slocate.cron</div>
<div>shell# /etc/cron.daily/slocate</div>
<div>shell# /etc/cron.daily/updatedb</div>
<div>shell# /usr/bin/updatedb</div>
<p></code></p>
<div>
</div>
<div>
</div>
<div>4) de 2 a 5 minutos mas tarde, ya puedes hacer cuantas búsquedas quieras, y se harán en décimas:</div>
<div>(a veces el ejecutable se llama slocate, o mlocate)</div>
<div>(lo puedes buscar, con # &#8216;find&#8217; /{,s}bin /usr/{,s}bin -name &#8220;*locate&#8221; <img src='http://www.solusan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </div>
<p><code>
<div>shell# locate -i 'foo'</div>
<div>shell# locate -i crond | grep bin/      ### lo encontrara en /usr/sbin/</div>
<div>shell# locate -i tkconf | grep lib/</div>
<p></code></p>
<div>
</div>
<div>
</div>
<div>Gracias McArm</div>
]]></content:encoded>
			<wfw:commentRss>http://www.solusan.com/sombreros-rojos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

