System: Linux firewall with IPTables and masquerading on Fedora Core 3 with iBurst Ethernet modem.
Problem: Web browsing is slow yet file downloading is fine most of the times.
I am sure most Linux administrators know about this but this message is for people like me that pulled their hair out for 5 hours
to fix a little problem with one single command.
I tested my modem on windows 2k to get it going. My next step was to implement it on Linux. I used Fedora Core 3 with the PPPoE. I implemented my firewall script that I use on Telkom ADSL firewall boxes. The script is a small firewall with ip masq for distribution. The Internet was up on my local network but some sites are just slow. I tested the modem again and concluded that it was my firewall box.
I used ping, traceroute and ethereal and they showed that now and again funny stuff happens. This was all due to the MTU and MSS that were not right. There are different methods to fix it but the method that works best form and the speed is 100%, was to add an iptables command.
COMMAND:
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
More information is available on the Linux IP MASQUARADE HOWTO section 7.15 MTU.
If the method of changing the MTU was used, the change needs to happen on every single PC. With the iptables, only the server is changed.
Problem: Web browsing is slow yet file downloading is fine most of the times.
I am sure most Linux administrators know about this but this message is for people like me that pulled their hair out for 5 hours
I tested my modem on windows 2k to get it going. My next step was to implement it on Linux. I used Fedora Core 3 with the PPPoE. I implemented my firewall script that I use on Telkom ADSL firewall boxes. The script is a small firewall with ip masq for distribution. The Internet was up on my local network but some sites are just slow. I tested the modem again and concluded that it was my firewall box.
I used ping, traceroute and ethereal and they showed that now and again funny stuff happens. This was all due to the MTU and MSS that were not right. There are different methods to fix it but the method that works best form and the speed is 100%, was to add an iptables command.
COMMAND:
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
More information is available on the Linux IP MASQUARADE HOWTO section 7.15 MTU.
If the method of changing the MTU was used, the change needs to happen on every single PC. With the iptables, only the server is changed.