aspose file tools*
The moose likes General Computing and the fly likes how to detect a firewall Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "how to detect a firewall" Watch "how to detect a firewall" New topic
Author

how to detect a firewall

jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
Hello,
I wrote a program that sends out an email, My smtp setting are set properly
but it still doesn't run. Could anyone tell me how to detect if p.c is behind a firewall and then how to de-activate it. When i ping local host i get the following:

but wheni rry to ping hotmail or some other site i get the following:

Could someone plz explain to me what the above msg means?. And how to detect and then de-activate a firewall. Any help or suggestions would be greatly appreciated. Thanks
jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
Can anyone please help me out? I have wrote a java program that sends out emails. It compiles fine and when i run it . gives me the following error

I'm thinking its a firewall issue. But don't know how to detect it and then de-activate it. Any suggestions would be greatly appreciated
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Most sites have ping blocked because attackers use it to bog down servers.
As far as your other request, it is what every spammer in the world would like to do. The firewall is there to keep people from doing what you want to do.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by jonty rhodes:
And how to detect and then de-activate a firewall.
And what good is a firewall if Joe Average shut it down at will?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
Take it easy guys. A simple " no, you can't deactivate it" could have send the message across as well. What a way to help a begineer learn.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Try to get a mail client such as Mozilla/Thunderbird/OutlookExpress to work on the same system sending and receiving mail from your ISP's mail server. Then use the same settings in your program. Be aware that if your program goes into a loop or overloads your ISP's mailserver in any way, or your ISP thinks you are a spammer, then the consequences could be uncomfortable and expensive.
However, this could be a valid method of sending yourself a mail or SMS if you are monitoring a system or a process which should be continuously available.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Can you show us the code you use for sending?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
Here's my code for sending. As i said earlier, it compiles fine. I'm also able to send out email using outlook and have used the same settings here.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
props.put("mail.smtp.host","smtp");

Try using the full domain name for the SMTP host, e.g. "smtp.domain.com".
jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
My ISP is rogers high speed in toronto. I called them and thats what they gave me for their outgong mail server ("smtp"). I followed your advice and changed it to "smtp.rogers.com" . Its still giving me the same runtime error. Any other suggestions?. I really want to ge this working. So, Please if theres anything else that can be done, let me know. THanks in advance
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
Theirs may not be named smtp.rogers.com, so call them again and tell them that you need the full name of the SMTP server (if necessary, tell them you're not using Outlook or something like that and so their shortcut or whatever you call it isn't working in your case). I think I remember RoadRunner having me just use "smtp" in my mail client, but I'm betting that's just some sort of alias that doesn't seem to be working right for your Java program.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

You could always install an SMTP server on your local PC and use it instead of your ISP. That is unless your ISP is blocking port 25. In fact, come to think of it, you should make sure that they are using the standard port 25 for SMTP. JavaMail will use port 25 by default for SMTP.


GenRocket - Experts at Building Test Data
jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
Could you please tell me where to install a SMTP server from? and what to do if my ISP is using port 25?. Thanks alot in advance. I think we're getting closer to making it work. THanks
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Following along the lines of maybe they don't use "smtp.roger.com", depending on what your OS is try to see what your DNS search suffix is.
I am assuming you're connected to the internet using rogers, try running this command:
ipconfig /all
and see what the line "Primary DNS Suffix" or "DNS Suffix Search List" says, chances are it might not say "rogers.com".
Then try that value as "smtp.whatever-dns-suffix-is-listed.com"
jonty rhodes
Greenhorn

Joined: Feb 12, 2004
Posts: 16
Its working now!!. Thanks alot guyz for not giving up on me. I really appreciate it. I downloaded a SMTP server. and thats all it took. Thank you very much for leading me to right path.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by jonty rhodes:
Its working now!!. Thanks alot guyz for not giving up on me. I really appreciate it. I downloaded a SMTP server. and thats all it took. Thank you very much for leading me to right path.

Glad we could help! Tell all your friends!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to detect a firewall