• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

get Firewall configuration in JAVA

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI
I am writing a java component that gets some files from a FTP server. If the FTP server is behind the firewall and FTP access is blocked in the forewall then the client needs to be intimated that the firewall is stopping files being downloaded.
So I think before connnecting to FTP server, if I get the info that accessing FTP server is not possible, then I can flash a message saying FTP server is behind the firewall and is not possible to connect.
So how do I go about it?
Thanks
Mrutyunjay
[ March 19, 2002: Message edited by: Mrutyunjay Hanchinal ]
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to Socket/Internet Protocols.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi - Two cases:
1) The wall permits no ftp whatsoever.
You should get the infamous 'connection refused' return when attempting to connect. However, you will get the same if the wall allows ftp but the ftp daemon is not started. I know of no way to tell the difference.
2) The wall allows passive ftp but not active (I hope I got those terms right and not backwards).
What will happen then, is the initial connect will work OK. But when a 'get' request is issued, the ftp daemon will switch modes and hence TCP/IP port numbers, via a negotiation with the client. It is possible to get 'connection refused' at this point! Again no real way to tell if passive/active is the real problem - maybe the daemon just crashed!

In the second case, I usually assume the wall is not configured correctly. However, it may be that a particular system would be configured to not allow 'get' requests, only 'dir' and such. Depends on the SA's objectives.
HTH (and I know it does not much), Good Luck, Guy
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic