title: AWS EC2 Passive FTP - Server sent passive reply with unroutable address. Using server address instead
body: <p>I have pureftp running on an AWS ec2 instance. I'm trying to get it to run in passive mode which I thought was working, however I'm finding it may not be working correctly. I'm receiving the following error in FileZilla</p>
  
  <pre><code>Status:         Connected
  Status:         Retrieving directory listing...
  Status:         Server sent passive reply with unroutable address. Using server address instead.
  Status:         Directory listing of "/" successful
  </code></pre>
  
  <p>The odd part is some people are unable to log in while others are. </p>
  
  <p>I have the following pureftp configuration</p>
  
  <p><strong>Port Range</strong></p>
  
  <pre><code>#Port range for passive connections replies. - for firewalling.
  
  PassivePortRange `50000 50100`
  </code></pre>
  
  <p><strong>PASV IP</strong></p>
  
  <pre><code>#Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
  #Symbolic host names are also accepted for gateways with dynamic IP
  #addresses.
  
  ForcePassiveIP            `ftp.mydomain.com` "my cname record is mapped to my ec2 public dns"
  </code></pre>
  
  <p>When I view the local port range on the server, /proc/sys/net/ipv4/ip_local_port_range the following are open.</p>
  
  <pre><code>32768   61000
  </code></pre>
  
  <p>My ec2 security group has port 50000 - 50100 open</p>
  
  <p>When I view my server logs I don't see much other than this every once in a while. </p>
  
  <pre><code>Feb  5 08:57:41 ip-172-11-42-52 dhclient[1062]: DHCPREQUEST on eth0 to 172.11.32.1 port 67 (xid=0x601547fd)
  Feb  5 08:57:41 ip-172-11-42-52 dhclient[1062]: DHCPACK from 172.11.32.1 (xid=0x601547fd)
  Feb  5 08:57:43 ip-172-11-42-52 dhclient[1062]: bound to 172.11.42.52 -- renewal in 1417 seconds.
  </code></pre>
  
  <p>Anybody have any  idea where things might be going wrong?</p>