1

I have just set up a Virtual Machine running CentOS through Azure. In order to be able to access the virtual machine through an FTP client, I have enabled the FTP endpoint.

enter image description here

When I try to FTP in to the server, I see this in FileZilla:

Status: Connecting to x.x.x.x:21...
Error:  Connection timed out
Error:  Could not connect to server
Status: Waiting to retry...

There are no issues with the IP address as I am able to access the server through SSH.

What am I missing?

karancan
  • 141
  • 6

1 Answers1

1

The issue was with my IP Tables at the OS level.

I ran the following commands on CentOS to allow communication on port 20, 21 and 22.

sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT

Then run:

sudo iptables -L -n

The above three rules should be above the REJECT ALL rule under the Chain INPUT (policy ACCEPT) in order to be considered.

karancan
  • 141
  • 6