View previous topic :: View next topic |
Author |
Message |
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 2:01 pm Post subject: [SOLVED] Condivisione connessione Linux/Windows |
|
|
Ciao ragazzi,
mi sto picchiando con l'iptables ed il Masquerading...
Funziona tutto ma da client (sia windows che linux, ho provato con un livecd), pur settando
i DNS a quelli del mio ISP, non riesce a risolvermi i nomi. Se pingo l'ip di un sito qualunque
funge a meraviglia, ma non mi risolve gli URL.
La rete locale funzia correttamente, samba anche-pure, ma stì nomi a dominio non riesco a farglieli
risolvere, qualcuno ha avuto esperienze di questo tipo?
Chiedetemi pure output e file di configurazione vari, non preoccupatevi!
Last edited by gatiba on Tue Aug 16, 2005 6:07 pm; edited 1 time in total |
|
Back to top |
|
|
102376 l33t
Joined: 19 Mar 2005 Posts: 608
|
Posted: Tue Aug 16, 2005 2:30 pm Post subject: |
|
|
hai configurato il file /etc/hosts??
e posta i file di configuarazione della rete |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 2:48 pm Post subject: |
|
|
Ok evvia con la danza
Questi i file sull'host Linux, quello che possiede la connessione ADSL da condividere con l'altro pc:
Code: | sh-3.00$ cat /etc/hosts
127.0.0.1 localhost
192.168.0.1 localhost GABRIELE
192.168.0.2 SALVATORE
63.215.241.204 dynupdate.no-ip.com |
Code: | sh-3.00$ cat /etc/conf.d/net
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $
# Global config file for net.* rc-scripts
# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.1 broadcast 192.168.0.30 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
#iface_eth0="dhcp"
#dhcpcd_eth0="..."
# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"
# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"
# For setting the default gateway
#
#gateway="eth0/192.168.0.1" |
Code: | sh-3.00$ cat /etc/resolv.conf
nameserver 212.216.112.112
nameserver 212.216.172.62 |
Code: | sh-3.00$ cat /etc/hostname
GABRIELE |
Code: | GABRIELE gabriele # ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:8D:F7:8C:61
inet addr:192.168.0.1 Bcast:192.168.0.30 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1199 errors:0 dropped:0 overruns:0 frame:0
TX packets:768 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:114200 (111.5 Kb) TX bytes:86924 (84.8 Kb)
Interrupt:10 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:105923 errors:0 dropped:0 overruns:0 frame:0
TX packets:105923 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9858804 (9.4 Mb) TX bytes:9858804 (9.4 Mb)
ppp0 Link encap:Point-to-Point Protocol
inet addr:82.57.140.9 P-t-P:192.168.100.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:610292 errors:0 dropped:0 overruns:0 frame:0
TX packets:530803 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:133427626 (127.2 Mb) TX bytes:96017249 (91.5 Mb) |
Ti serve altro? |
|
Back to top |
|
|
102376 l33t
Joined: 19 Mar 2005 Posts: 608
|
Posted: Tue Aug 16, 2005 2:54 pm Post subject: |
|
|
no no perfetto !!!
sembra giusto non so come mai non risolva e su win come ha fatto ha settato tutto anche li?
l unica cosa è nel file hosts:
ma non penso sia un problema io ho setterei con
Code: |
127.0.0.1 localhost
192.168.0.1 <valore dell'HOSTNAME>.example.org <valore dell'HOSTNAME>
192.168.0.2 <valore dell'HOSTNAME>.example.org <valore dell'HOSTNAME>
63.215.241.204 dynupdate.no-ip.com
|
forse però sto dicendo una cazzata... |
|
Back to top |
|
|
earcar Guru
Joined: 20 Sep 2004 Posts: 425 Location: Bologna, Italy
|
Posted: Tue Aug 16, 2005 2:59 pm Post subject: |
|
|
Hai dnsmasq installato? _________________ Bip... bip... bip... -- Sputnik 1 |
|
Back to top |
|
|
ProT-0-TypE Veteran
Joined: 20 Dec 2003 Posts: 1624 Location: Cagliari
|
Posted: Tue Aug 16, 2005 3:11 pm Post subject: |
|
|
dnsmasq non è mica obbligatorio! piuttosto sei sicuro che effettivamente la rete funzioni (anche senza risolvere i dns) e che i client non stiano leggendo dalla cache? _________________ [Vuoi guadagnare navigando?] |
|
Back to top |
|
|
Giambo Tux's lil' helper
Joined: 20 Sep 2004 Posts: 129 Location: Switzerland
|
Posted: Tue Aug 16, 2005 3:19 pm Post subject: Re: Condivisione connessione Linux/Windows |
|
|
gatiba wrote: | Chiedetemi pure output e file di configurazione vari, non preoccupatevi! |
Io scommetto su "net.ipv4.ip_forward = 1" in "/etc/sysctl.conf" ! _________________ Giambo |
|
Back to top |
|
|
gutter Bodhisattva
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Tue Aug 16, 2005 3:26 pm Post subject: Re: Condivisione connessione Linux/Windows |
|
|
Giambo wrote: |
Io scommetto su "net.ipv4.ip_forward = 1" in "/etc/sysctl.conf" ! |
Punto 0,01 EUR _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
|
102376 l33t
Joined: 19 Mar 2005 Posts: 608
|
Posted: Tue Aug 16, 2005 3:33 pm Post subject: Re: Condivisione connessione Linux/Windows |
|
|
gutter wrote: | Giambo wrote: |
Io scommetto su "net.ipv4.ip_forward = 1" in "/etc/sysctl.conf" ! |
Punto 0,01 EUR |
rilancio di 10 EUR:P |
|
Back to top |
|
|
Ic3M4n Advocate
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Tue Aug 16, 2005 3:38 pm Post subject: |
|
|
chiederei ai moderatori di aggiungere nelle linee guida che il gioco d'azzardo è vietato nel forum, però vedo che sono loro a dare il cattivo esempio |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 4:09 pm Post subject: |
|
|
Ok ok vediamo un pò
In sysctl.conf non è settato l'ip_forward, ma l'ho settato a mano:
Code: | sh-3.00$ cat /proc/sys/net/ipv4/ip_forward
1 |
una prova di ping dall'host verso il client:
Code: | GABRIELE gabriele # ping salvatore
PING SALVATORE (192.168.0.2) 56(84) bytes of data.
64 bytes from SALVATORE (192.168.0.2): icmp_seq=1 ttl=128 time=2.56 ms
64 bytes from SALVATORE (192.168.0.2): icmp_seq=2 ttl=128 time=2.48 ms
64 bytes from SALVATORE (192.168.0.2): icmp_seq=3 ttl=128 time=2.42 ms
--- SALVATORE ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 2.423/2.489/2.563/0.070 ms |
anche il ping dal client verso l'host funzia.
Ripeto: posso addirittura navigare dal client, se uso gli ip dei siti invece degli URL, quindi sembra proprio
un problema di DNS!
Non ho dnsmasq installato sull'host...
Faccio ulteriori prove e vi faccio sapere, intanto se vi viene in mente qualcos'altro grazie! |
|
Back to top |
|
|
gamberetto Apprentice
Joined: 29 Mar 2005 Posts: 210 Location: Camisano Vicentino (VI)
|
Posted: Tue Aug 16, 2005 5:02 pm Post subject: |
|
|
gatiba wrote: | Non ho dnsmasq installato sull'host... |
non è proprio il modo di risolvere il problema, ma se ti serve la connessione puoi installare dnsmasq sul pc direttamente collegato a internet e usare come nameserver DNS il relativo IP.
Ho notato che da me c'è anche il file /etc/ppp/resolv.conf, ma non credo serva a qualcosa. _________________ Andre!
http://www.antimafiaduemila.com |
|
Back to top |
|
|
Giambo Tux's lil' helper
Joined: 20 Sep 2004 Posts: 129 Location: Switzerland
|
Posted: Tue Aug 16, 2005 5:16 pm Post subject: |
|
|
gatiba wrote: |
Ripeto: posso addirittura navigare dal client, se uso gli ip dei siti invece degli URL, quindi sembra proprio
un problema di DNS!
|
E' vero, l'hai scritto, mea culpa, non ho letto attentamente
Quindi sembrerebbe un problema di DNS ... Forse che non fai un formward/masq del traffico UDP ?
Io mi ero basato sul codice al punto 5.3 di http://www.gentoo.org/doc/en/home-router-howto.xml _________________ Giambo |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 5:51 pm Post subject: |
|
|
Giambo wrote: | gatiba wrote: |
Ripeto: posso addirittura navigare dal client, se uso gli ip dei siti invece degli URL, quindi sembra proprio
un problema di DNS!
|
E' vero, l'hai scritto, mea culpa, non ho letto attentamente
No problem
|
Premetto che uso firestarter come interfaccia al firewall, e tra le opzioni c'è quella per attivare l'ICS...
Adesso lo disattivo e provo con le regole iptables a mano... |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 5:57 pm Post subject: |
|
|
Ok: stoppando firestarter ed impostando le regole come da 'manuale' funzia, quindi
è sicuramente una regola mancante, probabilmente proprio quella dell'UDP, ora smanetto un pò... |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 6:07 pm Post subject: |
|
|
Sistemato: in firestarter devo settare l'opzione "Permissive by default, blacklist traffic"
Grazie a tutti e soprattutto a Giambo |
|
Back to top |
|
|
Giambo Tux's lil' helper
Joined: 20 Sep 2004 Posts: 129 Location: Switzerland
|
Posted: Tue Aug 16, 2005 6:39 pm Post subject: |
|
|
gatiba wrote: | Grazie a tutti e soprattutto a Giambo |
A che indirizzo devo spedire la fattura ?
Curiosita': Conosci FWBuilder ? Vorrei sapere se e' meglio/peggio di Firestarter ... _________________ Giambo |
|
Back to top |
|
|
gatiba Guru
Joined: 01 Sep 2002 Posts: 434
|
Posted: Tue Aug 16, 2005 7:08 pm Post subject: |
|
|
Non lo conoscevo, ma mi hai fatto venir voglia di provarlo |
|
Back to top |
|
|
102376 l33t
Joined: 19 Mar 2005 Posts: 608
|
Posted: Tue Aug 16, 2005 7:52 pm Post subject: |
|
|
io uso iptables come firewall e come interfaccia grafica Kmyfirewall....
secondo voi va bene, per ora io mi sono trovato bene
consigliate qualcosa altro?? |
|
Back to top |
|
|
Giambo Tux's lil' helper
Joined: 20 Sep 2004 Posts: 129 Location: Switzerland
|
Posted: Tue Aug 16, 2005 8:46 pm Post subject: |
|
|
zocram wrote: | io uso iptables come firewall e come interfaccia grafica Kmyfirewall....
secondo voi va bene, per ora io mi sono trovato bene
consigliate qualcosa altro?? |
Forse conviene aprire un nuovo thread.
Comunque solitamente ho fatto sempre tutto "a manina", poi pero' mi sono imbattuto in Astaro Linux (Distribuzione solo per FW) e in FWBuilder (GUI per iptables, ipchains, BSD, ...) e li ho trovati entrambi molto comodi.
Non si tratta di GUI del tipo "Scegli il livello di protezione: Basso - Medio - Alto", bensi' di vere e proprie GUI per chi sa' cosa sta' facendo. _________________ Giambo |
|
Back to top |
|
|
|