ftp ls 500 Illegal PORT command

When I use ftp to connect to a server and use the ls command I get
500 Illegal PORT command
The fix was to turn on passive mode type
passive
then
ls
500 Illegal PORT command
The fix was to turn on passive mode type
passive
then
ls