title: iptables. MASQUERADE doesn't work?
body: <p>My iptables-save looks like this:</p>
  
  <pre><code># Generated by iptables-save v1.4.21 on Wed Sep 17 16:42:32 2014
  *nat
  :PREROUTING ACCEPT [489:32439]
  :INPUT ACCEPT [459:30062]
  :OUTPUT ACCEPT [569:39257]
  :POSTROUTING ACCEPT [26:1755]
  -A POSTROUTING -o ppp0 -j MASQUERADE
  COMMIT
  # Completed on Wed Sep 17 16:42:32 2014
  # Generated by iptables-save v1.4.21 on Wed Sep 17 16:42:32 2014
  *filter
  :INPUT ACCEPT [14662:3083395]
  :FORWARD ACCEPT [0:0]
  :OUTPUT ACCEPT [15653:7915049]
  -A INPUT -i lo -j ACCEPT
  -A INPUT -i eth2 -p icmp -m icmp --icmp-type 8 -j ACCEPT
  -A INPUT -i eth2 -p udp -m udp --dport 53 -j ACCEPT
  -A INPUT -i eth2 -p udp -m udp --dport 67 -j ACCEPT
  -A FORWARD -i lo -o lo -j ACCEPT
  -A FORWARD -i eth2 -o eth2 -j REJECT --reject-with icmp-port-unreachable
  -A FORWARD -i eth2 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  -A FORWARD -i eth2 -o ppp0 -m state --state NEW -j ACCEPT
  -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
  COMMIT
  # Completed on Wed Sep 17 16:42:32 2014
  </code></pre>
  
  <p>Other three tables, <code>security</code>, <code>mangle</code> and <code>raw</code> are empty.</p>
  
  <p>Router is Ubuntu: Linux ubuntu 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux</p>
  
  <pre><code>root@router:/# lsmod | grep table
  iptable_security       12705  0 
  ip6table_raw           12683  0 
  ip6table_mangle        12700  0 
  ip6table_filter        12815  0 
  ip6_tables             27025  3 ip6table_filter,ip6table_mangle,ip6table_raw
  iptable_raw            12678  0 
  iptable_mangle         12695  1 
  iptable_nat            13011  1 
  nf_nat_ipv4            13263  1 iptable_nat
  nf_nat                 21798  4 ipt_MASQUERADE,nf_nat_ipv4,xt_REDIRECT,iptable_nat
  nf_conntrack           96976  6 ipt_MASQUERADE,nf_nat,nf_nat_ipv4,xt_conntrack,iptable_nat,nf_conntrack_ipv4
  iptable_filter         12810  1 
  ip_tables              27239  5 iptable_security,iptable_filter,iptable_mangle,iptable_nat,iptable_raw
  x_tables               34059  17 iptable_security,ip6table_filter,ip6table_mangle,xt_CHECKSUM,ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_owner,xt_conntrack,iptable_filter,ip6table_raw,xt_CLASSIFY,ipt_REJECT,xt_REDIRECT,iptable_mangle,ip6_tables,iptable_raw
  </code></pre>
  
  <p>I'm trying from the client on <code>eth2</code> browse the Internet, it works, but partially. I can get access to the google search engine, it works. But some part of network doesn't. Not every site from the google are opening.</p>
  
  <p>For example, I could wget <code>www.google.com</code>, but not <code>www.speedtest.net</code>.</p>
  
  <p>It is hung and looks like:</p>
  
  <pre><code>root@client:/# wget -O - www.speedtest.net
  --2014-09-17 09:43:09--  http://www.speedtest.net/
  Resolving www.speedtest.net (www.speedtest.net)... 93.184.219.82
  Connecting to www.speedtest.net (www.speedtest.net)|93.184.219.82|:80... connected.
  HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
  Retrying.
  
  --2014-09-17 10:09:56--  (try: 2)  http://www.speedtest.net/
  Connecting to www.speedtest.net (www.speedtest.net)|93.184.219.82|:80... connected.
  HTTP request sent, awaiting response... 
  ...
  ...
  </code></pre>
  
  <p>However, I can ping <code>www.speedtest.net</code>:</p>
  
  <pre><code>root@client:/# ping  www.speedtest.net
  PING cs62.adn.edgecastcdn.net (93.184.219.82) 56(84) bytes of data.
  64 bytes from 93.184.219.82: icmp_req=1 ttl=57 time=93.0 ms
  64 bytes from 93.184.219.82: icmp_req=2 ttl=57 time=93.0 ms
  64 bytes from 93.184.219.82: icmp_req=3 ttl=57 time=93.3 ms
  64 bytes from 93.184.219.82: icmp_req=4 ttl=57 time=93.0 ms
  64 bytes from 93.184.219.82: icmp_req=5 ttl=57 time=93.1 ms
  </code></pre>
  
  <p>And <code>www.google.com</code> accessible:</p>
  
  <pre><code>root@client:/# wget -O - www.google.com
  --2014-09-17 09:48:05--  http://www.google.com/
  Resolving www.google.com (www.google.com)... 173.194.32.18, 173.194.32.16, 173.194.32.20, ...
  Connecting to www.google.com (www.google.com)|173.194.32.18|:80... connected.
  HTTP request sent, awaiting response... 302 Found
  Location: http://www.google.ru/?gfe_rd=cr&amp;ei=1VgZVPTqNOfJ8ge20oCQDg [following]
  --2014-09-17 09:48:05--  http://www.google.ru/?gfe_rd=cr&amp;ei=1VgZVPTqNOfJ8ge20oCQDg
  Resolving www.google.ru (www.google.ru)... 173.194.32.23, 173.194.32.15, 173.194.32.24, ...
  Connecting to www.google.ru (www.google.ru)|173.194.32.23|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: unspecified [text/html]
  Saving to: `STDOUT'
  </code></pre>
  
  <p>Iptables on the client side is empty.</p>
  
  <p>Where am I wrong?</p>