<?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>fabiolagana.net &#187; ip</title>
	<atom:link href="http://blog.fabiolagana.net/tag/ip/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabiolagana.net</link>
	<description>640 Kb should be enough memory for anybody</description>
	<lastBuildDate>Mon, 26 Oct 2009 13:17:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Eseguire il backup delle directory di un server</title>
		<link>http://blog.fabiolagana.net/eseguire-backup-directory-server/</link>
		<comments>http://blog.fabiolagana.net/eseguire-backup-directory-server/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:01:22 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=129</guid>
		<description><![CDATA[nome script: /usr/local/sbin/backup_dir.sh

descrizione: Con questo script viene fatto il backup delle directory importanti server

Inserendo una riga simile nel cron scheduliamo il backup tutte le notti]]></description>
			<content:encoded><![CDATA[<div style="padding:5px 0 5px 0; text-align:right; float:right;"><script type="text/javascript"><!--
google_ad_client = "pub-3446917171019162";
/* link_26082009_01_post */
google_ad_slot = "4038103458";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />&nbsp;<font size="1">Powered by <a style="color:#0000ff;font-family:Arial,Helvetica,sans-serif" href="http://www.maxblogpress.com/go.php?offer=niceart&pid=12" target="_blank" onmouseover="self.status='MaxBlogPress.com';return true;" onmouseout="self.status=''" onclick="pageTracker._trackPageview('/outgoing/www.maxblogpress.com/go.php?offer=niceart_pid=12&amp;referer=');">Max Banner Ads</a></font>&nbsp;</div><p>nome script: /usr/local/sbin/backup_dir.sh</p>
<p>descrizione: Con questo script viene fatto il backup delle directory importanti  server</p>
<p>Inserendo una riga simile nel cron scheduliamo il backup tutte le notti</p>
<pre id="area">cat /etc/cron.d/backup
MAILTO="postmaster@yourdomain.com"
00 21 * * * root test -x /usr/local/sbin/backup_dir.sh &#038;&#038; /usr/local/sbin/backup_dir.sh</pre>

<div class="wp_codebox"><table><tr id="p1291"><td class="code" id="p129code1"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># backup_dir.sh</span>
<span style="color: #666666; font-style: italic;"># Con questo script viene fatto il backup delle directory importanti  server</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">hosts_internal</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> your_host <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> host <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${hosts_internal[@]}</span>
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Download of /etc/ /usr/local/sbin/ /root/ /home/ directory from &quot;</span><span style="color: #007800;">$host</span><span style="color: #ff0000;">&quot; &quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Starting ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #666666; font-style: italic;"># bakup file for hosts</span>
  <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zcvf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span> ;
  <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span>;
  <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Stopping ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/eseguire-backup-directory-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add and Remove ip alias into OpenBSD System</title>
		<link>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/</link>
		<comments>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 08:26:42 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[remove]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=111</guid>
		<description><![CDATA[
Set an IP Alias
To put a second IP address to the same interface, just enter on the commandline as root:
 OpenBSD# ifconfig re0 inet alias 192.168.10.199 netmask 255.255.255.0
This sets an IP address 192.168.10.199 to vr0. Check again with ifconfig:
 OpenBSD# ifconfig -A
 lo0: flags=8049 mtu 33208
         groups: [...]]]></description>
			<content:encoded><![CDATA[<p><a name="D02"></a></p>
<h2><a name="D02">Set an IP Alias</a></h2>
<p>To put a second IP address to the same interface, just enter on the commandline as root:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig re0 inet alias 192.168.10.199 netmask 255.255.255.0</strong></pre>
<p>This sets an IP address <strong>192.168.10.199</strong> to <tt>vr0</tt>. Check again with ifconfig:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig -A</strong>
 lo0: flags=8049 mtu 33208
         groups: lo
         inet 127.0.0.1 netmask 0xff000000
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
 re0: flags=8843 mtu 1500
         lladdr 00:40:45:28:89:37
         groups: egress
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet <strong>192.168.1.199</strong> netmask 0xffffff00 broadcast 192.168.1.255
         inet6 fe80::240:45ff:fe28:8937%vr0 prefixlen 64 scopeid 0x2
         inet <strong>192.168.10.199</strong> netmask 0xffffff00 broadcast 192.168.100.255</pre>
<p>Now we see two IP addresses on <tt>vr0</tt>. If you want to set an IP address within the same network you would have to set a fake netmask of <strong>255.255.255.255</strong>.<a name="C03"> </a><a name="D03"></a></p>
<h2><a name="D03">Make the IP Alias Permanent</a></h2>
<p>If you use <tt>ifconfig</tt> to set an IP alias, the alias won&#8217;t be present after the next reboot. To make the setting permanent, add a line to <tt>/etc/hostname.<em>&lt;INTERFACE&gt;</em></tt>:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>vi /etc/hostname.vr0</strong>
 inet 192.168.1.199 255.255.255.0 NONE
         <strong>inet alias 192.168.10.199 255.255.255.0</strong></pre>
<p><a name="C04"></a></p>
<h2><a name="C04">Remove an IP Alias</a></h2>
<p>You can remove an IP alias with a comand like this:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig re0 192.168.10.199 delete</strong></pre>
<p>This deletes the second IP address from the interface keeping the first.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->