<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi all<br><br>Further to this issue I can download a big file on the firewall box, no problem, and then I can download the same file from the firewall box using scp and ftp again no problem. <br><br>In order to rule out the firewall hardware issue totally, i did set up another box with the same iptables code and I see the same behaviour, the client unable to download large files. The browsing works fine though. The big file download stops abruptly after downloading few MBs of data. <br><br>I have also tried to use another firewall (non iptables based) on the same connection and it works fine, hence I think its not an isp or a provider issue. Can iptables or the kernel be the culprit here? May be some packets are being sent out that instruct the source site to stop packet transfer. As say this because I ran tcpdump on the firewall and saw that after a few packets there are no data packets passing between the client and the server. <br><br>To test I have used 3 browsers, IE, firefox, chrome and also used wget on another linux terminal in my LAN. <br><br>I am very confused about this behaviour. How should I go towards a solution, please advise.<br><br>thanks<br><br>Hass.<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: hrb_14@hotmail.com<br>To: ubuntu-users@lists.ubuntu.com<br>Subject: RE: IPTables issue<br>Date: Thu, 15 Mar 2012 10:42:42 +0000<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>
<div dir="ltr">
Dear all<br><br>Thank you so much for your replies. I have done some tests and here is an update on them:<br><br>1. This behaviour is present on all windows and linux machines on the network.<br>2. Yes there is a windows anti virus on the windows pc. I have tried the download in both conditions ie anti virus enabled and anti virus disabled, no joy. The linux machine I used in the test has no anti virus.<br>3. There is no antivirus on the ubuntu firewall box.<br>4. Yes I have tried to download a file from the firewall box to the lan box using scp. It downloads fine.<br>5. I tried to download files over the internet over http, https and ftp, all have the same problem.<br>6. The building management has explained to me that the bandwidth router is just a bandwidth modulator that is being used to give us 8 Mbps connection. It doesnt do any NAT or anything funny. So my firewall has an external IP. Additionally this setup was working till last week (March 7) and all of a sudden it has stopped.<br>7. I dont think swapping the network card and patch cord in the UBuntu box will do much as my firewall can download files well over the internet successfully and a lan box can in turn download the file from the firewall successfully. That tells me that network card ports are OK. I even tried putting an ubuntu VM on another network, via a different network card port on the firewall and still the same behaviour.<br>8. I observed something I have never seen before. I dont see any packets being dropped on the firewall eth5 port in iptables log. I did tcp dump and observed the same phenomena. It appears to me that all of a sudden data packets stop coming into the network and as a result the download is rarely reset and the speed goes undefined as below. Mostly I think it keeps on waiting for more data but it never comes through. This is what I see on the console<br><br>user@ophelia:~$ wget --no-cache http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz<br>--2012-03-15 10:27:08--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz<br>Resolving download.oracle.com... 92.122.127.242, 92.122.126.241<br>Connecting to download.oracle.com|92.122.127.242|:80... connected.<br>HTTP request sent, awaiting response... 200 OK<br>Length: 81056556 (77M) [application/x-gzip]<br>Saving to: `jdk-7u3-linux-x64.tar.gz'<br><br> 2% [===>                                                                                                                                                                  ] 2,426,571   --.-K/s  eta 10m 0s<br><br>On chrome it says Interrupted.<br><br>9. I think its an issue with the NAT or may be the bandwidth router. NAT because its the only difference between a download happening on the firewall box and the download on a client. May be the ISP is doing deep packet inspection and disallowing NAT but then why allow 2% of the download to complete. Bandwidth router may be because once the download starts and it tries to take the full bandwidth, the router modulates it and crops all the packets hence I see no packets on the firewall. But I can only make assumptions at this point in time.<br><br>Please let me know your thoughts on this and once again thanks for your reply.<br><br>Hassnain.<br><br><br><br><br><div><div id="ecxSkyDrivePlaceholder"></div>> Date: Wed, 14 Mar 2012 17:10:34 -0400<br>> From: wayward4now@gmail.com<br>> To: ubuntu-users@lists.ubuntu.com<br>> Subject: Re: IPTables issue<br>> <br>> On 03/14/2012 05:02 PM, Rashkae wrote:<br>> > On 03/14/2012 03:58 PM, Hassnain Badami wrote:<br>> >> Dear all<br>> >> I am learning IPTables and have been given a problem on our network to<br>> >> diagnose and solve.<br>> >> Our network infrastructure contains an internet provider line from<br>> >> Colt that feeds into a bandwidth router (provided by our building<br>> >> management) and then Ubuntu 10.04 box running iptables. This firewall<br>> >> is then connected to a switch and we run a local area network of<br>> >> around 20 computers (both Linux and windows).<br>> >> Our firewall has a certain set of rules enabled. When I try to<br>> >> download a file on the firewall itself everything seems fine. But when<br>> >> I try to download the same file from a windows box behind the<br>> >> firewall, it starts well, downloads upto 5 MB, but then interrupts or<br>> >> enormously slows down.<br>> >> To solve this problem I wrote a small script, first to clean my<br>> >> iptables rules and then to create a few rules that only allow basic<br>> >> configuration. The first script is<br>> >> Code:echo "Stopping firewall and allowing everyone..."iptables<br>> >> -Fiptables -Xiptables -t nat -Fiptables -t nat -Xiptables -t mangle<br>> >> -Fiptables -t mangle -Xiptables -P INPUT ACCEPTiptables -P FORWARD<br>> >> ACCEPTiptables -P OUTPUT ACCEPT<br>> >> The second script only allows for basic rules to be setup and is as<br>> >> follows (eth0 is lan and eth5 is WAN)<br>> >> Code:iptables -A FORWARD -i eth0 -o eth5 -j ACCEPTiptables -t nat -A<br>> >> POSTROUTING -o eth5 -j MASQUERADEiptables -A FORWARD -i eth5 -o eth0<br>> >> -m state --state RELATED,ESTABLISHED -j ACCEPT<br>> >> Using the 2nd script I can browse fine, but any downloads on the lan<br>> >> box again slow down or interrupt.<br>> >><br>> ><br>> > An interesting puzzle indeed. Further to compdoc's questions, have you<br>> > tried downloading a file directly from your firewall box to the lan<br>> > clients? (might have to install an ftp server on the firewall to test.<br>> > What protocol(s) have you tested that trigger this error with downloads?<br>> > (http, https, ftp, etc.)<br>> ><br>> >  From reading your description, I get the feeling that the 'Bandwidth'<br>> > router is itself a NAT device, and therefore your firewall as a<br>> > non-routable IP address for eth5 (usually in the 10.x.x.x or 192.168.x.x<br>> > range.) Can you confirm this? It would be important in that kind of<br>> > setup that your eth0 be in a different subnet entirely.<br>> <br>> <br>> This may or might not be relevant, but with my HughesNet sat setup, if I <br>> download something already compressed, the built-in compression feature <br>> to the Hughsnet Modem kills it. I have to decommission that feature to <br>> download java applets that are pre-compressed. Weird. It took awhile to <br>> find it. Hughes techs suggest it is a feature and that my software is at <br>> fault. Go figure. I just want the damn thing to bring content from "out <br>> there" to "right here". The modem gets in the way. Your problem might <br>> prove to be just as weird and obscure. Ric<br>> <br>> <br>> <br>> -- <br>> My father, Victor Moore (Vic) used to say:<br>> "There are two Great Sins in the world...<br>> ..the Sin of Ignorance, and the Sin of Stupidity.<br>> Only the former may be overcome." R.I.P. Dad.<br>> http://linuxcounter.net/user/44256.html<br>> <br>> -- <br>> ubuntu-users mailing list<br>> ubuntu-users@lists.ubuntu.com<br>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users<br></div>                                        </div>
<br>-- 
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</div>                                     </div></body>
</html>