Skip to contentSkip to conversation

Major NAT Problem

DISCUSSION Ted Erickson 7 participants 7 messages Feb 6, 2004 – Feb 13, 2004

lore
Share & tools
lore
#0 lore raw

I am somewhat new to IPTables but not to linux. I have a major problem. Some background first... I have a PPoA SDSL connection with Qwest running at 640k/up/down. I have a static block of 8 addresses.....I have a connection from the DSL modem to eth0 on my Redhat 9.0 box and I have my local network pluged into eth1. The only thing running on the linux box is IPTables nothing else. I turned on echo 1 > /proc/sys/net/ipv4/ip_forward and enabled MASQ in several different ways..... no problem. I can surf the internet just fine on my local network machine but I have ONE BIG PROBLEM!!!
I can't view a handfull of websites. If I take the linux box out of the
picture and throw a cheap Linksys Router on the same DSL connection I can see all the web sites i want. IPTables is blocking something but I don't know what? I can't find any info on the web with this problem. I need to fix this ASAP or I will have to go with something else, but I want to stay with linux.

theo

_________________________________________________________________
Get some great ideas here for your sweetheart on Valentine's Day - and beyond. http://special.msn.com/network/celebrateromance.armx

#1 lore raw
Quoted 6 lines · Ted Erickson

I am somewhat new to IPTables but not to linux. I have a major problem. Some background first... I have a PPoA SDSL connection with Qwest running at 640k/up/down. I have a static block of 8 addresses.....I have a connection from the DSL modem to eth0 on my Redhat 9.0 box and I have my local network pluged into eth1. The only thing running on the linux box is IPTables nothing else. I turned on echo 1 > /proc/sys/net/ipv4/ip_forward

Quoted 8 lines

and enabled MASQ in several different ways..... no problem. I can surf the internet just fine on my local network machine but I have ONE BIG PROBLEM!!! I can't view a handfull of websites. If I take the linux box out of the picture and throw a cheap Linksys Router on the same DSL connection I can see all the web sites i want. IPTables is blocking something but I don't know what? I can't find any info on the web with this problem. I need to fix this ASAP or I will have to go with something else, but I want to stay with linux.

Try adding the rule:

iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
-j TCPMSS --clamp-mss-to-pmtu

-Tom

Signature · 3 lines
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ [email protected]
#2 lore raw
In reply to Ted Erickson
Quoted 5 lines · Ted Erickson

I can surf the
internet just fine on my local network machine but I have ONE BIG PROBLEM!!! I can't view a handfull of websites. If I take the linux box out of the picture and throw a cheap Linksys Router on the same DSL connection I can see all the web sites i want.

Investigate "clamp MTSS to MTU", discussed many times in the past on this mailing list.

Antony.

Signature · 7 lines
Perfection in design is achieved not when there is nothing left to add, but 
rather when there is nothing left to take away.

 - Antoine de Saint-Exupery

                                                     Please reply to the list;
                                                           please don't CC me.
#3 lore raw
In reply to Ted Erickson

This is a mtu problem

linksys for sure is announcing a tcpmss adjust at 1450 bytes or less.

You have 2 options

1- disable pmtud in the lan boxes and decrease the mtu (begin with 1490 and no more of 1400) and test it.
2- make linux to announce an mss of 1450 (commonly mtu-20)

(let me know if you need the theory applied to it)

pmutd send packets with DF=1 and expects icmp messages anouncing to reduce the mtu, then pmtud drecreases the mtu over and over again (always with df=1) until the icmp announce dont arrive anymore. Then assumes that this is the correct mtu and send all packets with this mtu.

If you can generate this mss icmp packets, its enough and it will work ok, if you dont, you must decrease the mtu of lan interfaces (all of them)

hope it helps

----- Original Message -----
From: "Ted Erickson" <[email protected]>
To: <[email protected]>
Sent: Thursday, February 05, 2004 11:54 PM
Subject: Major NAT Problem

Quoted 2 lines

I am somewhat new to IPTables but not to linux. I have a major problem. Some background first... I have a PPoA SDSL connection with Qwest running

at

Quoted 1 line

640k/up/down. I have a static block of 8 addresses.....I have a

connection

Quoted 1 line

from the DSL modem to eth0 on my Redhat 9.0 box and I have my local

network

Quoted 4 lines

pluged into eth1. The only thing running on the linux box is IPTables nothing else. I turned on echo 1 > /proc/sys/net/ipv4/ip_forward and enabled MASQ in several different ways..... no problem. I can surf the internet just fine on my local network machine but I have ONE BIG

PROBLEM!!!

Quoted 15 lines

I can't view a handfull of websites. If I take the linux box out of the
picture and throw a cheap Linksys Router on the same DSL connection I can see all the web sites i want. IPTables is blocking something but I don't know what? I can't find any info on the web with this problem. I need to fix this ASAP or I will have to go with something else, but I want to stay with linux.

theo

_________________________________________________________________
Get some great ideas here for your sweetheart on Valentine's Day - and beyond. http://special.msn.com/network/celebrateromance.armx

#4 lore raw
Quoted 16 lines

From: "Ted Erickson" <[email protected]>
To: <[email protected]>
Sent: Thursday, February 05, 2004 11:54 PM
Subject: Major NAT Problem

Quoted 2 lines

I am somewhat new to IPTables but not to linux. I have a major problem. Some background first... I have a PPoA SDSL connection with Qwest running

at

Quoted 1 line

640k/up/down. I have a static block of 8 addresses.....I have a

connection

Quoted 1 line

from the DSL modem to eth0 on my Redhat 9.0 box and I have my local

Quoted 18 lines

network

Quoted 4 lines

pluged into eth1. The only thing running on the linux box is IPTables nothing else. I turned on echo 1 > /proc/sys/net/ipv4/ip_forward and enabled MASQ in several different ways..... no problem. I can surf the internet just fine on my local network machine but I have ONE BIG

PROBLEM!!!

Quoted 9 lines

I can't view a handfull of websites. If I take the linux box out of
the picture and throw a cheap Linksys Router on the same DSL connection I can see all the web sites i want. IPTables is blocking something but I don't know what? I can't find any info on the web with this problem. I need to fix this ASAP or I will have to go with something else, but I want to stay with linux.

theo

This could convievably also be TCP ECN active on the linux box ... it has been known to cause problesms with certain firewall configurations. Although TCP ECN is a wonderful concept the standard has yet to completely catch on and can cause problems .. you might try

echo "0" > /proc/sys/net/ipv4/tcp_ecn
which will turn it off ... (i rebuilt my second kernel with tcp_ecn on, since it sounded like such a wonderful idea ... had to turn if off when the other half couldn't get to two of her fav websites.)

Alistair

#5 lore raw
In reply to Alexis
Quoted 7 lines

You have 2 options

1- disable pmtud in the lan boxes and decrease the mtu (begin with 1490 and no more of 1400) and test it.
2- make linux to announce an mss of 1450 (commonly mtu-20)

(let me know if you need the theory applied to it)

I'm very interested in the details. Is there any documentation that explains why this is so?

Thank you!

-- Alexander Konovalenko

#6 lore raw
In reply to Ted Erickson

Ted - This sounds like a case of ICMP type 3 code 0 packets being dropped by your ISP. Some web sites are working for you because the packets are getting there, and the server's return packets are getting back to you just fine. The sites that appear to be "hanging" are probably due to the DF packets being dropped because either a reduced MTU or fragmentation is needed. However, if the ICMP Path MTU messages are being dropped, your system is not aware of this. Add this rule to your script and see if your problem corrects itself:

$IPT -t filter -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ted Erickson
Sent: Thursday, February 05, 2004 6:55 PM
To: [email protected]
Subject: Major NAT Problem

I am somewhat new to IPTables but not to linux. I have a major problem. Some background first... I have a PPoA SDSL connection with Qwest running at 640k/up/down. I have a static block of 8 addresses.....I have a connection from the DSL modem to eth0 on my Redhat 9.0 box and I have my local network pluged into eth1. The only thing running on the linux box is IPTables nothing else. I turned on echo 1 > /proc/sys/net/ipv4/ip_forward and enabled MASQ in several different ways..... no problem. I can surf the internet just fine on my local network machine but I have ONE BIG PROBLEM!!!

I can't view a handfull of websites. If I take the linux box out of the
picture and throw a cheap Linksys Router on the same DSL connection I can see all the web sites i want. IPTables is blocking something but I don't know what? I can't find any info on the web with this problem. I need to fix this ASAP or I will have to go with something else, but I want to stay with linux.

theo

_________________________________________________________________
Get some great ideas here for your sweetheart on Valentine's Day - and beyond. http://special.msn.com/network/celebrateromance.armx