Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP and Red Hat 9.0

Status
Not open for further replies.
Jun 11, 2003
88
US
Hi
i am running redhat 9.0 with vsftpd enabled and trying to set it up as an FTP server. i am trying to connect from an XP pro machine.
all machines have static private IP addresses.

i think i am getting close to getting my FTP up and running but still i am running into problems

when i connect directly to the ftp i get in no problems (doesnt even ask for a password, user id but that is another issue)
when i try to connect thru the internet via the IP i got from my router i get the login screen, but after that i get the following error.

an error occurred opening that folder on the FTP server. Make sure you have permission to access that folder.

Details
200 Switching to ASCII mode
227 Entering passive mode (192,168,1,223,51,115)
425 Security bad IP connecting

under the advanced tab of my internet options (on my XP pro machine which i am using to connect to the FTP server) i have already enabled Use passive FTP (for firewall and DSL compatablity)

i also did the following on the redhat 9.0 machine

iptables -A FORWARD -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A PREROUTING -t nat -p tcp -d 37.135.42.8 --dport 21 -j DNAT --to 10.0.0.5:21

iptables -A FORWARD -p tcp -d 10.0.0.5 --dport 21 -j ACCEPT

iptables -A FORWARD -p tcp -d 10.0.0.5 --dport 21 -j ACCEPT

substituting my internal address with the 10.0.0.5 and my public on into
37.135.42.8

what do i need to do to resolve this issue?




 
Normally, an IPTables module to support FTP is required.

I beleive you would

'insmod ip_masq_ftp'

Also, your local signon without password is likely because you have enabled anonymous/guess access.

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
i also tried the following iptables

iptables -A FORWARD -i eth0 -p tcp -s [w.x.y.z] -o eth1 -j ACCEPT

now i still get the above error stated in the orginal post but i dont even get the login screen first.
i got that idea from Zeland on this thread
thread54-647164 help

peace
david
 
*kick*
you also need to enable port 20, ftp-data.
The FTP service uses ports 21 and 20, plus it also requires access to high ports for PASV mode. I think you only need to DNAT the ports 20 and 21 connections, most firewall approaches leave the high ports NAT-out open which is what should be correct for PASV.

Good luck.


Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top