<?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>x83.net &#187; generate</title>
	<atom:link href="http://www.x83.net/tag/generate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Script to generate /etc/network/interfaces file on Ubuntu/Debian</title>
		<link>http://www.x83.net/script-to-generate-etcnetworkinterfaces-file-on-ubuntudebian/</link>
		<comments>http://www.x83.net/script-to-generate-etcnetworkinterfaces-file-on-ubuntudebian/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 18:37:04 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[/etc/network/interfaces/debian]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=386</guid>
		<description><![CDATA[#!/bin/bash ifile=/etc/network/interfaces echo -n &#8220;Insert IPstart:&#8221; read ipstart echo -n &#8220;Insert IPend:&#8221; read ipend echo -n &#8220;Insert Gateway:&#8221; read gw #echo -n &#8220;Insert Subnet: &#8221; #read subnet echo -n &#8220;Insert Netmask: &#8221; read net echo -n &#8220;Insert aliast to start: &#8221; read ali firstIp=`echo &#8220;${ipstart%.*}&#8221;` lastIpStart=`echo &#8220;${ipstart##*.}&#8221;` lastIpEnd=`echo &#8220;${ipend##*.}&#8221;` dif=`echo $(($lastIpEnd-$lastIpStart))` ip=$lastIpStart for ((i=$ali;i>$ifile echo [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>#!/bin/bash<br />
ifile=/etc/network/interfaces<br />
echo -n &#8220;Insert IPstart:&#8221;<br />
read ipstart<br />
echo -n &#8220;Insert IPend:&#8221;<br />
read ipend<br />
echo -n &#8220;Insert Gateway:&#8221;<br />
read gw<br />
#echo -n &#8220;Insert Subnet: &#8221;<br />
#read subnet<br />
echo -n &#8220;Insert Netmask: &#8221;<br />
read net<br />
echo -n &#8220;Insert aliast to start: &#8221;<br />
read ali</p>
<p>firstIp=`echo &#8220;${ipstart%.*}&#8221;`<br />
lastIpStart=`echo &#8220;${ipstart##*.}&#8221;`<br />
lastIpEnd=`echo &#8220;${ipend##*.}&#8221;`<br />
dif=`echo $(($lastIpEnd-$lastIpStart))`</p>
<p>ip=$lastIpStart<br />
for ((i=$ali;i<=$ali+$dif;i++)){<br />
echo "auto eth0:$i" >>$ifile<br />
echo &#8220;iface eth0:$i inet static&#8221; >>$ifile<br />
echo &#8220;address $firstIp.$ip&#8221; >>$ifile<br />
echo &#8220;network $subnet&#8221; >>$ifile<br />
echo &#8220;netmask $net&#8221; >>$ifile<br />
echo &#8220;gateway $gw&#8221; >> $ifile<br />
echo &#8221; &#8221; >> $ifile<br />
let ip++<br />
}
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/script-to-generate-etcnetworkinterfaces-file-on-ubuntudebian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squid and password authentication</title>
		<link>http://www.x83.net/squid-and-password-authentication/</link>
		<comments>http://www.x83.net/squid-and-password-authentication/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 09:00:53 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[tcp_outgoing_address]]></category>
		<category><![CDATA[visible_hostname]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=274</guid>
		<description><![CDATA[yum install squid Example of squid.conf http_port 10000 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours auth_param basic casesensitive off refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern [...]]]></description>
			<content:encoded><![CDATA[<p>yum install squid</p>
<p>Example of squid.conf</p>
<blockquote><p>http_port 10000<br />
hierarchy_stoplist cgi-bin ?</p>
<p>acl QUERY urlpath_regex cgi-bin \?<br />
no_cache deny QUERY</p>
<p>auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd<br />
auth_param basic children 5<br />
auth_param basic realm Squid proxy-caching web server<br />
auth_param basic credentialsttl 2 hours<br />
auth_param basic casesensitive off</p>
<p>refresh_pattern ^ftp:           1440    20%     10080<br />
refresh_pattern ^gopher:        1440    0%      1440<br />
refresh_pattern .               0       20%     4320</p>
<p>acl all src 0.0.0.0/0.0.0.0<br />
acl SSL_ports port 443 563<br />
acl Safe_ports port 80          # http<br />
acl Safe_ports port 21          # ftp<br />
acl Safe_ports port 443 563     # https, snews<br />
acl Safe_ports port 70          # gopher<br />
acl Safe_ports port 210         # wais<br />
acl Safe_ports port 1025-65535  # unregistered ports<br />
acl Safe_ports port 280         # http-mgmt<br />
acl Safe_ports port 488         # gss-http<br />
acl Safe_ports port 591         # filemaker<br />
acl Safe_ports port 777         # multiling http</p>
<p>acl ncsa_users proxy_auth REQUIRED<br />
http_access deny !Safe_ports<br />
http_access allow ncsa_users<br />
visible_hostname mysite.com<br />
coredump_dir /var/spool/squid</p></blockquote>
<blockquote><p>service squid start</p></blockquote>
<p>Setting proxy for wget:</p>
<blockquote><p>export http_proxy=http://anton:testinsg@mysite:10000</p></blockquote>
<p>If you want to make it anonymous add these lines:</p>
<blockquote><p>forwarded_for off</p>
<p>header_access Allow allow all<br />
header_access Authorization allow all<br />
header_access WWW-Authenticate allow all<br />
header_access Proxy-Authorization allow all<br />
header_access Proxy-Authenticate allow all<br />
header_access Cache-Control allow all<br />
header_access Content-Encoding allow all<br />
header_access Content-Length allow all<br />
header_access Content-Type allow all<br />
header_access Date allow all<br />
header_access Expires allow all<br />
header_access Host allow all<br />
header_access If-Modified-Since allow all<br />
header_access Last-Modified allow all<br />
header_access Location allow all<br />
header_access Pragma allow all<br />
header_access Accept allow all<br />
header_access Accept-Charset allow all<br />
header_access Accept-Encoding allow all<br />
header_access Accept-Language allow all<br />
header_access Content-Language allow all<br />
header_access Mime-Version allow all<br />
header_access Retry-After allow all<br />
header_access Title allow all<br />
header_access Connection allow all<br />
header_access Proxy-Connection allow all<br />
header_access Cookie allow all<br />
header_access Set-Cookie allow all<br />
header_access All deny all</p>
<p>acl ip4 myaclname yourip<br />
tcp_outgoing_address yourip myaclname</p></blockquote>
<p>Generate acl and tcp_outgoing_address:</p>
<blockquote><p>for f in {314..372}; do echo &#8220;acl ip$((f))&#8221; myip aaa.bbb.ccc.$((f-246)) >> &#8220;blah1&#8243;; done<br />
for f in {314..372}; do echo &#8220;tcp_outgoing_address aaa.bbb.ccc.$((f-246))&#8221; ip$((f)) >> &#8220;blah1&#8243;; done</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/squid-and-password-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

