Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ip_forwarding
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
leo
n00b
n00b


Joined: 25 Feb 2003
Posts: 70
Location: Milano - Italy

PostPosted: Thu Jul 10, 2003 8:44 pm    Post subject: ip_forwarding Reply with quote

Ho un problema con l'ip_forwarding: ho installato due schede di rete sul desktop e le ho configurate correttamente. Una è connessa a Fastweb con dhcp (eth1) e la seconda ha come indirizzo 192.168.0.1 (eth0), entrambe funzionano correttamente (almeno sembra).

Ho collegato un portatile con indirizzo 192.168.0.2 alla eth0: il collegamento funziona (ping 192.168.0.1 dal portatile funziona), ma non mi è possibile, dal portatile, raggiungere indirizzi esterni (ad esempio i DNS di Fastweb). Ho configurato il gateway del portatile a 192.168.0.1.

Ho abilitato l'ip_forwarding (echo 1 > /proc/sys/net/ipv4/ip_forward), ma il portatile non vede ancora nulla.

Ho dimenticato una qualche banalità o ho sbagliato tutto?

Grazie
Leo
Grazie
Back to top
View user's profile Send private message
shev
Bodhisattva
Bodhisattva


Joined: 03 Feb 2003
Posts: 4084
Location: Italy

PostPosted: Thu Jul 10, 2003 8:53 pm    Post subject: Re: ip_forwarding Reply with quote

leo wrote:

Ho dimenticato una qualche banalità o ho sbagliato tutto?


Allora, posta l'output di ifconfig e di route. Hai abilitato l'ip_forwarding sul desktop, giusto? Ma gli hai detto di fare anche il nat/pat? E' una semplice regoletta di iptables del tipo:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
Il resolv.conf è a posto?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30916
Location: here

PostPosted: Thu Jul 10, 2003 8:56 pm    Post subject: Reply with quote

Non sono sicuro ma per fare quello che vuoi fare devi impostare un NAT. Qui trovi come fare. Un'altra cosa poi anche farlo con una unica scheda di rete usando alias.basta che imposti in /etc/conf.d/net

Code:
iface_eth0="dhcp"
alias_eth0="192.168.0.1


Cosi' avrai due interfaccie con una scheda.
Back to top
View user's profile Send private message
leo
n00b
n00b


Joined: 25 Feb 2003
Posts: 70
Location: Milano - Italy

PostPosted: Thu Jul 10, 2003 8:59 pm    Post subject: Certo. Certo che sono pirla... Reply with quote

Ok, troppo abituato ad avere la regolina nello script di iptables. La macchina è nuova e magari iptables ha un set di regole un po' vuoto all'inizio...

Grazie!

Leo
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Fri Jul 11, 2003 6:01 am    Post subject: Reply with quote

Sicuramente, perche' quell'"echo" permette solo che il sistema POSSA far passare il traffico da una rete all'altra...
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum