ftp passive mode with iis behind firewall
#1
Posted 07 August 2002 - 12:55 AM
#2
Posted 07 August 2002 - 04:34 PM
#3
Posted 08 August 2002 - 08:14 AM
The problem with this... if the client is on a firewall then they cant use port mode. Specifically some routers have this problem. THe linksys in my office will do ftp translation to modify the port string to allow port mode. HOwever not all firewalls do this... the problem with ftp... is the addresses are sent in the packets... like the ftp client will send a port command
PORT 10,0,10,1,20,486
meaning connect on 10.0.10.1 which is the internal ip. Which the server cannot connect to. Good firewalls will translate this. But not all of them do. So hosting companies must allow pasv mode for clients behind a firewall.
#4
Posted 08 August 2002 - 08:20 AM
Could you not punch a "rule/hole" into your NAT firewall forwarding in FTP ports being used allowing them ingress if need be for your clients using PASV clientside initiated communication?
MOST firewalls systems have configurations files especially in the UNIX world you just have to toy with... I think netconfig.exe in Linux does this for you though, & in XP's native firewall its in its properties to punch in new rules etc. for stuff like this!
(Clutch's suggestion is a decent one too... look into it as well!)
*
APK
THe firewall forwards the ports... that isnt the problem... the problem is... the string is sent as the iis machines internal ip. 10.x.x.x. So the client when initiating passive tries to do this...
PASV 10,x,x,x,x,x
What I would like to do is set a pasv port range in iis ftp and a pasv ip address to be sent to the client. Even programs like serv-u and g6-ftp support these settings but in iis they are nowhere to be found. I have found an ipnat rule that allows clients behind the firewall to support the PORT command... but I have not found a way to get the firewall to translate the packets for incoming pasv connections. Ive searched and searched and many people are saying that it cannot be done with nat because nat only deals with the packet headers not the actual data in the packets. And this is where the ip that needs to be changed is... however... There is application proxy's in ipnat that does this for ftp clients behind the firewall... So I figure there must be a way. But all in all... The best situation for me would be to be able to set this in iis like you can with just about all ftp server software. Im very suprised microsoft's ftp server doesnt support this. In fact im dumbfounded by it. In fact I was hoping somebody here would just tell Im dumb and there is a way to do it with iis.
#5
Posted 08 August 2002 - 06:37 PM
The problem with this... if the client is on a firewall then they cant use port mode. Specifically some routers have this problem. THe linksys in my office will do ftp translation to modify the port string to allow port mode. HOwever not all firewalls do this... the problem with ftp... is the addresses are sent in the packets... like the ftp client will send a port command
PORT 10,0,10,1,20,486
meaning connect on 10.0.10.1 which is the internal ip. Which the server cannot connect to. Good firewalls will translate this. But not all of them do. So hosting companies must allow pasv mode for clients behind a firewall.
What are you using? I have setup a couple of Linksys routers, a Cisco PIX 520, ISA Server, and helped others with Netgears and these NAT systems seem to work just fine in this mode. I also believe that Checkpoint allows for this as well. I am interested in hearing why you can't get yours working.
#6
Posted 10 August 2002 - 09:39 AM
No problem, this kind of thing is fairly interesting!
Heh, yea... I can see that & it WOULD be a "small" problem (sarcasm).
I have NO idea... you'd be best served by someone who has used the latest/greatest IIS. I have not set it up & used it since, oh, 1997! Long time ago, much older model...
I don't use that sorry. I was speaking in general terms on forwarding the ports in its rules lists.
There is application proxy's in ipnat that does this for ftp clients behind the firewall... So I figure there must be a way.
I agree... whatever this app proxy is that changes the headers of the packets sent is what you want to mess with it sounds like!
Agreed 100%! Only problem is, I do not know where that is setup in IIS.
There's gotta be a way because I am SURE you are not the first person to set it up in such a hardware & firewalled environs.
(Sorry, I don't know where the "tweak" is for it though... you're best served by the hardcore-network tech/admin types here as I have not messed with IIS in ages, & was suggesting a basic principle to lookover is all...)
APK
P.S.=> However you work it out (I hope you do & good luck on that) do let us know your technique... cannot hurt to pickup a new trick, especially with IIS! I could use the knowledge... apk
Heh... your right Im not the only person with this problem. A quick search on google groups will show you a couple of peeps with iis that have this problem.. with a unix ftp like wu-ftp.. the passive ip can be set with a port range. For obvious reasons. Thanks for the links! The netbios article described my prob to the tee.. and ms suggests to figure out how to do it with the nat. So I guess thats my goal right now. I gotta figure out how to do it with ipnat. Im new to ipnat. In fact i didnt setup the firewall I only knew why the ftp wasnt working so I started to dig in to find a solution. But it certainly has been fun. I never thought I would be configuring nat on a firewall. Its easier then I thought it would be. Just this problem seems to be alot bigger then I expected. We've had to install serv-u as a temporary solution for clients behind routers/firewall that require pasv. It has the neat little pasv ip and port range settings. I will defenitly let you guys know if I figure it out.
#7
Posted 10 August 2002 - 09:49 AM
The problem with this... if the client is on a firewall then they cant use port mode. Specifically some routers have this problem. THe linksys in my office will do ftp translation to modify the port string to allow port mode. HOwever not all firewalls do this... the problem with ftp... is the addresses are sent in the packets... like the ftp client will send a port command
PORT 10,0,10,1,20,486
meaning connect on 10.0.10.1 which is the internal ip. Which the server cannot connect to. Good firewalls will translate this. But not all of them do. So hosting companies must allow pasv mode for clients behind a firewall.
What are you using? I have setup a couple of Linksys routers, a Cisco PIX 520, ISA Server, and helped others with Netgears and these NAT systems seem to work just fine in this mode. I also believe that Checkpoint allows for this as well. I am interested in hearing why you can't get yours working.
I cant get it to work... =]. iis ftp behind freebsd firewall = hard to setup without good knowledge of ipnat. I gotta study the ftp application proxy a bit more and tinker with ipnat to figure out exactly how it works. Im new to the syntax of it all. Its fairly straight forward I can do simple things like portmaps and bimaps. But there are a bunch of rules I need to learn to figure it out. I guess the first thing I should try is to figure out how to get a client to work behind the firewall using port mode. Its essentially the same thing.. Except in reverse. When the ftp client says PASV the ftp server returns the ip and port to connect to. With port the client just sends the ip and port off the bat. So basically its a bit easier to setup the clients.. because the packets are coming in... but with PASV the packets are coming out... back to the client. Its hard.. ( impossible? ). If you know please share. Again thanks for reading everybody. This is a great forum. I havent been here in awhile. Wheres SHS? He helped all us win2k users out with our voodoo 3 cards when 3dfx didnt support it. ok im off topic. Signing out.
#8
Posted 10 August 2002 - 10:52 AM
The problem with this... if the client is on a firewall then they cant use port mode. Specifically some routers have this problem. THe linksys in my office will do ftp translation to modify the port string to allow port mode. HOwever not all firewalls do this... the problem with ftp... is the addresses are sent in the packets... like the ftp client will send a port command
PORT 10,0,10,1,20,486
meaning connect on 10.0.10.1 which is the internal ip. Which the server cannot connect to. Good firewalls will translate this. But not all of them do. So hosting companies must allow pasv mode for clients behind a firewall.
What are you using? I have setup a couple of Linksys routers, a Cisco PIX 520, ISA Server, and helped others with Netgears and these NAT systems seem to work just fine in this mode. I also believe that Checkpoint allows for this as well. I am interested in hearing why you can't get yours working.
I cant get it to work... =]. iis ftp behind freebsd firewall = hard to setup without good knowledge of ipnat. I gotta study the ftp application proxy a bit more and tinker with ipnat to figure out exactly how it works. Im new to the syntax of it all. Its fairly straight forward I can do simple things like portmaps and bimaps. But there are a bunch of rules I need to learn to figure it out. I guess the first thing I should try is to figure out how to get a client to work behind the firewall using port mode. Its essentially the same thing.. Except in reverse. When the ftp client says PASV the ftp server returns the ip and port to connect to. With port the client just sends the ip and port off the bat. So basically its a bit easier to setup the clients.. because the packets are coming in... but with PASV the packets are coming out... back to the client. Its hard.. ( impossible? ). If you know please share. Again thanks for reading everybody. This is a great forum. I havent been here in awhile. Wheres SHS? He helped all us win2k users out with our voodoo 3 cards when 3dfx didnt support it. ok im off topic. Signing out.[/quote]
Guess ipnat wont work.
http://home.earthlink.net/~jaymzh666/ipf/IPFprob.html#14
And...
#9
Posted 11 August 2002 - 01:00 AM
Ms makes great software... however they seem to forget about certain features that make our lives easier. I have ran into a couple of these things when programming ms-sql server. I figure they think that a small hosting company should invest 5000 dollars on a cisco firewall to use their ftp server. Maybe its a conspiracy against free software
#10
Posted 11 August 2002 - 04:34 AM
Ms makes great software... however they seem to forget about certain features that make our lives easier. I have ran into a couple of these things when programming ms-sql server. I figure they think that a small hosting company should invest 5000 dollars on a cisco firewall to use their ftp server. Maybe its a conspiracy against free software
Well, it works with our $6500 (at the time) firewall along with my $100 Linksys NAT router. Oh, and it also worked with my Eicon DIVA ISDN router when I was using it before. So far, yours is the first situation that I have heard of where it flat did not work. Seems like it should though, but I haven't had occasion to work with FreeBSD.
#11
Posted 11 August 2002 - 04:40 AM
Ms makes great software... however they seem to forget about certain features that make our lives easier. I have ran into a couple of these things when programming ms-sql server. I figure they think that a small hosting company should invest 5000 dollars on a cisco firewall to use their ftp server. Maybe its a conspiracy against free software
That, or I bet it works with their own security softwares! On your "conspiracy theory", heh... I am TOTALLY with alot of those, because I figure if a regular guy like me can conceive it, it's been done or in the making (as there is in my opinion, very little original thought left).
They do make great software, no doubt about it, even when they license it or buy a company out to do it. They often extend it more (sometimes though watering it down from the FULL versions they license) or improve it later to the max.
I dunno about them 'being in bed with Cisco' though... could be though, you never know! I think you are just making a point though... Cisco just being an example!
Ever try a simple LinkSys NAT "firewalling" router with it? I am just curious because they're decent little buggers & have alot of capability... might be a CHEAP fix for you one day...
*
APK
We got the freeBSD firewall all souped up with all these security programs ( which we hired someone to do ) like snort ( checks for exploits in ip packets ) and port monitoring. So I doubt we will be switching the firewall. I think we are going to find just go with some 3rd party ftp software. As for me Im going to continue to research this. The nice thing about open source is anything is possible. I heard those application proxy's for ipnat are kinda like plugins. So Im going to keep looking. Maybe Ill make my own! Im on a roll lol.
#12
Posted 12 August 2002 - 10:25 PM
Ms makes great software... however they seem to forget about certain features that make our lives easier. I have ran into a couple of these things when programming ms-sql server. I figure they think that a small hosting company should invest 5000 dollars on a cisco firewall to use their ftp server. Maybe its a conspiracy against free software
Well, it works with our $6500 (at the time) firewall along with my $100 Linksys NAT router. Oh, and it also worked with my Eicon DIVA ISDN router when I was using it before. So far, yours is the first situation that I have heard of where it flat did not work. Seems like it should though, but I haven't had occasion to work with FreeBSD.
Which linksys router? I have befsr somethin or other. It does the same exact thing. It tries to connect to the internal ip of the ftp server. A quick search on google will show people with the linksys having the same problem.. And of course the suggested solution is to use an ftp server that is capable of specifying the pasv ip and the pasv port range. silly microsoft..
http://groups.google.com/groups?q=Linksy....com&rnum=3
#13
Posted 12 August 2002 - 11:21 PM
Ms makes great software... however they seem to forget about certain features that make our lives easier. I have ran into a couple of these things when programming ms-sql server. I figure they think that a small hosting company should invest 5000 dollars on a cisco firewall to use their ftp server. Maybe its a conspiracy against free software
Well, it works with our $6500 (at the time) firewall along with my $100 Linksys NAT router. Oh, and it also worked with my Eicon DIVA ISDN router when I was using it before. So far, yours is the first situation that I have heard of where it flat did not work. Seems like it should though, but I haven't had occasion to work with FreeBSD.
Which linksys router? I have befsr somethin or other. It does the same exact thing. It tries to connect to the internal ip of the ftp server. A quick search on google will show people with the linksys having the same problem.. And of course the suggested solution is to use an ftp server that is capable of specifying the pasv ip and the pasv port range. silly microsoft..
http://groups.google.com/groups?q=Linksy...;rnum=3[/quote]
Welp, I don't know what to tell you or them, since mine works perfectly fine doing what I mentioned earlier. I have the BFSR41, and I simple forward port 21 (TCP and UDP) to my hosting box. As a matter of fact, I uploaded the screencap you see here with it. In this screen cap, note the external IP resolution of my domain name, and the local IP of this workstation at the office of xxx.1.1.100:
#14
Posted 13 August 2002 - 02:13 AM
#15
Posted 13 August 2002 - 03:53 AM
I understand that, but I did post earlier to NOT use PASV mode. Hence, my comment about following my earlier instructions. I connected to my system at home from behind my Cisco PIX 520, and can do the reverse using IIS 5.0 on both ends and either IE 6/5.x or SmartFTP. Also, I notice that you seem to think that MS is "silly" with their implementation of FTP, and to some respects they are (no resume for upload, which sucks). However, upon looking at your link it seems that other FTP server apps have issues with this as well. FTP is effectively a broken protocol to begin with, and has been patched together over the years to keep up with today's demands. Hopefully it will be canned altogether, but not anytime soon...
#16
Posted 13 August 2002 - 05:14 AM
I understand that, but I did post earlier to NOT use PASV mode. Hence, my comment about following my earlier instructions. I connected to my system at home from behind my Cisco PIX 520, and can do the reverse using IIS 5.0 on both ends and either IE 6/5.x or SmartFTP. Also, I notice that you seem to think that MS is "silly" with their implementation of FTP, and to some respects they are (no resume for upload, which sucks). However, upon looking at your link it seems that other FTP server apps have issues with this as well. FTP is effectively a broken protocol to begin with, and has been patched together over the years to keep up with today's demands. Hopefully it will be canned altogether, but not anytime soon...
My apologies... I re-read your post. This isnt an issue of just force clients to use port mode though. It simply isnt an option. I agree ftp is stupid. It was creating back in the peace love hippi days when firewalls werent an issue. My venting is do to a build up of spending days trying to figure out a solution to this problem with no avail. We got customers using serv-u on a non standard ftp port
#17
Posted 13 August 2002 - 04:53 PM
http://support.micro...t.aspx?scid=kb;[LN];Q309816
It illustrates which system initiates the port selection, and why some firewalls aren't setup to accept it. Some heavy duty firewalls (like Checkpoint and ISA) are "active", and follow the traffic for a given protocol and will open and close ports as needed. In our case, we are speaking of simple port forwarding for the Linksys (which has always worked for me using PORT mode), but I am not familiar with the other NAT/Firewall system he is using.
Have you tried using PORT mode at all with your BSD system? Does your firewall allow outbound traffic on port 20?
#18
Posted 13 August 2002 - 10:46 PM
http://support.micro...t.aspx?scid=kb;[LN];Q309816
It illustrates which system initiates the port selection, and why some firewalls aren't setup to accept it. Some heavy duty firewalls (like Checkpoint and ISA) are "active", and follow the traffic for a given protocol and will open and close ports as needed. In our case, we are speaking of simple port forwarding for the Linksys (which has always worked for me using PORT mode), but I am not familiar with the other NAT/Firewall system he is using.
Have you tried using PORT mode at all with your BSD system? Does your firewall allow outbound traffic on port 20?
port mode works fine. port 20 is rarely used by the data connection. What happens is the server/client opens up a high random port depending on if you use PASV/PORT respectively. This is why when using passive its nice to beable to set a passive port range in the ftp server. If your interested in how it works in BSD... there is something called ipf. it stands for IPFILTER. in IPFILTER there is something called ipnat. In ipnat you can create your own nat rules. ( pretty cool stuff ). you just place them in a text file. Nat... doesnt really take care of data inside the packets... But it has made an exception for ftp. For this very reason.
#19
Posted 28 August 2005 - 04:16 AM
ive been workin on this for a month or so doing reasearch, and reading forums. nobody seems to have resolved this problem. but i have found a 3rd party program that has all the flexibility of IIS. BulletproofFTP. its a nice little program you cna run in the backround of your server that does everything from multiple users to group policy to restrictions, may i go on. and this program allos you to do passive commands and port limitations right on teh setting pages. and even better, that IP adders problem we are all having, RESOLVED! this program does it for you. you jcan either enter you outside router ip and it send it there, OR you can enter your dyndns name and password and it will aoutupdate for you!. lots of little toys that are very easy to use. as much as i would like to use IIS, this program does what i need and i dont ever have to troubleshoot it!.

Help










