Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ROUTING]perchè fa il routing a singhiozzo?[RISOLTO]
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
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4796
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Aug 01, 2004 11:58 am    Post subject: [ROUTING]perchè fa il routing a singhiozzo?[RISOLTO] Reply with quote

A casa mia metto in comunicazione il modem ethernet adsl il mio computer principale e il portatile per mezzo di un semplice switch.
Quando una macchina è connessa ad internet l'altra non può navigare, perché un'eventuale richiesta di connessione riceve un rifiuto non viene autenticata dal server remoto.

Allora ho provato a configurare un router elementare.
Sono molto nubbio e non ho ancora saputo andare oltre questo howto.

Il risultato, però, è stato solo parzialmente soddisfacente.
Adesso il portatile può pingare correttamente qualsiasi indirizzo remoto, attraverso il gateway dell'altro computer, ma la navigazione è posssibile solamente in alcuni casi.
Per esempio, goggle, o www.libero.it funzionano a meraviglia, mentre www.gentoo.org o www.microsoft.com non rispondono.
Se faccio un emerge, il mirror acquisisce la richiesta di invio dei dati e concede l'autorizzazione, ma il portatile non riceve un solo bit.

Mi sapreste aiutare a capire cosa succede, e a studiare le cose giuste per superare questo problema?
_________________
vu vu vu
gentù
mi piaci tu


Last edited by cloc3 on Sun Aug 01, 2004 1:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
ProT-0-TypE
Veteran
Veteran


Joined: 20 Dec 2003
Posts: 1624
Location: Cagliari

PostPosted: Sun Aug 01, 2004 12:47 pm    Post subject: Reply with quote

Forse hai il mio stesso problema.
Io ho un modem ethernet collegato al pc principale che faceva da router per il protatile. La navigazione dal server era possibile verso qualunque sito, ma dal portatile alcuni siti venivano aperti e altri no, anche se pingava tutto.

Leggi qui
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4796
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Aug 01, 2004 1:48 pm    Post subject: Reply with quote

Code:

 iptables -t filter -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1452

E adesso è perfetto. Grazie.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4796
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Aug 15, 2004 8:21 am    Post subject: Reply with quote

cloc3 wrote:
Code:

 iptables -t filter -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1452

E adesso è perfetto. Grazie.

Buonanotte. Adesso ho capito dove sbagliavo!

Infatti, è bastato provare la stessa cosa su una seconda installazione, per mostrare bene il nubbio che sono.

La sorpresa è stata quando finalmente ho capito di utlizzare due, e non una sola regola di routing, come appariva da un semplice "iptables -L".
Adesso che tutto funziona davvero, infatti, vedo:
Code:

gentoo-ppc cloc3 # iptables-save
# Generated by iptables-save v1.2.11 on Sun Aug 15 08:36:55 2004
*nat
:PREROUTING ACCEPT [2561:127957]
:POSTROUTING ACCEPT [120:7304]
:OUTPUT ACCEPT [81:4863]
-A POSTROUTING -s 172.16.200.0/255.255.255.0 -o ppp0 -j MASQUERADE
COMMIT
# Completed on Sun Aug 15 08:36:55 2004
# Generated by iptables-save v1.2.11 on Sun Aug 15 08:36:55 2004
*filter
:INPUT ACCEPT [162551:31438877]
:FORWARD ACCEPT [979:763236]
:OUTPUT ACCEPT [139125:7705130]
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1452
COMMIT
# Completed on Sun Aug 15 08:36:55 2004


Segue [MINITIP] per i prossimi 25 nubbi:

emerso iptables e ricompilato adeguatamenet il kernel:
Code:
gentoo-ppc cloc3 # iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
gentoo-ppc cloc3 # iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1452
gentoo-ppc cloc3 # /etc/init.d/iptables save
 * Saving iptables state...                                               [ ok ]
gentoo-ppc cloc3 # /etc/init.d/iptables start
 * Loading iptables state and starting firewall...
 * Restoring iptables ruleset                                             [ ok ]
gentoo-ppc cloc3 # echo "net.ipv4.ip_forward = 1">>/etc/sysctl.conf
gentoo-ppc cloc3 # echo 1>/proc/sys/net/ipv4/ip_forward

[/MINITIP]
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Pacy
n00b
n00b


Joined: 03 Aug 2004
Posts: 6
Location: Sangano

PostPosted: Fri Aug 27, 2004 7:56 pm    Post subject: Reply with quote

cloc3 wrote:

Code:

gentoo-ppc cloc3 # echo 1>/proc/sys/net/ipv4/ip_forward

Ripesco un vecchio post solo per correggere una cosa... l'1 deve essere staccato dal >, e' mezz'ora che bestemmio per far andare tutto e me l'hanno fatto notare su irc...
LHG, Gianluca
_________________
Poco incline al sorriso vivo schivo... detesto il giorno odio ogni individuo sono il grido muto di un fiore reciso... non so cos'e' che mi fa stare cosi' male quotidianamente mi vien voglia di sparare...<Mistonocivo - Shvrentz>
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