<?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>Hoxt.com - Open Source Mirrors &#187; Uncategorized</title>
	<atom:link href="http://hoxt.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoxt.com</link>
	<description>Apache, CPAN, PHP, MySQL, PuTTY, Linux Virtual Server, Linux Documentation Project, ProFTPD</description>
	<lastBuildDate>Sat, 17 Jul 2010 22:19:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install OSSEC automatically with expect</title>
		<link>http://hoxt.com/2010/07/17/install-ossec-automatically-with-expect/</link>
		<comments>http://hoxt.com/2010/07/17/install-ossec-automatically-with-expect/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 22:19:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/2010/07/17/install-ossec-automatically-with-expect/</guid>
		<description><![CDATA[If you want to script the installation of ossec, this script will use expect/spawn to automatically enter values for prompts:
#!/usr/bin/expect -d
set timeout -1
spawn ossec-hids-2.4.1/install.sh
expect "en/br/cn/de"
send "en\r"
expect "Press ENTER to continue"
send "\r"
expect "What kind of installation"
send "local\r"
expect "Choose where to install the OSSEC HIDS"
send "\r"
expect "Do you want e-mail notification"
send "y\r"
expect "your e-mail address"
send "root@localhost\r"
expect "Do [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to script the installation of ossec, this script will use expect/spawn to automatically enter values for prompts:</p>
<p>#!/usr/bin/expect -d<br />
set timeout -1<br />
spawn ossec-hids-2.4.1/install.sh<br />
expect "en/br/cn/de"<br />
send "en\r"<br />
expect "Press ENTER to continue"<br />
send "\r"<br />
expect "What kind of installation"<br />
send "local\r"<br />
expect "Choose where to install the OSSEC HIDS"<br />
send "\r"<br />
expect "Do you want e-mail notification"<br />
send "y\r"<br />
expect "your e-mail address"<br />
send "root@localhost\r"<br />
expect "Do you want to use it"<br />
send "y\r"<br />
expect "Do you want to run the integrity check daemon"<br />
send "y\r"<br />
expect "Do you want to run the rootkit detection engine"<br />
send "y\r"<br />
expect "Do you want to enable active response"<br />
send "y\r"<br />
expect "Do you want to enable the firewall-drop response"<br />
send "y\r"<br />
expect "Do you want to add more IPs to the white list"<br />
send "n\r"<br />
expect "Press ENTER to continue"<br />
send "\r"<br />
expect "Press ENTER to finish"<br />
send "\r"<br />
expect eof</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2010/07/17/install-ossec-automatically-with-expect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell scripting &#8211; Bash alias that takes argument</title>
		<link>http://hoxt.com/2010/07/07/shell-scripting-bash-alias-that-takes-argument/</link>
		<comments>http://hoxt.com/2010/07/07/shell-scripting-bash-alias-that-takes-argument/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 01:28:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/2010/07/07/shell-scripting-bash-alias-that-takes-argument/</guid>
		<description><![CDATA[Normally, you would have this shortcut in .bash_profile
alias sshwww='ssh john@www.example.com'
What about you have 100s of www servers:
sshwww() { ssh "john@$1".example.com; }
Usage: "sshwww web1", "sshwww web2"
Even more, you can su directly to root from john:
sshroot() { ssh "john@$1".example.com "su"; }
Usage: "sshroot web1", "sshroot web2"
]]></description>
			<content:encoded><![CDATA[<p>Normally, you would have this shortcut in .bash_profile</p>
<p>alias sshwww='ssh john@www.example.com'</p>
<p>What about you have 100s of www servers:</p>
<p>sshwww() { ssh "john@$1".example.com; }</p>
<p>Usage: "sshwww web1", "sshwww web2"</p>
<p>Even more, you can su directly to root from john:<br />
sshroot() { ssh "john@$1".example.com "su"; }</p>
<p>Usage: "sshroot web1", "sshroot web2"</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2010/07/07/shell-scripting-bash-alias-that-takes-argument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make an encrypted password for useradd</title>
		<link>http://hoxt.com/2010/07/07/make-an-encrypted-password-for-useradd/</link>
		<comments>http://hoxt.com/2010/07/07/make-an-encrypted-password-for-useradd/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 00:54:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/2010/07/07/make-an-encrypted-password-for-useradd/</guid>
		<description><![CDATA[Very simple using php:
php -r "echo crypt('myplaintextpassword123');"
useradd -m -p "$1$abJez234$fD4Dn4IrG3Hzeas3hBjIb0" -d /home/john -s /bin/bash john
]]></description>
			<content:encoded><![CDATA[<p>Very simple using php:</p>
<p>php -r "echo crypt('myplaintextpassword123');"</p>
<p>useradd -m -p "$1$abJez234$fD4Dn4IrG3Hzeas3hBjIb0" -d /home/john -s /bin/bash john</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2010/07/07/make-an-encrypted-password-for-useradd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>su &#8211; Run a command after entering root password</title>
		<link>http://hoxt.com/2010/07/07/su-run-a-command-after-entering-root-password/</link>
		<comments>http://hoxt.com/2010/07/07/su-run-a-command-after-entering-root-password/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 00:35:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/2010/07/07/su-run-a-command-after-entering-root-password/</guid>
		<description><![CDATA[For a better scripting automation and still retain the security of su/non-root login:
su -c "mysql -e 'SHOW STATUS;' "
This will return the status of mysql. Now you can run this via a regular user, then su, then mysql. You'll be asked for password twice, one for the regular user, one for root.
ssh nonroot@server "su -c [...]]]></description>
			<content:encoded><![CDATA[<p>For a better scripting automation and still retain the security of su/non-root login:</p>
<p>su -c "mysql -e 'SHOW STATUS;' "</p>
<p>This will return the status of mysql. Now you can run this via a regular user, then su, then mysql. You'll be asked for password twice, one for the regular user, one for root.</p>
<p>ssh nonroot@server "su -c \"mysql -e 'SHOW STATUS;' \""</p>
<p>You'll get "standard in must be a tty" error. Too bad! Nice concept but does not work like this. Now to solve this, I've seen some suggestion to use an expect script but not supplying the root password automatically. The expect script will ask for the password.</p>
<p>Update: no need for expect script, with just an ssh option "-t" to force it to ask for a tty (see man page for description). So the solution is this:</p>
<p>ssh -t nonroot@server "su -c \"mysql -e 'SHOW STATUS;' \""</p>
<p>Security is still there, you'll be asked for two different passwords, but you can now write a script to guide the process flow as you expected and not having to teach/say/request/instruct users to type in a certain command (eg: then type su, then type your xxx command). Love it eh!</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2010/07/07/su-run-a-command-after-entering-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Puppet locking problem</title>
		<link>http://hoxt.com/2010/07/07/puppet-locking-problem/</link>
		<comments>http://hoxt.com/2010/07/07/puppet-locking-problem/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 22:09:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/2010/07/07/puppet-locking-problem/</guid>
		<description><![CDATA[If you run "puppetd --test" manually or via service and get this error:
Run of Puppet configuration client already in progress; skipping
Problem: the lock file is not removed properly. It's a known bug: http://projects.reductivelabs.com/issues/2888
Solution: manually remove /var/lib/puppet/state/puppetdlock
Also, you might need to check /var/run/ for the pid and delete/kill the process if it's indeed running
]]></description>
			<content:encoded><![CDATA[<p>If you run "puppetd --test" manually or via service and get this error:</p>
<p>Run of Puppet configuration client already in progress; skipping</p>
<p>Problem: the lock file is not removed properly. It's a known bug: http://projects.reductivelabs.com/issues/2888</p>
<p>Solution: manually remove /var/lib/puppet/state/puppetdlock<br />
Also, you might need to check /var/run/ for the pid and delete/kill the process if it's indeed running</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2010/07/07/puppet-locking-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_security and Apache dummy internal connection</title>
		<link>http://hoxt.com/2010/07/06/mod_security-and-apache-dummy-internal-connection/</link>
		<comments>http://hoxt.com/2010/07/06/mod_security-and-apache-dummy-internal-connection/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 01:31:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/2010/07/06/mod_security-and-apache-dummy-internal-connection/</guid>
		<description><![CDATA[The core rule looks specially for 127.0.0.1 so if your apache is listening to specific IPs and not 127.0.0.1, this rule will be ignored.
Solution: add Listen 127.0.0.1:80 to your httpd.conf, it should be the first line before other Listen's statements
You might want to add exceptions or slowly introduce the rulesets. Some core rules are very [...]]]></description>
			<content:encoded><![CDATA[<p>The core rule looks specially for 127.0.0.1 so if your apache is listening to specific IPs and not 127.0.0.1, this rule will be ignored.</p>
<p>Solution: add Listen 127.0.0.1:80 to your httpd.conf, it should be the first line before other Listen's statements</p>
<p>You might want to add exceptions or slowly introduce the rulesets. Some core rules are very specific and might not work for your case.</p>
<p>#Include modsecurity.d/base_rules/modsecurity_crs_20_protocol_violations.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_21_protocol_anomalies.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_23_request_limits.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_30_http_policy.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_35_bad_robots.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_40_generic_attacks.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_41_phpids_converter.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_41_phpids_filters.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_41_sql_injection_attacks.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_41_xss_attacks.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_42_tight_security.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_45_trojans.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_47_common_exceptions.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_48_local_exceptions.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_49_enforcement.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_49_inbound_blocking.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_50_outbound.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_59_outbound_blocking.conf<br />
#Include modsecurity.d/base_rules/modsecurity_crs_60_correlation.conf</p>
<p>Some example exceptions</p>
<p># avoid for Apache dummy internal connection<br />
SecRule REMOTE_ADDR "^127\.0\.0\.1$" phase:1,nolog,allow,ctl:ruleEngine=Off</p>
<p># turn off for this file<br />
SecRule REQUEST_BASENAME "^special\.php$" phase:1,nolog,allow,ctl:ruleEngine=Off</p>
<p># certain agents do not send Accept header and it's okay, I don't need to see those errors<br />
SecRule REQUEST_HEADERS:User-Agent "SomeAgentString" phase:1,nolog,pass,ctl:ruleRemoveById=960015</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2010/07/06/mod_security-and-apache-dummy-internal-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Our thanks to the open source developers</title>
		<link>http://hoxt.com/2006/01/16/hello-world/</link>
		<comments>http://hoxt.com/2006/01/16/hello-world/#comments</comments>
		<pubDate>Mon, 16 Jan 2006 08:37:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hoxt.com/wordpress/?p=1</guid>
		<description><![CDATA[The development team at AdSpeed uses open source applications daily and to show our support to the great open source creators and developers, we are proud to dedicate a server in our ad server network with redundant bandwidth to host a variety of open source mirrors. This server has been online since 2006. Following is [...]]]></description>
			<content:encoded><![CDATA[<p>The development team at <a href="http://www.adspeed.com/?src=hoxt">AdSpeed</a> uses open source applications daily and to show our support to the great open source creators and developers, we are proud to dedicate a server in our ad server network with redundant bandwidth to host a variety of open source mirrors. This server has been online since 2006. Following is the list of available mirrors:</p>
<ol>
<li>Apache: <a href="http://apache.hoxt.com/">http://apache.hoxt.com/</a></li>
<li>PuTTY: <a href="http://putty.hoxt.com/">http://putty.hoxt.com/</a></li>
<li>ProFTPD: <a href="http://proftpd.hoxt.com/">http://proftpd.hoxt.com/</a></li>
<li>Linux Virtual Server: <a href="http://lvs.hoxt.com/">http://lvs.hoxt.com/</a></li>
<li>Linux Documentation Project: <a href="http://ldp.hoxt.com/">http://ldp.hoxt.com/</a></li>
<li>cURL: <a href="http://curl.hoxt.com/">http://curl.hoxt.com/</a></li>
<li>CPAN: <a href="http://cpan.hoxt.com/">http://cpan.hoxt.com/</a></li>
<li>OpenSSL: <a href="http://openssl.hoxt.com/">http://openssl.hoxt.com/</a></li>
<li>PHP: <a href="http://php.hoxt.com/">http://php.hoxt.com/</a></li>
</ol>
<h2>rsync mirroring commands</h2>
<p>These mirrors are created and synced with the following commands:</p>
<p>==&gt; rsync.apache.sh &lt;==<br />
rsync -rtlzv --progress --delete rsync.apache.org::apache-dist /home/mirrors/apache</p>
<p>==&gt; rsync.centos.sh &lt;==<br />
rsync --progress -azHv --delete --bwlimit=600 us-msync.centos.org::CentOS /home/mirrors/centos</p>
<p>==&gt; rsync.cpan.sh &lt;==<br />
rsync --progress -av --delete rsync.nic.funet.fi::CPAN /home/mirrors/cpan</p>
<p>==&gt; rsync.curl.sh &lt;==<br />
rsync --progress -r -t -z --delete "rsync://cool.haxx.se/curlweb/*" /home/mirrors/curl/<br />
rsync --progress -z -t --delete "rsync://cool.haxx.se/curldownload/*" /home/mirrors/curl/download/</p>
<p>==&gt; rsync.kde.sh &lt;==<br />
rsync --progress -za --timeout=3600 --delete rsync.kde.org::www /home/mirrors/kde</p>
<p>==&gt; rsync.ldp.sh &lt;==<br />
rsync -rlptv --progress --delete ftp.ibiblio.org::ldp_mirror /home/mirrors/ldp</p>
<p>==&gt; rsync.lvs.sh &lt;==<br />
rsync --progress -auvz --delete rsync.linuxvirtualserver.org::w3lvs /home/mirrors/lvs</p>
<p>==&gt; rsync.mozilla.sh &lt;==<br />
rsync --progress -az --delete --delete-after ftp-rsync.mozilla.org::mozilla-releases/ /home/mirrors/mozilla</p>
<p>==&gt; rsync.mysql.sh &lt;==<br />
rsync --progress -av --delete --delete-after rsync://mysql.mirrors.pair.com/mysql/ /home/mirrors/mysql</p>
<p>==&gt; rsync.openssl.sh &lt;==<br />
rsync --progress -rztpv --delete rsync://ftp.openssl.org/openssl-ftp/ /home/mirrors/openssl/openssl-ftp<br />
rsync --progress -rztpv --delete rsync://ftp.openssl.org/openssl-web/ /home/mirrors/openssl/openssl-web</p>
<p>==&gt; rsync.php.sh &lt;==<br />
rsync -avzC --progress --timeout=600 --delete --delete-after --include='manual/en/' --include='manual/en/**' --exclude='manual/**' --exclude='distributions/**' --exclude='extra/**' rsync.php.net::phpweb /home/mirrors/php</p>
<p>==&gt; rsync.proftpd.sh &lt;==<br />
rsync --progress --recursive --times --links --compress --delete rsync.proftpd.org::proftpd-www /home/mirrors/proftpd</p>
<p>==&gt; rsync.putty.sh &lt;==<br />
rsync -auHv --progress rsync://rsync.chiark.greenend.org.uk/ftp/users/sgtatham/putty-website-mirror/ /home/mirrors/putty</p>
]]></content:encoded>
			<wfw:commentRss>http://hoxt.com/2006/01/16/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
