Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rete tra due computer + internet
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
necronudist
n00b
n00b


Joined: 29 Sep 2005
Posts: 3

PostPosted: Thu Sep 29, 2005 10:58 pm    Post subject: rete tra due computer + internet Reply with quote

salve,
premetto che non uso gentoo, ma trovo questo forum pieno di gente competente e quindi per problemi generali mi rivolgerò a voi ugualmente (se mi è permesso).

ho un desktop e un portatile e mi è venuta l'idea per evitare di dover installare il modem sul portatile di metterli in rete tra loro così da usare internet tramite il desktop.

ho seguito questa procedura (ho la bella abitudine di segnarmi i passi che faccio...):

1. SERVER (Desktop, eth0=192.168.0.1)
MODIFICHE TEMPORANEE
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

MODIFICHE PERMANENTI
- /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
- /etc/network/options:
ip_forward=yes.
**non ho ancora capito come far eseguire all'avvio il comando di iptables automaticamente**

2. CLIENT (Laptop, eth0=192.168.0.2)
MODIFICHE TEMPORANEE
ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up
route add default gw 192.168.0.1

MODIFICHE PERMANENTI
- /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

Ho inoltre copiato /etc/resolv.conf del server sul client.


RISULTATO: sul server tutto ok, il client pinga gli ip ma non gli url e quindi la navigazione con un browser è impossibile.
suggerimenti? cosa ho sbagliato/omesso?
Back to top
View user's profile Send private message
ProT-0-TypE
Veteran
Veteran


Joined: 20 Dec 2003
Posts: 1624
Location: Cagliari

PostPosted: Thu Sep 29, 2005 11:48 pm    Post subject: Reply with quote

Ma che distro usi? Non esistono forum per quella distro?

Cmq se fai un search trovi migliaia di post su questo argomento
_________________
[Vuoi guadagnare navigando?]
Back to top
View user's profile Send private message
necronudist
n00b
n00b


Joined: 29 Sep 2005
Posts: 3

PostPosted: Thu Sep 29, 2005 11:49 pm    Post subject: Reply with quote

ho già cercato e non è uscito niente di interessante...

per quanto riguarda l'ot, non sto chiedendo cose di ubuntu o mandracchia, sto chiedendo cose riguardanti linux, ovvero ANCHE di gentoo (se proprio non ti riesce di leggerla in questo modo puoi provare con: questa cosa potrebbe benissimo interessare un utente gentoo e potrebbe usare la stessa procedura che mi verrà, spero, consigliata)
Back to top
View user's profile Send private message
ProT-0-TypE
Veteran
Veteran


Joined: 20 Dec 2003
Posts: 1624
Location: Cagliari

PostPosted: Thu Sep 29, 2005 11:53 pm    Post subject: Reply with quote

beh, allora evita di specificare che non usi gentoo, così il topic non verrà chiuso

tanto per cominciare in gentoo /etc/network/interfaces non esiste.

cmq prima di tutto prova a vedere se usando gli ip riesci a navigare
_________________
[Vuoi guadagnare navigando?]
Back to top
View user's profile Send private message
necronudist
n00b
n00b


Joined: 29 Sep 2005
Posts: 3

PostPosted: Thu Sep 29, 2005 11:54 pm    Post subject: Reply with quote

ProT-0-TypE wrote:
beh, allora evita di specificare che non usi gentoo, così il topic non verrà chiuso

tanto per cominciare in gentoo /etc/network/interfaces non esiste.

cmq prima di tutto prova a vedere se usando gli ip riesci a navigare


beh ci sarà qualcosa di analogo... e comunque questo forum me l'ha consigliato proprio un utente gentoo...
a saperlo prima!
grazie lo stesso va. mo mi cancello
Back to top
View user's profile Send private message
ProT-0-TypE
Veteran
Veteran


Joined: 20 Dec 2003
Posts: 1624
Location: Cagliari

PostPosted: Thu Sep 29, 2005 11:58 pm    Post subject: Reply with quote

in questi casi basta usare un po il cervello ed evitare di dire che non si usa Gentoo...

cmq l'equivalente è /etc/conf.d/net
_________________
[Vuoi guadagnare navigando?]
Back to top
View user's profile Send private message
knefas
l33t
l33t


Joined: 21 Dec 2003
Posts: 828

PostPosted: Fri Sep 30, 2005 5:46 am    Post subject: Reply with quote

Code:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! ppp0  -j ACCEPT
iptables -P INPUT DROP


forse ci vogliono pure queste righe di iptables, questo e' interessante

(se questo forum risolvera' il tuo problema prima che qualcuno giustamente chiuda il topic sei obbligato a passare a gentoo.... ;))
Back to top
View user's profile Send private message
neryo
Veteran
Veteran


Joined: 09 Oct 2004
Posts: 1292
Location: Ferrara, Italy, Europe

PostPosted: Fri Sep 30, 2005 6:40 am    Post subject: Reply with quote

Code:
iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT
iptables -A FORWARD -d 192.168.0.0/24 -j ACCEPT
iptables -A FORWARD -j DROP


aggiungi sotto lo script del masquerading questo.. :wink: e controlla che la risoluzioni dei nomi funzioni tipo usa nslookup o dig :roll:
_________________
cache: a safe place for hiding or storing things..

D-link DWL-G650 AirPlus
Apache Php Mysql
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Fri Sep 30, 2005 10:17 pm    Post subject: Reply with quote

ProT-0-TypE wrote:
in questi casi basta usare un po il cervello ed evitare di dire che non si usa Gentoo...


Altre volte invece occorrerebbe usare il cervello per evitare di scrivere certe frasi.

Comunque la discussione termina qui,
_________________
Ciao da me!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    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