Link to home
Start Free TrialLog in
Avatar of Dushan Silva
Dushan SilvaFlag for Australia

asked on

Urgent: Batch file to Check FTP connectivity issues

Hello Experts.
I want to write a batch file(using DOS script or UNIX script), which could be used to check FTP connectivity issues. The script should check the followings and generate a log file, with connection status information

1.)      Detect any firewall issues for both active and passive modes
2.)      Detect which firewall has got the issue ( client or server )
3.)      Check for any file transfer and time out issues.
4.)      Detect any user name password issues.
5.)      The speed of the connection.

First two points are highly important to me.( I can give full points for those two)
Also I will prefer for some other languages like VB, Java, C, ..etc.( Other than DOS or UNIX shell scripts)

I just want a solution which can run on LINUX or WINDOWS.

BR Dushan
SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dushan Silva

ASKER

We are always facing these problem since we are providing Integration solutions for customers. Most of our solutions are FTP , HTTP, EMAIL, ..etc based. We are having lots of clients. And as expereinced we are always facing these firewall issues. So we are spending more times for check these firewall issues other than our futher developments or testings.

Recently we have delivered big product with lots of cutomers/sub customers/ careers.. etc.
Now most of there are on installation and testing process. So we are facing these problems always around 100/200 daily. Still 10% of customers are on process. Difinitly we will be on problem in future to sit and recover these firewall issues.

I WOULD REALLY APPRECIATE , AT LEAST ANY ONE CAN GIVE SOME KIND OF TECHNIC OR SOME EASY WAY.

BR DUSHAN

Avatar of CEHJ
ahoffman is right. Shell scripting/batch files are an impossible approach
I'm prefer any other language which can run on WINDOWS or LINUX.(as mentioned in Initial post).

BR Dushan
You need a cross-platform implementation - try Java. No - i'm not being partial and no, i'm not going to write it ;-) It's not trivial eitherand that's if all of it is even possible
Hello CEHJ,
Could you guide for it, I'm having Java knowledge.

BR Dushan
Avatar of Montoya
Montoya

Dushan, there are ActiveX tools that will do that. YOu will have to find them in MSDN. This is outside my area of expertise. However, if you look at the new Microsoft Virtual Labs, they use the browser and some Active X controls to test firewall ports, throughput, etc... FTP functionality is not in there, but once you figure out the Firewall stuff, the rest should be cake. I hope that helps a bit.
Thanks Iammontoya, And I'm really happy to hear some solution is there.

But actually this is bit urgent. And I need a solution which should at least guide for me. Then I can take first step to design it.
Could you kindly provide some more details which will guide for me.

AND FIRST THING I WANTS TO KNOWS IS HOW IT WORKS. (THIS SHOULD WORK TO CHECK OUR SIDE FIREWALL INCOMMING/OUTGOING AND OTHER END INCOMMING/OUTGOING PORTS AS REQUIRED IN FTP ACTIVE OR PASSIVE MODES.)

BR Dushan
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> (possibly Expect, but that is less portable)
do you know a platform wher expect does not work?
Anyway, neither perl nor tcl can identify a proper configured firewall.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What should all those tools and suggestion help? It's just useless guessing.
A proper configured firewall can not be detected, you even can't proove for shure that there is one. Dot. Period.
(not talking about sophisticated stealth scans withfingerprinting over all ports)
Thank every one for great efforts!
Yes ahoffmann.
I'm still trying with all the suggested posts. And trying with all options of those. But still I coludn't find a proper solution. If anyone already has done anything similar to this please let me know.
Or at least anyone has partially test this thing , I can develop other things.

BR Dushan
hmm, a solution for what are you missing? As said above, you cannot identify a proper configured firewall.
You just can identify if there is a service listening and answering on a port, that's what hping is for.
Do I have to install hping on client side?

BR Dushan
>> post(s) by ahoffman:
>> Anyway, neither perl nor tcl can identify a proper configured firewall.
...
>> (not talking about sophisticated stealth scans withfingerprinting over all ports)

  Well, if you restrict the way in which the "testing" can be done, then, I agree with your first statement.
A "properly configured firewall" will let "appropriate" traffic through, just like "no firewill" will.

  So, it goes back to the question, "How much time, and effort is allowed/available to determine whether a firewall is 'properly configured'?"

  If one does not have direct access to the firewall machine, and its configuration, then the only way to "thoroughly" test would be to use something likie ... "sophisticated stealth scans withfingerprinting over all ports"...

 
I see value in determining if a route and or port is blocked so you can be proactive.  I see no value in determining automagically what device or software is blocking it.  You will still have to get involved manually to resolve the issue, and you will only be able to see as far as the first problem.
> Do I have to install hping on client side?
no
Hello,
I couldn't find my requirements as in my intial post from hping. Please let me know, any one has done any script from hping. As I feels hping is doing same functionality in telnet command. Becuase using simple telnet commands I can achieve same functionality.
I want to check ports both incomming and outgoing on client and server side, are correctly opened or not.
If not opened, then in which server(firewall) and which port.
You can have idea about ports from following diagrams regarding FTP passive and active connectivity.

http://slacksite.com/images/ftp/passiveftp.gif
http://slacksite.com/images/ftp/activeftp.gif
BR Dushan
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Anyone else having a solution..............

BR Dushan
Thanks for every one's input!!
I didn't found proper solution for my first  two points. If anyone could find please let me know any day ;).

BR Dushan