<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>LinuxQuestions.org - Blogs - ALInux</title>
		<link>http://www.linuxquestions.org/questions/blog.php?u=81180</link>
		<description>LinuxQuestions.org offers a free Linux forum where Linux newbies can ask questions and Linux experts can offer advice. Topics include security, installation, networking and much more.</description>
		<language>en</language>
		<lastBuildDate>Tue, 24 Nov 2009 04:56:46 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://e1h7.simplecdn.net/lqcdn/images/questions/images/misc/rss.jpg</url>
			<title>LinuxQuestions.org - Blogs - ALInux</title>
			<link>http://www.linuxquestions.org/questions/blog.php?u=81180</link>
		</image>
		<item>
			<title>The horror of all horrors, lets enable remote dial-in and Horde...</title>
			<link>http://www.linuxquestions.org/questions/blog.php?b=289</link>
			<pubDate>Sat, 22 Apr 2006 13:06:15 GMT</pubDate>
			<description>If trying remote dial-in is not enough..I will also have to enable Horde...on my debian box..wish me luck and a good linmodem...Well I will keep you...</description>
			<content:encoded><![CDATA[<div>If trying remote dial-in is not enough..I will also have to enable Horde...on my debian box..wish me luck and a good linmodem...Well I will keep you folks updated about the progress</div>

]]></content:encoded>
			<dc:creator>ALInux</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog.php?b=289</guid>
		</item>
		<item>
			<title>VPN through debian gateway to windows domain</title>
			<link>http://www.linuxquestions.org/questions/blog.php?b=183</link>
			<pubDate>Sun, 12 Feb 2006 13:42:04 GMT</pubDate>
			<description>To do this...... 
I had to create a vpn server on the windows 2003 server...and edit user accounts in the active directory to allow vpn access...</description>
			<content:encoded><![CDATA[<div>To do this......<br />
I had to create a vpn server on the windows 2003 server...and edit user accounts in the active directory to allow vpn access through the dial-in tab...and add the dial up vpn connection on the laptops of the target vpn users.<br />
<br />
But most important I had to edit my firewall to allow vpn traffic to pass through it...vpn is neither tcp nor udp it is pptp....I will post the firewall script when I get back to work<br />
</div>

]]></content:encoded>
			<dc:creator>ALInux</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog.php?b=183</guid>
		</item>
		<item>
			<title>Failover script for Connection back up</title>
			<link>http://www.linuxquestions.org/questions/blog.php?b=182</link>
			<pubDate>Sun, 12 Feb 2006 13:38:55 GMT</pubDate>
			<description>Hi this is a script for backing up the internet connection on a debian server...still buggy and testing it and not finished but someone might use...</description>
			<content:encoded><![CDATA[<div>Hi this is a script for backing up the internet connection on a debian server...still buggy and testing it and not finished but someone might use it..<br />
<br />
Assumptions:<br />
1-pppoe always on connection &quot;should be used as long as up&quot;<br />
2-cable limited backup connection<br />
3-pppoe can not ping external IPs &quot;ISP settings :S&quot; so to test the connection either download a small file or resolve a hostname<br />
4-If pppoe fails 3 times in a row switch to cable...when pppoe up again switch to it<br />
5-pppoe and cable have different firewall setups ....these setups are stored in different firewall scripts which are executed depending on the active connection...<br />
<br />
<br />
#!/bin/bash<br />
<br />
<br />
wise=&quot;eth2&quot;  # wisebox connectedhere	<br />
rabbit=&quot;true&quot;  #assume rabbit is a up as a start condition<br />
count=0 #initialise count to 0<br />
<br />
#since the wise box connection is obsolete stop all traffic on it<br />
iptables -I  INPUT -i $wise -j DROP<br />
iptables -I FORWARD -i $wise -j DROP<br />
#iptables -I OUTPUT -i $wise -j DROP<br />
<br />
#create a while loop to test for rabbit overall conditions<br />
<br />
while [ $rabbit = &quot;true&quot; ]; do<br />
<br />
#clear variable  values each time<br />
eth0=&quot;&quot; # rabbit connected here<br />
ppp0=&quot;&quot; # pppoe link<br />
conn=&quot;&quot; # pppoe connectivity<br />
conn2=&quot;&quot; #second test of pppoe connectivity<br />
<br />
#Test for eth0 link<br />
<br />
eth0=`/sbin/ifconfig -a | grep &quot;eth0&quot;`<br />
#note that in the if statement you have to enclose the variable in double quotes because the line repeated by $eth0 contains whitespaces<br />
	if [ -n &quot;$eth0&quot; ];then # -n tests to see if the argument is non empty<br />
		echo &quot;eth0 is up&quot;<br />
	else<br />
		echo &quot;eth0 is down&quot;<br />
		echo -e &quot; `date` NOCCBOX says eth0 is down&quot; &gt;&gt; /var/log/syslog<br />
		rabbit=&quot;false&quot;<br />
	fi<br />
<br />
#Test for pppoe link<br />
<br />
ppp0=`/sbin/ifconfig -a | grep &quot;ppp0&quot;`<br />
	if [ -n &quot;$ppp0&quot; ]; then # -n tests to see if the argument is non empty<br />
		echo &quot;ppp0 is up&quot;<br />
	else<br />
		echo &quot;ppp0 is down&quot;<br />
        	echo -e &quot; `date` NOCCBOX says ppp0 is down&quot; &gt;&gt; /var/log/syslog<br />
		rabbit=&quot;false&quot;<br />
	fi<br />
<br />
#Test for pppoe connectivity<br />
<br />
conn=`ping -c 1 -W 3 www.nocclb.com | grep &quot;65.75.128.46&quot;`<br />
	if [ -n &quot;$conn&quot; ]; then	# -n tests to see if the argument is non empty<br />
		echo &quot;conn is up&quot;<br />
		count=0 #reset counter<br />
	else<br />
		conn2=`ping -c 1 -W 3 www.google.com | grep &quot;66.102.9&quot;` #dont insert the last octet since google has multiple IP which differ according to last octet<br />
		if [ -n &quot;$conn2&quot; ]; then<br />
			echo &quot;conn is up in second test&quot;<br />
			count=0 #reset counter<br />
			else<br />
			echo &quot;conn is down&quot;<br />
			echo -e &quot; `date` NOCCBOX says conn is down&quot; &gt;&gt; /var/log/syslog<br />
			#Increment count by 1<br />
			count=$((count + 1))<br />
			if[ $((count = 3)) ]; then #after three consecutive fails set rabbit false<br />
			rabbit=&quot;false&quot;<br />
		fi<br />
<br />
<br />
sleep 60  #sleep for one minute before retrying<br />
<br />
done #end of while loop<br />
<br />
#now that rabbit failed the connection should switch to the wisebox cable connection<br />
echo -e &quot; `date` switching to wisebox connection&quot; &gt;&gt; /var/log/syslog<br />
<br />
#clear the routing table<br />
<br />
#fetch dns info and default gw<br />
dhclient $wise<br />
<br />
#call the wisebox firewall script<br />
#sh nocc.cable.wise.sh<br />
<br />
while [ $rabbit = &quot;false&quot; ]; do<br />
<br />
<br />
eth0=`/sbin/ifconfig -a | grep &quot;eth0&quot;`<br />
	if [ -n &quot;$eth0&quot; ];then # -n tests to see if the argument is non empty<br />
		echo &quot;eth0 is up while in wisebox&quot;<br />
		#If eth0 up test for pppoe link<br />
		ppp0=`/sbin/ifconfig -a | grep &quot;ppp0&quot;`<br />
		if [ -n &quot;$ppp0&quot; ]; then # -n tests to see if the argument is non empty<br />
			echo &quot;ppp0 is up while in wisebox&quot;<br />
			#Test for pppoe connectivity since both ppp0 and eth0 are up<br />
			#get the ip address of the gateway of the pppoe connection<br />
			gateway=`ifconfig ppp0 | grep &quot;inet addr:&quot; | awk -F : '{print$2}'| awk '{print$1}'`<br />
			#get the ip address of the pppoe for wget<br />
			ppp0_address=`ifconfig ppp0 | grep &quot;inet addr:&quot; | awk -F : '{print$2}' | awk '{print$1}'`<br />
			#add entry into routing table to allow to ping through pppo if it is up to check for connectivity<br />
			route add  $gateway dev ppp0<br />
			#flush dns cache<br />
			service named stop<br />
			service named start<br />
			ifconfig eth2 down #stop wise.....testing here only might be totally wrong<br />
			#conn=`ping -I ppp0 -c 1 -W 3 www.nocclb.com | grep &quot;65.75.128.46&quot;`<br />
			#check if a file can be downloaded by binding the address of ppp0 to the download command<br />
			ppp0_test=`wget --bind-address=$ppp0_address http://bihnet.linux.tucows.com/files/snes9express-1.26-2.src.rpm`<br />
			if [ -n &quot;$conn&quot; ]; then	# -n tests to see if the argument is non empty<br />
			echo &quot;conn is up&quot;<br />
			else<br />
			conn2=`ping -c1 -W 3 www.google.com | grep &quot;66.102.9&quot;` #dont insert the last octet since google has multiple IP which differ according to last octet<br />
			if [ -n &quot;$conn2&quot; ]; then<br />
				echo &quot;conn is up &quot;<br />
				echo -e &quot; `date` conn is up&quot; &gt;&gt; /var/log/syslog<br />
				rabbit=&quot;true&quot;<br />
			fi<br />
		fi	<br />
<br />
sleep 60<br />
<br />
done<br />
<br />
#Now that rabbit evaluated true......the routing table has to be reset again and the dns reset and pppoe firewall script has to be executed<br />
#after that the script calls it self again and executes..this guarantees that the script will always be running<br />
<br />
#fetch dns info and default gw<br />
dhclient eth0<br />
<br />
#reset routing table<br />
<br />
#call firewall script<br />
# sh firwall.pppoe.script.sh<br />
<br />
#call this script<br />
chmod u+x fail.sh<br />
sh fail.sh<br />
</div>

]]></content:encoded>
			<dc:creator>ALInux</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog.php?b=182</guid>
		</item>
		<item>
			<title>The wonders of Debian</title>
			<link>http://www.linuxquestions.org/questions/blog.php?b=181</link>
			<pubDate>Sun, 12 Feb 2006 13:33:18 GMT</pubDate>
			<description>Since Ive got my new job........I have been in this permanent dilemna of determining the position of the config files in debian ...they are almost...</description>
			<content:encoded><![CDATA[<div>Since Ive got my new job........I have been in this permanent dilemna of determining the position of the config files in debian ...they are almost all in dirs different from my FC distro......but since debian was doing such a stable and wonderfull job...and apt-get rocks......I switched to debian sarge....Awesome debian really awesome........</div>

]]></content:encoded>
			<dc:creator>ALInux</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog.php?b=181</guid>
		</item>
		<item>
			<title>The wonders of Debian</title>
			<link>http://www.linuxquestions.org/questions/blog.php?b=180</link>
			<pubDate>Sun, 12 Feb 2006 13:33:00 GMT</pubDate>
			<description>Since Ive got my new job........I have been in this permanent dilemna of determining the position of the config files in debian ...they are almost...</description>
			<content:encoded><![CDATA[<div>Since Ive got my new job........I have been in this permanent dilemna of determining the position of the config files in debian ...they are almost all in dirs different from my FC distro......but since debian was doing such a stable and wonderfull job...and apt-get rocks......I switched to debian sarge....Awesome Things this debian...</div>

]]></content:encoded>
			<dc:creator>ALInux</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog.php?b=180</guid>
		</item>
		<item>
			<title>Switched back to FC4 from Slack 10.2</title>
			<link>http://www.linuxquestions.org/questions/blog.php?b=45</link>
			<pubDate>Thu, 15 Dec 2005 10:46:58 GMT</pubDate>
			<description>I was starting to like slack.......but slapt-get did not do the job for me.....I needed something like urpmi or yum....anyhow....Iam back on FC4 now..</description>
			<content:encoded><![CDATA[<div>I was starting to like slack.......but slapt-get did not do the job for me.....I needed something like urpmi or yum....anyhow....Iam back on FC4 now..</div>

]]></content:encoded>
			<dc:creator>ALInux</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog.php?b=45</guid>
		</item>
	</channel>
</rss>
