<?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>Pieces of Life... &#187; Server administration</title>
	<atom:link href="http://www.bogdanirimia.ro/category/technology/server-administration/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bogdanirimia.ro</link>
	<description>Bogdan Irimia&#039;s Web Space</description>
	<lastBuildDate>Fri, 18 Mar 2011 20:11:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Symbolic links on Samba server working from Mac OS X</title>
		<link>http://www.bogdanirimia.ro/symbolic-links-on-samba-server-working-from-mac-os-x/274</link>
		<comments>http://www.bogdanirimia.ro/symbolic-links-on-samba-server-working-from-mac-os-x/274#comments</comments>
		<pubDate>Fri, 18 Mar 2011 18:24:39 +0000</pubDate>
		<dc:creator>Myself</dc:creator>
				<category><![CDATA[Server administration]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[symbolic]]></category>

		<guid isPermaLink="false">http://www.bogdanirimia.ro/?p=274</guid>
		<description><![CDATA[I am reevaluating my decision of becoming an Apple fan or not&#8230; And I tend towards becoming one. Just because of the excellent marketing and the excellent hardware! But the software isn&#8217;t that bad either! Mac OS X, once you get a bit used to it, might become your favorite OS! Of course, it has [...]]]></description>
			<content:encoded><![CDATA[<p>I am reevaluating my decision of becoming an Apple fan or not&#8230; And I tend towards becoming one. Just because of the excellent marketing and the excellent hardware! But the software isn&#8217;t that bad either!</p>
<p>Mac OS X, once you get a bit used to it, might become your favorite OS! Of course, it has its oddities, but&#8230; we all do! <img src='http://www.bogdanirimia.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now&#8230; one of Mac OS X&#8217;s oddities is the fact that the Samba protocol implementation isn&#8217;t so brilliant. I have an Ubuntu box on which I run a Samba server. I have a shared folder, and in it I have created a symbolic link. When connecting from Mac OS X to that folder, the symbolic link can&#8217;t be followed (it appears to be a shortcut file, and when clicked, pops an error with the option to fix the link, but with no success either). From Windows, it worked fine.</p>
<p>The solution to this symbolic link issue was to add in the &#8220;general&#8221; group of the Samba server configuration file the following line:</p>
<p><code>unix extensions = off</code></p>
<p>My Samba configuration file is &#8220;/etc/samba/smb.conf&#8221;. I then restarted the Samba server and reconnected from Mac OS X, and it worked! It also works from Windows too <img src='http://www.bogdanirimia.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bogdanirimia.ro/symbolic-links-on-samba-server-working-from-mac-os-x/274/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Strange routing issue, solved</title>
		<link>http://www.bogdanirimia.ro/strange-routing-issue-solved/272</link>
		<comments>http://www.bogdanirimia.ro/strange-routing-issue-solved/272#comments</comments>
		<pubDate>Wed, 29 Sep 2010 10:49:11 +0000</pubDate>
		<dc:creator>Myself</dc:creator>
				<category><![CDATA[Server administration]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[priority]]></category>
		<category><![CDATA[routes]]></category>

		<guid isPermaLink="false">http://www.bogdanirimia.ro/?p=272</guid>
		<description><![CDATA[I just encountered this problem: I have an Ubuntu box, on which ran this downloading service. Because some complaints from the Internet provider, I decided to use another network (from another provider) for this downloading service. Everything else needed to remain the same. So I installed a new network card on the system, and it [...]]]></description>
			<content:encoded><![CDATA[<p>I just encountered this problem: I have an Ubuntu box, on which ran this downloading service. Because some complaints from the Internet provider, I decided to use another network (from another provider) for this downloading service. Everything else needed to remain the same.</p>
<p>So I installed a new network card on the system, and it became <span style="font-family: book antiqua,palatino;">eth1</span>. The first one, <span style="font-family: book antiqua,palatino;">eth0</span>, was connected to network <span style="font-family: book antiqua,palatino;">192.168.2.0</span>. Now, I connected<span style="font-family: book antiqua,palatino;"> eth1</span> to network <span style="font-family: book antiqua,palatino;">192.168.1.0</span>. Both networks provides DHCP.</p>
<p>The first issue was when I configured both NICs with DHCP. No outside access was available on the box because there were two default gateways. So I configured <span style="font-family: book antiqua,palatino;">eth1 </span>as static, and didn&#8217;t specify any default gateway for it. But this rendered the internet connection through <span style="font-family: book antiqua,palatino;">eth1 </span>useless, because all the traffic (for the outside world) was routed through <span style="font-family: book antiqua,palatino;">eth0 </span>now. So when the downloading service was bound to <span style="font-family: book antiqua,palatino;">eth1</span>, it couldn&#8217;t connect anywhere outside the network.</p>
<p>After some searching effort on the Internet, I found this solution:</p>
<p>- <span style="font-family: book antiqua,palatino;">/etc/network/interfaces</span>:</p>
<pre class="brush: bash; title: ; notranslate">

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

# The secondary network interface
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0

up /etc/network/prioritize_networks.sh
</pre>
<p>- <span style="font-family: book antiqua,palatino;">/etc/network/prioritize_networks.sh</span>:</p>
<pre class="brush: bash; title: ; notranslate">

#!/bin/sh

#Set up the first subnet's routing table (we'll name it 70)
ip route flush table 70
ip route add table 70 to 192.168.2.0/24 dev eth0
ip route add table 70 to default via 192.168.2.1 dev eth0

#Set up the second subnet's routing table (we'll call it 80)
ip route flush table 80
ip route add table 80 to 192.168.1.0/24 dev eth1
ip route add table 80 to default via 192.168.1.1 dev eth1

#Create the rules to choose what table to use. Choose based on source IP
#We need to give the rules different priorities; for convenience name priority
#after the table
ip rule add from 192.168.2.0/24 table 70 priority 70
ip rule add from 192.168.1.0/24 table 80 priority 80

#Flush the cache to make effective
ip route flush cache
</pre>
<p>So now all the traffic goes by default through <span style="font-family: book antiqua,palatino;">eth0</span>, but all applications bound to <span style="font-family: book antiqua,palatino;">eth1 </span>are routed through the correct gateway of <span style="font-family: book antiqua,palatino;">192.168.1.0</span> network.</p>
<p>I found this hack here: <a href="http://www.physics.umd.edu/pnce/pcs-docs/Glue/linux-route-hack.html" target="_blank">http://www.physics.umd.edu/pnce/pcs-docs/Glue/linux-route-hack.html</a></p>
<p>Hope this help anybody.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bogdanirimia.ro/strange-routing-issue-solved/272/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Solaris more friendly</title>
		<link>http://www.bogdanirimia.ro/make-solaris-more-friendly/261</link>
		<comments>http://www.bogdanirimia.ro/make-solaris-more-friendly/261#comments</comments>
		<pubDate>Fri, 12 Feb 2010 11:57:35 +0000</pubDate>
		<dc:creator>Myself</dc:creator>
				<category><![CDATA[Server administration]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.bogdanirimia.ro/?p=261</guid>
		<description><![CDATA[Of course, most Solaris users are at an advanced level and those little nice things in a Linux console don&#8217;t matter that much. But I like to be more productive and enjoy using all the features I can get from a console. So here&#8217;s how I am customizing my Solaris console: 1. I am using [...]]]></description>
			<content:encoded><![CDATA[<p>Of course, most Solaris users are at an advanced level and those little nice things in a Linux console don&#8217;t matter that much. But I like to be more productive and enjoy using all the features I can get from a console. So here&#8217;s how I am customizing my Solaris console:</p>
<p>1. I am using <strong>bash </strong>- this brings most of the features I enjoy: auto-complete at TAB and previous commands list being the most important. To enable <em>bash</em> you have to edit the file &#8220;/etc/passwd&#8221; like this (note the path to the console at the end):</p>
<pre class="brush: bash; title: ; notranslate">username:x:100:100:NameOfUser:/homepath:/bin/bash</pre>
<p>2. I am making <strong>vim</strong> work &#8211; <em>vim </em>is my preferred editor on Unix. For that, I must install <em>vim </em>(using Blastwave) and put the path in the PATH variable. See number 3 for this. After making <em>vim </em>work, I am setting it to work as I like &#8211; like on a Linux console <img src='http://www.bogdanirimia.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . To do that, I am creating a file named .vimrc in my home folder with the following content:</p>
<pre class="brush: bash; title: ; notranslate">
set nocompatible &quot; must be the first line
:syntax enable
filetype on
filetype indent on
filetype plugin on
set laststatus=2
set statusline=%&lt;%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P
set backspace=2
</pre>
<p>3. I am configuring the console to set <em>vim </em>as the default editor, to set the PATH with everything I need, to set the pager with <em>more </em>and to configure the shell prompt. For this, I am creating a file name .profile (or edit if existing) with the following content:</p>
<pre class="brush: bash; title: ; notranslate">
export PATH=/usr/bin:/opt/csw/bin
export TERM=linux
export PAGER=more
export EDITOR=vim
export PS1='[\u@\h \w]\$ '
</pre>
<p>So&#8230; this is it! Now I have a much nicer console!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bogdanirimia.ro/make-solaris-more-friendly/261/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SSH with PuTTY through a proxy</title>
		<link>http://www.bogdanirimia.ro/ssh-with-putty-through-a-proxy/96</link>
		<comments>http://www.bogdanirimia.ro/ssh-with-putty-through-a-proxy/96#comments</comments>
		<pubDate>Fri, 18 Dec 2009 00:06:32 +0000</pubDate>
		<dc:creator>Myself</dc:creator>
				<category><![CDATA[Server administration]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[PuTTY]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.bogdanirimia.ro/?p=96</guid>
		<description><![CDATA[For security reasons, I had to set all my server&#8217;s firewalls to accept connections on the SSH port (22) only from my office IP. I would have added my home IP addres in the access list, if it would have been static. But at home I have a dynamic IP so I can&#8217;t use IP-based [...]]]></description>
			<content:encoded><![CDATA[<p>For security reasons, I had to set all my server&#8217;s firewalls to accept connections on the SSH port (22) only from my office IP. I would have added my home IP addres in the access list, if it would have been static. But at home I have a dynamic IP so I can&#8217;t use IP-based access control in this case. So the only thing I could do to admin my servers from home was to connect first to the office and then to connect, from there, on the server that had to be administered.</p>
<p>Today I set up a new way to connect to my servers from anywhere. I installed a proxy on the office server, and configured PuTTY to use it for the connections to the secured servers. The following are the steps to configure a Linux server (Ubuntu in my case) and PuTTY to make a SSH connection through a proxy:</p>
<p>1. Install mod_proxy and mod_proxy_connect for Apache, and enable them. In Ubuntu (mine is 8.04), these modules are already installed and all you need to do is to enable them:</p>
<pre class="brush: bash; title: ; notranslate">
# a2enmod proxy
# a2enmod proxy_connect
</pre>
<p>2. Configure the proxy by editing the &#8220;proxy.conf&#8221; file:</p>
<pre class="brush: bash; title: ; notranslate">
&lt;IfModule mod_proxy.c&gt;

    ProxyRequests On
    AllowCONNECT 22

    &lt;Proxy *&gt;
        AddDefaultCharset off
        Order deny,allow
        Allow from all
        AuthType Basic
        AuthName &quot;SSH Proxy&quot;
        AuthUserFile /path/to/password/file
        Require user myusername
    &lt;/Proxy&gt;
    ProxyVia Block
&lt;/IfModule&gt;
</pre>
<p>3. Restart Apache<br />
4. Configure PuTTY to use the proxy for the corresponding connections. For this, in the left tree, the &#8220;Proxy&#8221; submenu in the &#8220;Connection&#8221; menu must be used. There, select &#8220;HTTP&#8221; as Proxy type, then enter the hostname of your newly configured proxy, the username and password.</p>
<p style="text-align: left;"><img class="size-full wp-image-100 aligncenter" title="putty_proxy" src="http://www.bogdanirimia.ro/wp-content/uploads/2009/12/putty_proxy.jpg" alt="putty_proxy" width="466" height="448" />Now you should have a functioning proxied SSH connection! Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bogdanirimia.ro/ssh-with-putty-through-a-proxy/96/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

