Live Support My forum, my way! Il forum dei newsgroup: Linux » [lungo] configurare un pc come router con pi
My forum, my way! Il forum dei newsgroup
Fast Uncompromising Discussions.Newsgroup FUDforum will get your users talking.

Loading
Utenti      F.A.Q.    Registrati    Login    Home
Home » Computer » Linux » [lungo] configurare un pc come router con pi
[lungo] configurare un pc come router con pi [messaggio #38520] mar, 10 maggio 2011 12:35 Messaggio successivo
news.eternal-septembe  è attualmente disconnesso news.eternal-septembe
Messaggi: 2
Registrato: maggio 2011
Junior Member
ciao a tutti :),

ho installato una debian 6 , con il pacchetto iproute2

ho 2 interfacce di rete nominate (/etc/udev/rules.d/70-persistant-net.rules)
ethlan (traffico interno)
ethwan ( traffico esterno)

ho abilitato ip forwarding permanente con

nano /etc/sysctl.conf
net.ipv4.ip_forward = 1

ho modificato il file /etc/iproute2/rt_tables aggiungendo alla fine le
seguenti tabelle

100 fastweb
110 tiscali1
120 tiscali2


questo perché dispongo di tre connessioni adsl
fastweb -> 2 mega ip del router 192.168.42.1
tiscali1 -> 10 mega ip del router 192.168.42.250
tiscali2 -> 24 mega ip del router 192.168.42.249


in /etc/network
ho impostato il file interfaces così

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

auto ethlan
iface ethlan inet static
address 192.168.100.70
netmask 255.255.255.0

auto ethwan
iface ethwan inet static
address 192.168.42.3
netmask 255.255.255.0



ed ho creato in /etc/network/if-up.d/
un file chiamato routing (impostato come eseguibile con chmod +x)

ip rule delete table tiscali1
ip rule delete table tiscali2
ip rule delete table fastweb

ip route add default via 192.168.42.250 table tiscali1
ip route add default via 192.168.42.1 table fastweb
ip route add default via 192.168.42.249 table tiscali2

ip route add 127.0.0.0/8 dev lo table tiscali1
ip route add 127.0.0.0/8 dev lo table fastweb
ip route add 127.0.0.0/8 dev lo table tiscali2


ip rule add from 192.168.100.98 table tiscali1 priority 100

ip rule add from 192.168.100.0/24 table fastweb priority 100

ip route add 192.168.100.0/24 dev ethlan table tiscali1
ip route add 192.168.100.0/24 dev ethlan table fastweb
ip route add 192.168.100.0/24 dev ethlan table tiscali2


route add default gw 192.168.42.1





nel file c'è una regola per un pc interno con ip 192.168.100.98
ma impostando sul pc il gateway come 192.168.100.70 non riesco a
navigare (il ping 192.168.100.70 viene eseguito senza errori, ping
8.8.8.8 mi da request time out)


ho anche riavviato :) :) :) :) :)! (sì provengo da windows :) )

ho anche eseguito manualmente il file routing ma niente

dove sbaglio??????


questo è l'output di alcuni comandi

ip rule show
0: from all lookup local
100: from 192.168.100.0/24 lookup fastweb2
100: from 192.168.100.0/24 lookup fastweb2
100: from 192.168.100.98 lookup tiscali10
100: from 192.168.100.0/24 lookup fastweb2
32766: from all lookup main
32767: from all lookup default


ip route show
192.168.100.0/24 dev ethlan proto kernel scope link src 192.168.100.70
192.168.42.0/24 dev ethwan proto kernel scope link src 192.168.42.3
default via 192.168.42.1 dev ethwan



ho visto che esiste anche un newsgroup debian ma mi è sembrato più
opportuno qua
visto che sono agli inizi, altrimenti se qui non va bene posto lì :)

grazie a tutti

ciao
Re: [lungo] configurare un pc come router con pi [messaggio #38521 è una risposta a message #38520] mar, 10 maggio 2011 12:41 Messaggio precedente
news.eternal-septembe  è attualmente disconnesso news.eternal-septembe
Messaggi: 2
Registrato: maggio 2011
Junior Member
questo è l'output di alcuni comandi

ip rule show
0: from all lookup local
100: from 192.168.100.0/24 lookup fastweb
100: from 192.168.100.0/24 lookup fastweb
100: from 192.168.100.98 lookup tiscali1
100: from 192.168.100.0/24 lookup fastweb
32766: from all lookup main
32767: from all lookup default


ip route show
192.168.100.0/24 dev ethlan proto kernel scope link src 192.168.100.70
192.168.42.0/24 dev ethwan proto kernel scope link src 192.168.42.3
default via 192.168.42.1 dev ethwan



sorry , questi sono gli output corretti
Argomento precedente:Ubuntu 11.04 Passare dall'intefaccia nuova alla precedente
Argomento successivo:ho frequentato 2 anni it.polica
Vai al forum:
  


Ora corrente: mar apr 30 23:10:20 CEST 2024

Tempo totale richiesto per generare la pagina: 0.00852 secondi
.:: Contatti :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Live Support