Skip to contentSkip to conversation

Strange problem with iptables IP Masq

DISCUSSION Lior Hammer 3 participants 5 messages Sep 16, 2002

lore
Share & tools
lore
#1 lore raw
In reply to Lior Hammer
Quoted 11 lines · Lior Hammer

I'm using the IP Masq script from the IP masq howto from TLDP. The connection sharing is fine except for one thing:
in some of the sites (for example: http://httpd.apache.org or DynDNS.org members area) my browser keep's searching and searching without any result (or other response) or it just print few lines and that's it. I thought it's a problem with my browser, so i tryed to get the page directly with telnet.
i got the HTTP Headers, and the first lines, and that's it, it didn't disconnect or somthing, just waited.
Everything is ok when i'm trying to get this page directrly with lynx from the computer that shares the conection.

Are you connected via ADSL line using PPPoE ?

If so, you have to lower TCP MSS for forwarded packets down to 1452 (MTU 1492) to avoid problems when PMTU discovery is broken. This can be done directly on pppoed using -m switch :

	pppoe -I eth0 -T 80 -m 1452

Or this can be done using Netfilter mangle table :

	iptables -t mangle -A FORWARD -o ppp0 -p tcp --syn \
		-j TCPMSS --clamp-mss-to-pmtu

If not, forwarded hosts will export a 1460 TCP MSS (MTU 1500). Big replies will be to big and lost.

Signature · 4 lines
Cédric Blancher
Consultant en sécurité des systèmes et réseaux  - Cartel Sécurité
Tél: +33 (0)1 44 06 97 87 - Fax: +33 (0)1 44 06 97 99
PGP KeyID:157E98EE  FingerPrint:FA62226DA9E72FA8AECAA240008B480E157E98EE
#4 lore raw
In reply to Lior Hammer

I think that the problem should be in the DNS resolving not in the iptables rules.

NN

----- Original Message -----
From: "Lior Hammer" <[email protected]>
To: <[email protected]>
Sent: Tuesday, September 17, 2002 12:02 AM
Subject: Strange problem with iptables IP Masq

Quoted 17 lines

Hello,
I'm using the IP Masq script from the IP masq howto from TLDP. The connection sharing is fine except for one thing:
in some of the sites (for example: http://httpd.apache.org or DynDNS.org members area) my browser keep's searching and searching without any result (or other response) or it just print few lines and that's it. I thought it's a problem with my browser, so i tryed to get the page directly with telnet.
i got the HTTP Headers, and the first lines, and that's it, it didn't disconnect or somthing, just waited.
Everything is ok when i'm trying to get this page directrly with lynx from the computer that shares the conection.

Thank you very much for your help,
Lior.

#0 lore raw

Hello,
I'm using the IP Masq script from the IP masq howto from TLDP. The connection sharing is fine except for one thing:
in some of the sites (for example: http://httpd.apache.org or DynDNS.org members area) my browser keep's searching and searching without any result (or other response) or it just print few lines and that's it. I thought it's a problem with my browser, so i tryed to get the page directly with telnet.
i got the HTTP Headers, and the first lines, and that's it, it didn't disconnect or somthing, just waited.
Everything is ok when i'm trying to get this page directrly with lynx from the computer that shares the conection.

Thank you very much for your help,
Lior.

#2 lore raw
In reply to Cedric Blancher

Thank you very much, it's working!
I have a PPTP ADSL connection, but it's working now! Thank you,
Lior.
----- Original Message -----
From: "Cedric Blancher" <[email protected]>
To: "Lior Hammer" <[email protected]>
Cc: <[email protected]>
Sent: Monday, September 16, 2002 4:23 AM
Subject: Re: Strange problem with iptables IP Masq

Quoted 5 lines · Lior Hammer
Quoted 4 lines

I'm using the IP Masq script from the IP masq howto from TLDP. The connection sharing is fine except for one thing:
in some of the sites (for example: http://httpd.apache.org or DynDNS.org members area) my browser keep's searching and searching without any

result

Quoted 6 lines
Quoted 6 lines

(or other response) or it just print few lines and that's it. I thought it's a problem with my browser, so i tryed to get the page directly with telnet.
i got the HTTP Headers, and the first lines, and that's it, it didn't disconnect or somthing, just waited.
Everything is ok when i'm trying to get this page directrly with lynx

from

Quoted 24 lines
Quoted 1 line

the computer that shares the conection.

Are you connected via ADSL line using PPPoE ?

If so, you have to lower TCP MSS for forwarded packets down to 1452 (MTU 1492) to avoid problems when PMTU discovery is broken. This can be done directly on pppoed using -m switch :

pppoe -I eth0 -T 80 -m 1452

Or this can be done using Netfilter mangle table :

iptables -t mangle -A FORWARD -o ppp0 -p tcp --syn \
-j TCPMSS --clamp-mss-to-pmtu

If not, forwarded hosts will export a 1460 TCP MSS (MTU 1500). Big replies will be to big and lost.

--
Cédric Blancher
Consultant en sécurité des systèmes et réseaux - Cartel Sécurité Tél: +33 (0)1 44 06 97 87 - Fax: +33 (0)1 44 06 97 99
PGP KeyID:157E98EE FingerPrint:FA62226DA9E72FA8AECAA240008B480E157E98EE

#3 lore raw
In reply to Cedric Blancher

Thank you very much, it's working!
I have a PPTP ADSL connection, but it's working now! Thank you,
Lior.
----- Original Message -----
From: "Cedric Blancher" <[email protected]>
To: "Lior Hammer" <[email protected]>
Cc: <[email protected]>
Sent: Monday, September 16, 2002 4:23 AM
Subject: Re: Strange problem with iptables IP Masq

Quoted 5 lines · Lior Hammer
Quoted 4 lines

I'm using the IP Masq script from the IP masq howto from TLDP. The connection sharing is fine except for one thing:
in some of the sites (for example: http://httpd.apache.org or DynDNS.org members area) my browser keep's searching and searching without any

result

Quoted 6 lines
Quoted 6 lines

(or other response) or it just print few lines and that's it. I thought it's a problem with my browser, so i tryed to get the page directly with telnet.
i got the HTTP Headers, and the first lines, and that's it, it didn't disconnect or somthing, just waited.
Everything is ok when i'm trying to get this page directrly with lynx

from

Quoted 24 lines
Quoted 1 line

the computer that shares the conection.

Are you connected via ADSL line using PPPoE ?

If so, you have to lower TCP MSS for forwarded packets down to 1452 (MTU 1492) to avoid problems when PMTU discovery is broken. This can be done directly on pppoed using -m switch :

pppoe -I eth0 -T 80 -m 1452

Or this can be done using Netfilter mangle table :

iptables -t mangle -A FORWARD -o ppp0 -p tcp --syn \
-j TCPMSS --clamp-mss-to-pmtu

If not, forwarded hosts will export a 1460 TCP MSS (MTU 1500). Big replies will be to big and lost.

--
Cédric Blancher
Consultant en sécurité des systèmes et réseaux - Cartel Sécurité Tél: +33 (0)1 44 06 97 87 - Fax: +33 (0)1 44 06 97 99
PGP KeyID:157E98EE FingerPrint:FA62226DA9E72FA8AECAA240008B480E157E98EE