Fix "EAI_NONAME" Error in FileZilla – Firewall & Network Guide
The "EAI_NONAME - Neither nodename nor servname provided, or not known" error in FileZilla often occurs due to DNS resolution issues, but even after fixing DNS, firewalls and network restrictions may still block FTP access. This guide focuses on firewall settings, network configurations, and router adjustments to ensure FileZilla can connect successfully.
Error Context: The EAI_NONAME error typically appears when FileZilla tries to resolve the FTP server's hostname to an IP address. If you've already checked DNS settings and the error persists, the problem is likely network-related. This guide assumes you've verified your DNS settings are correct.
Understanding the Error
While EAI_NONAME suggests a DNS problem, it can also manifest when:
- Firewall software blocks FileZilla's outbound DNS or FTP connections
- Network Address Translation (NAT) or router configurations interfere
- Corporate/ISP firewalls filter FTP traffic (especially on non-standard ports)
- Security software incorrectly flags FileZilla as a threat
- FTP server is configured to use a non-standard port that's blocked
Check Windows Firewall Settings
Windows Defender Firewall can block FileZilla's connections even if DNS is working correctly.
Allow FileZilla Through Windows Firewall
- Open Control Panel > System and Security > Windows Defender Firewall
- Click "Allow an app or feature through Windows Defender Firewall" in the left sidebar
- Click the "Change settings" button (administrator privileges required)
- Find FileZilla in the list. If not present, click "Allow another app..." and browse to:
C:\Program Files\FileZilla FTP Client\filezilla.exe
- Ensure FileZilla is checked for both Private and Public networks
- Click OK to save changes
Using Windows Security App (Windows 10/11)
- Open Windows Security > Firewall & network protection
- Click "Allow an app through firewall"
- Click "Change settings" > Find/Add FileZilla > Check both network types > OK
Restart FileZilla after making these changes.
Check Linux Firewall (UFW & Firewalld)
If connecting to a Linux FTP server, ensure the server's firewall allows FTP connections on the correct ports.
For UFW (Ubuntu/Debian)
# Allow standard FTP ports
sudo ufw allow 21/tcp # FTP control
sudo ufw allow 20/tcp # FTP data (active mode)
sudo ufw allow 990/tcp # FTPS (implicit SSL/TLS)
# For passive FTP, allow a range of ports (e.g., 40000:50000)
sudo ufw allow 40000:50000/tcp
# Reload firewall
sudo ufw reload
# Verify rules
sudo ufw status numbered
For Firewalld (CentOS/RHEL/Fedora)
# Add FTP service (opens ports 21, 20, 990)
sudo firewall-cmd --add-service=ftp --permanent
# For passive FTP, open a port range
sudo firewall-cmd --add-port=40000-50000/tcp --permanent
# Reload firewall
sudo firewall-cmd --reload
# Verify configuration
sudo firewall-cmd --list-all
FTP Ports Explained:
- Port 21: FTP control connection (commands)
- Port 20: FTP data connection (active mode transfers)
- Port 990: FTPS (FTP over implicit SSL/TLS)
- Port 40000-50000: Typical range for passive mode data connections
Check Network Restrictions (Router & ISP)
Corporate networks, university WiFi, or restrictive ISPs often block FTP traffic.
Test with Different Networks
- Switch to mobile data: Use your phone as a hotspot and connect your computer to it
- Use a VPN: Connect to a reputable VPN service and try FileZilla again
- Test from a different location: Try from a friend's house or cafe
If FTP works on a different network, your primary network is likely blocking FTP traffic.
Corporate Network Note: Many corporate networks block all outgoing FTP (port 21) for security reasons. Contact your IT department to confirm FTP is allowed. They may require you to use SFTP (port 22) or FTPS (port 990) instead.
Open FTP Ports in Your Router
If you're connecting to an FTP server behind a home/office router, port forwarding may be needed.
- Log into your router: Typically
http://192.168.1.1 or http://192.168.0.1 (check router label)
- Find Port Forwarding/Virtual Server: Usually under Advanced Settings, Security, or NAT
- Add forwarding rules:
| Service/Name |
Protocol |
External Port |
Internal Port |
Internal IP |
| FTP Control |
TCP |
21 |
21 |
[Your server's local IP] |
| FTP Data (Active) |
TCP |
20 |
20 |
[Your server's local IP] |
| FTPS |
TCP |
990 |
990 |
[Your server's local IP] |
| FTP Passive Range |
TCP |
40000-50000 |
40000-50000 |
[Your server's local IP] |
- Save settings and restart router: Apply changes and power cycle the router if needed
Disable Antivirus/Firewall Temporarily
Third-party security suites often include network filtering that can block FTP.
Temporarily Disable for Testing
Windows (Common Antivirus):
- Norton: Right-click system tray icon > Disable Auto-Protect
- McAfee: Right-click system tray icon > Turn Off (select time period)
- Bitdefender: Open app > Protection > disable shields temporarily
Mac:
System Preferences > Security & Privacy > Firewall > Turn Off Firewall
Linux:
# Stop firewalld temporarily
sudo systemctl stop firewalld
# Test FileZilla connection
# Re-enable when done
sudo systemctl start firewalld
Security Note: Only disable security software temporarily for testing. If disabling resolves the issue, configure an exception/ruleset for FileZilla instead of leaving protection off.
Use Passive Mode in FileZilla
Passive mode (PASV) often works better behind NAT and firewalls because the client initiates both control and data connections.
- Open FileZilla
- Go to Edit > Settings (Windows) or FileZilla > Settings (Mac)
- Navigate to Connection > FTP
- Select Passive (recommended) under Transfer mode
- Check "Fall back to active mode" as backup
- Click OK
Active vs. Passive Mode:
- Active Mode: Server connects back to client on port 20. Often fails with client-side firewalls.
- Passive Mode: Client connects to server on a random port. Better for most modern networks.
Most FTP servers today expect passive mode connections from clients behind NAT/firewalls.
Test FTP Ports with Telnet or Netcat
If connections still fail, test network connectivity to FTP ports directly.
Test with Telnet (Windows)
# First, enable Telnet Client if not installed:
# Control Panel > Programs > Turn Windows features on or off > Check Telnet Client
# Then test connection:
telnet ftp.yourserver.com 21
Expected Success: 220 FTP Server Ready (or similar greeting)
Failure: Could not open connection or timeout indicates blockage
Test with PowerShell (Windows)
Test-NetConnection ftp.yourserver.com -Port 21
Test with Netcat (Linux/Mac/Windows)
# Install netcat if needed (Linux: sudo apt install netcat)
nc -zv ftp.yourserver.com 21
# Test multiple ports
for port in 21 22 990; do
echo -n "Port $port: "
nc -zv ftp.yourserver.com $port 2>&1 | grep -E "succeeded|open"
done
Summary of Firewall & Network Fixes for FileZilla
| Issue |
Fix |
Verification Command |
| Windows Firewall blocking |
Allow FileZilla in Windows Defender Firewall rules |
Test-NetConnection -ComputerName ftp.server.com -Port 21 |
| Linux server firewall blocking |
sudo ufw allow 21/tcp or sudo firewall-cmd --add-service=ftp |
sudo ufw status or sudo firewall-cmd --list-all |
| ISP/Corporate network blocking |
Use VPN, mobile hotspot, or request network exception |
Test from different network/VPN connection |
| Router port forwarding needed |
Forward ports 21, 20, 990 to FTP server's local IP |
External port scanner (like YouGetSignal.com) |
| Security software interference |
Temporarily disable antivirus/firewall; add FileZilla exception |
Connect with security software disabled |
| Active mode failing |
Switch to Passive mode in FileZilla settings |
Check FileZilla > Edit > Settings > Connection > FTP |
| Port connectivity issues |
Test with telnet or nc on port 21 |
telnet ftp.server.com 21 should show server greeting |
Final Checklist: Before concluding the issue is not firewall/network related:
- Verify FTP server address and port are correct in FileZilla
- Ensure FTP server is running and accessible
- Check if you're using FTP, FTPS, or SFTP (they use different ports)
- Confirm username and password are correct
- Try connecting with a different FTP client (like WinSCP or Cyberduck) to isolate the issue
High-Availability Cloud VDS
- Uptime Р 99.95%
- Network bandwidth Р 1 Gb/s
- Technical support 24/7/365
learn more...