<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.slacky.eu/wikislack/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="it">
		<id>http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;feed=atom&amp;action=history</id>
		<title>Configurare un DHCP server - Cronologia</title>
		<link rel="self" type="application/atom+xml" href="http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;action=history"/>
		<updated>2013-05-26T00:30:00Z</updated>
		<subtitle>Cronologia della pagina su questo sito</subtitle>
		<generator>MediaWiki 1.20.3</generator>

	<entry>
		<id>http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;diff=1834&amp;oldid=prev</id>
		<title>Slacky il 16:14, 7 set 2006</title>
		<link rel="alternate" type="text/html" href="http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;diff=1834&amp;oldid=prev"/>
				<updated>2006-09-07T16:14:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Versione meno recente&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Versione delle 16:14, 7 set 2006&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;+&lt;/td&gt;
  &lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Networking]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Introduzione =&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Introduzione =&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Questo documento ha come scopo la realizzazione di un server dhcp basato sul sistema operativo Slackware Linux.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Questo documento ha come scopo la realizzazione di un server dhcp basato sul sistema operativo Slackware Linux.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 99:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 100:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;AUTORE: MDS - &amp;lt;doc.spock@gmail.com&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt; &lt;/td&gt;
  &lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;AUTORE: MDS - &amp;lt;doc.spock@gmail.com&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;−&lt;/td&gt;
  &lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;−&lt;/td&gt;
  &lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Copyright: &quot;Il presente documento è rilasciato sotto licenza GPL e può essere tranquillamente distribuito mediante qualsiasi mezzo e modificato previa citazione dell'autore.&quot;&quot;&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Slacky</name></author>	</entry>

	<entry>
		<id>http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;diff=1820&amp;oldid=prev</id>
		<title>Whites11 il 13:52, 7 set 2006</title>
		<link rel="alternate" type="text/html" href="http://www.slacky.eu/wikislack/index.php?title=Configurare_un_DHCP_server&amp;diff=1820&amp;oldid=prev"/>
				<updated>2006-09-07T13:52:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nuova pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduzione =&lt;br /&gt;
Questo documento ha come scopo la realizzazione di un server dhcp basato sul sistema operativo Slackware Linux.&lt;br /&gt;
Questa guida è stata realizzata su un sistema Slackware, ma con piccole differenze è facilmante adattabile a tutte le distribuzioni GNU/linux. &lt;br /&gt;
La configurazione hardware della lan consiste in un pc che fa da gateway verso internet, da server dhcp e firewall ed alcuni client.&lt;br /&gt;
= Topologia della rete =&lt;br /&gt;
Il computer server possiede ovviamente due schede di rete: eth0, che lo collega alla rete internet, ed eth1 che lo collega alla rete locale, contenente i seguenti indirizzi ip: 192.168.1.0/24 con pool 50-150.&lt;br /&gt;
Questa configurazione è integrabile con una VPN in ethernet bridging.... consulatate il relativo howto.&lt;br /&gt;
&lt;br /&gt;
= Configurazione del server dhcp =&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li value=1&amp;gt; Creare il file dhcp.leases (nel caso non esistesse):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;touch /var/state/dhcp/dhcpd.leases&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tale file serve per temporizzare il rilascio dell'ip associato al Mac-Address della scheda.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li value=2&amp;gt; Modificare il file /etc/dhcpd.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# dhcpd.conf &lt;br /&gt;
# &lt;br /&gt;
# Configuration file for ISC dhcpd (see 'man dhcpd.conf') &lt;br /&gt;
# &lt;br /&gt;
# &lt;br /&gt;
ddns-update-style ad-hoc; &lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 { &lt;br /&gt;
range 192.168.1.50 192.168.1.150; &lt;br /&gt;
default-lease-time 604800; # una settimana &lt;br /&gt;
max-lease-time 2592000; # 30 giorni &lt;br /&gt;
option subnet-mask 255.255.255.0; &lt;br /&gt;
option broadcast-address 192.168.1.255; &lt;br /&gt;
option routers 192.168.1.1; &lt;br /&gt;
option domain-name-servers 213.156.54.80; &lt;br /&gt;
option domain-name &amp;quot;fastwebnet.it&amp;quot;; &lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li value=3&amp;gt; Modificare il file /etc/resolv.conf per settare il [http://it.wikipedia.org/wiki/DNS DNS]: questo serve per consentire un corretto accesso a internet da parte della rete lan (io ho fastweb quindi scrivo nella seguente maniera):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;nameserver 213.156.54.80 &lt;br /&gt;
nameserver 213.156.54.81 &lt;br /&gt;
search fastwebnet.it &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li value=4&amp;gt;&lt;br /&gt;
Dare un Ip statico al Gateway, alzare il Firewall e attivare il server dhcp. Io lo faccio con uno script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/bash &lt;br /&gt;
&lt;br /&gt;
IP=MIO IP &lt;br /&gt;
INT_RETE_ESTERNA=eth0 &lt;br /&gt;
INT_RETE_INTERNA=eth1 &lt;br /&gt;
IP_ACCETTA1=MACCHINA ESTERNA TRUSTED 1 #(Amici lontani) &lt;br /&gt;
IP_ACCETTA2=MACCHINA ESTERNA TRUSTED 2 #(Amici lontani) &lt;br /&gt;
LANIN=192.168.1.0/24 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
################# SEZIONE GATEWAY ####################### &lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward &lt;br /&gt;
iptables -t nat -A POSTROUTING -o $INT_RETE_ESTERNA -j MASQUERADE &lt;br /&gt;
ifconfig $INT_RETE_INTERNA 192.168.1.1 netmask 255.255.255.0 up &lt;br /&gt;
dhcpd $INT_RETE_INTERNA &lt;br /&gt;
&lt;br /&gt;
################ SEZIONE FIREWALL FILTRANTE ############# &lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/tcp_syncookies #contro il syn flood &lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/conf/all/rp_filter #contro Ip spoofing &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
iptables -F &lt;br /&gt;
iptables -P INPUT DROP &lt;br /&gt;
iptables -P OUTPUT ACCEPT &lt;br /&gt;
iptables -P FORWARD DROP &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#SEZIONE INPUT &lt;br /&gt;
&lt;br /&gt;
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -i lo -j ACCEPT &lt;br /&gt;
iptables -A INPUT -p all -s $IP_ACCETTA1 -j ACCEPT &lt;br /&gt;
iptables -A INPUT -p all -s $IP_ACCETTA2 -j ACCEPT &lt;br /&gt;
iptables -A INPUT -i $INT_RETE_INTERNA -j ACCEPT &lt;br /&gt;
iptables -A INPUT -i $INT_RETE_ESTERNA -p all -m state --state ESTABLISHED,RELATED -j ACCEPT &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#SEZIONE FORWARD PER LA LAN &lt;br /&gt;
&lt;br /&gt;
iptables -A FORWARD -i $INT_RETE_INTERNA -p all -s $LANIN -d $LANIN -j ACCEPT &lt;br /&gt;
iptables -A FORWARD -s $LANIN -d 0/0 -j ACCEPT &lt;br /&gt;
iptables -A FORWARD -s 0/0 -d $LANIN -p tcp --syn -j DROP &lt;br /&gt;
iptables -A FORWARD -s 0/0 -d $LANIN -j ACCEPT &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ovviamente questa è una possibile configurazione, fatta a mio gusto. Soprattutto la parte riguardante il firewall filtrante è fortemente personalizzabile, qui è stato solo riportato un esempio. &lt;br /&gt;
&lt;br /&gt;
Se notate errori nella guida vi prego di segnalarmeli in pubblico o in privato. &lt;br /&gt;
Ovviamente garanzia: NO WARRANTY.... non mi riterrò responsabile per qualsiasi accadimento collegato a questo howto. Usate queste informazioni a vostro rischio e pericolo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AUTORE: MDS - &amp;lt;doc.spock@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copyright: &amp;quot;Il presente documento è rilasciato sotto licenza GPL e può essere tranquillamente distribuito mediante qualsiasi mezzo e modificato previa citazione dell'autore.&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Whites11</name></author>	</entry>

	</feed>