<?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>vacmf &#187; system</title>
	<atom:link href="http://vacmf.org/tag/system/feed/" rel="self" type="application/rss+xml" />
	<link>http://vacmf.org</link>
	<description>there's more than one way to do it</description>
	<lastBuildDate>Sun, 05 Sep 2010 16:15:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Reverse SSH tunnelling (exit by the door and come back from the window)</title>
		<link>http://vacmf.org/2006/12/20/reverse-ssh-tunnelling/</link>
		<comments>http://vacmf.org/2006/12/20/reverse-ssh-tunnelling/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 10:50:06 +0000</pubDate>
		<dc:creator>shima</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[reverse tunnel]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://vacmf.org/2006/12/20/reverse-ssh-tunnelling-exit-by-the-door-and-come-back-from-the-window/</guid>
		<description><![CDATA[Draft What to do when you have a server behind a natted internet connection whitout public IP and you want to access it from your home or somewhere? SSH is your best friend. So you can enable a reverse ssh tunnel that allow a connection from above the intranet. server &#8220;S0&#8243; in the intranet &#8212;->]]></description>
			<content:encoded><![CDATA[<p><em>Draft</em></p>
<p>What to do when you have a server behind a natted internet connection whitout public IP and you want to access it from your home or somewhere?<br />
SSH is your best friend. So you can enable a reverse ssh tunnel that allow a connection from above the intranet.<br />
server &#8220;S0&#8243; in the intranet &#8212;-> Router (without access) &#8212;-> (OoOo Internet oOoO) <---- router (my CISCO 803) <---- "C1" remote computer (my.example.cxm)<br />
In the server S0 I use ssh to create a tunnel that allow my C1 to connect it.</p>
<p><span style="font-weight: bold">On S0</span><br />
ssh -R 5000:localhost:22 my.example.cxm</p>
<p style="font-weight: bold">On Router CISCO</p>
<p>ip nat inside source static tcp 10.1.1.1 5000 interface Dialer 1 5000</p>
<p><span style="font-weight: bold">On C1</span></p>
<p>simply launch: ssh -p 5000 localhost</p>
<p>and you are connected to your server in the office intranet.<br />
<span style="font-weight: bold"><br />
What appen if the connection goes down?</span></p>
<p>we can assure that the tunnel back up again. So we must consider the idea to insert a cron job which check periodically the tunnel status.</p>
<p>next: example shell script</p>
]]></content:encoded>
			<wfw:commentRss>http://vacmf.org/2006/12/20/reverse-ssh-tunnelling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prevent DHCP server to override your resolv.conf script</title>
		<link>http://vacmf.org/2006/12/20/how-to-prevent-dhcp-server-to-override-your-resolvconf-script/</link>
		<comments>http://vacmf.org/2006/12/20/how-to-prevent-dhcp-server-to-override-your-resolvconf-script/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 10:49:50 +0000</pubDate>
		<dc:creator>shima</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dhcp client]]></category>
		<category><![CDATA[resolv.conf]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://vacmf.org/2006/12/20/how-to-prevent-dhcp-server-to-override-your-resolvconf-script/</guid>
		<description><![CDATA[Draft The &#8220;problem&#8221; is caused by dhcp server that overwrite our resolv.conf script and we lose this personalization during the IP release session. Not even is a good idea to replace the dns configuration proposed by the dhcp server, if it push that to you, probably there is a reason. But some time you want]]></description>
			<content:encoded><![CDATA[<p><em>Draft</em></p>
<p>The &#8220;problem&#8221; is caused by dhcp server that overwrite our resolv.conf script and we lose this personalization during the IP release session. Not even is a good idea to replace the dns configuration proposed by the dhcp server, if it push that to you, probably there is a reason. But some time you want to use your own configuration such as when you use your broadband router and you want your /etc/resolv.conf has been preserved fron updates.</p>
<p>To prevent  this nasty situation we can operate in two ways, determined by which dhcp client you are using: dhcpcd ord dhclient.</p>
<p>In the first case, dhcpcd (as in my Slackware laptop), prevent overriding can be obtained simply add the -R option to the dhcpcd command:</p>
<pre># dhcpcd -R eth0</pre>
<p>In the second case, we must read the man page about dhclient-script which is invoked any time you use dhclient.<br />
In:</p>
<pre>man 8 dhclient-script</pre>
<p>at the HOOKS section we can read:</p>
<blockquote><p>HOOKS</p>
<p>When it starts, the client script first defines a shell function, <strong>make_resolv_conf ,</strong> which is later used to create the <strong>/etc/resolv.conf</strong> file. To override the default behaviour, redefine this function in the enter hook script.</p></blockquote>
<p>This means that we must to create /etc/dhclient-enter-hooks and  redefine the make_resolv_conf function to satisfy our needs.<br />
If we simply wants to prevent resolv.conf updates only, the fastest way is to redefine the function to do nothing:</p>
<pre># cat /etc/dhclient-enter-hooks
make_resolv_conf() {
exit 0
}</pre>
<p>Then save the file and ensure it is executable:</p>
<pre># chmod a+x /etc/dhclient-enter-hooks</pre>
<p>Note that, as explained in the man page, the dhclient-script is not standard so if this configuration doesn&#8217;t work, please read the man page.</p>
<p>Next: How to merge dns addresses pushed by the dhcp server and my own dns.</p>
]]></content:encoded>
			<wfw:commentRss>http://vacmf.org/2006/12/20/how-to-prevent-dhcp-server-to-override-your-resolvconf-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
