HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - Linux
 - >
 - FTP Error 500, illegal port command
 
Operating System - Linux
        1840125
        Members
    
    
        2570
        Online
    
    
        110161
        Solutions
    
Forums
        Categories
Company
Local Language
                
                  
                  back
                
        
                
        
                
        
                
        
        
        
                
        
                
        
        
        
                
        
              
              Forums
Discussions
Forums
- Data Protection and Retention
 - Entry Storage Systems
 - Legacy
 - Midrange and Enterprise Storage
 - Storage Networking
 - HPE Nimble Storage
 
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
                
                  
                  back
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
            
                
            
                
            
                
            
                
            
            
                
            
                
            
            
                
            
                
              
            Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
 - Appliance Servers
 - Alpha Servers
 - BackOffice Products
 - Internet Products
 - HPE 9000 and HPE e3000 Servers
 - Networking
 - Netservers
 - Secure OS Software for Linux
 - Server Management (Insight Manager 7)
 - Windows Server 2003
 - Operating System - Tru64 Unix
 - ProLiant Deployment and Provisioning
 - Linux-Based Community / Regional
 - Microsoft System Center Integration
 
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
        Information
        Community
Resources
Community Language
        Language
        Forums
Blogs
Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
 - Mark Topic as New
 - Mark Topic as Read
 - Float this Topic for Current User
 - Bookmark
 - Subscribe
 - Printer Friendly Page
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-14-2002 06:48 AM
11-14-2002 06:48 AM
			
				
					
						
							FTP Error 500, illegal port command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						After making some changes on our firewall, we can no longer send/receive files from our FTP server. We login just fine, so the port forwarding appears to be working. However, when we attempt to send or receive any files, we get the following error: 
"500 Illegal PORT Command 425 Can't build data connection: Connection refused."
We also get the "500 Illegal Port command" error when we try to issue any other commands like ls.
Does anyone know what is wrong?
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
"500 Illegal PORT Command 425 Can't build data connection: Connection refused."
We also get the "500 Illegal Port command" error when we try to issue any other commands like ls.
Does anyone know what is wrong?
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-14-2002 07:44 AM
11-14-2002 07:44 AM
			
				
					
						
							Re: FTP Error 500, illegal port command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Well, I'd guess it's the changes you made to your firewall.  ;-)  FTP by default makes a return connection for data transfers.  Your firewall is no longer allowing that.  You have a couple of options.
1) Use passive mode for FTP. This is the easiest, assuming your client supports it.
2) Setup your kernel/firewall to use the netfilter options for allowing ftp.
If you can give a little more info on your specific firewall setup (are you using ipchains or iptables? What kernel revision?) I can probably give you more specifics on getting it setup if you need.
		
		
	
	
	
1) Use passive mode for FTP. This is the easiest, assuming your client supports it.
2) Setup your kernel/firewall to use the netfilter options for allowing ftp.
If you can give a little more info on your specific firewall setup (are you using ipchains or iptables? What kernel revision?) I can probably give you more specifics on getting it setup if you need.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-14-2002 07:46 AM
11-14-2002 07:46 AM
			
				
					
						
							Re: FTP Error 500, illegal port command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Well, I'd guess it's the changes you made to your firewall.  ;-)  FTP by default makes a return connection for data transfers.  Your firewall is no longer allowing that.  You have a couple of options.
1) Use passive mode for FTP. This is the easiest, assuming your client supports it.
2) Setup your kernel/firewall to use the netfilter options for allowing ftp. The specific modules/options in question in 2.4 kernels is the ip_nat_ftp, and ip_conntrack_ftp. If you have them built as modules (check /lib/modules-2.4.yourkernelversion/kernel/net/ipv4/netfilter for the modules) then just add a line to call modprobe in your firewall script.
If you can give a little more info on your specific firewall setup (are you using ipchains or iptables? What kernel revision?) I can probably give you more specifics on getting it setup if you need. 
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
1) Use passive mode for FTP. This is the easiest, assuming your client supports it.
2) Setup your kernel/firewall to use the netfilter options for allowing ftp. The specific modules/options in question in 2.4 kernels is the ip_nat_ftp, and ip_conntrack_ftp. If you have them built as modules (check /lib/modules-2.4.yourkernelversion/kernel/net/ipv4/netfilter for the modules) then just add a line to call modprobe
If you can give a little more info on your specific firewall setup (are you using ipchains or iptables? What kernel revision?) I can probably give you more specifics on getting it setup if you need.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-14-2002 10:54 PM
11-14-2002 10:54 PM
			
				
					
						
							Re: FTP Error 500, illegal port command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi,
Give this FTP command before giving anyother ftp command
ftp:ftpserver>PASV
Then try giving
ftp:ftpserver>ls
Does the error come now ?
regards,
U.Sivakumar
					
				
			
			
				
		
		
	
	
	
Give this FTP command before giving anyother ftp command
ftp:ftpserver>PASV
Then try giving
ftp:ftpserver>ls
Does the error come now ?
regards,
U.Sivakumar
	Innovations are made when conventions are broken
			
			
				
			
			
			
			
			
			
		The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
		
	
	
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP