Firewall and URLConnection
The product that am working currently has two web servers each hosting a web applicaiton. The first web server hosts the core applicaiton of the product lets call it as WEB1. And the second one is a light weight webserver developed here itself, its nothing more than a servlet/JSP container lets call this as WEB2.
The relation between these web servers is one to many i.e. For every WEB1 you have many WEB2 servers.
WEB1 calls few jsp pages from WEB2 in its jsp pages. Most of the times its frames. The upper part of the frame might serve WEB1 jsp and the lower part may serve from WEB2.
Till now we were using URLConnection object to ping the WEB2 server and if its down then convey the user that WEB2 is down. This was done
Now there are possibilities that WEB2 might reside on a machine that is not rechable by WEB2, probably behind firewall. In this case URLConnection is failing.
Is there anyway, we can bypass the firwall for pinging the WEB2 server. Rather to know the status of WEB2 from WEB1 server.
Note that the browser from which the user accesses the WEB1 server will reside on the machine where WEB2 is running.
thanks,
Vikram Patil.
The crux of your topic seems to be How to open URLConnection from a host A to another host B, given that there is a firewall between them ?
URLConnection uses socket(s) underneath itself.
If the requisite port (usually 80 for HTTP traffic) is opened in firewall to let the trafiic in the requisite direction go through, you should not any problem.
A commonly used configuration is to have a proxy server of sorts along with the firewall. The application opening the URLConnection would direct all HTTP requests to the proxy server. The proxy server would in turn send the HTTP requests to the target server, but only after consuming some infomation from the request which tells it about the client accessing it. And similarly for HTTP responses.
There is in-built support in HttpURLConnection implementations to use proxies. The way to have your application actually send HTTP requests through a proxy is pretty simple. It basically involes setting a couple of system properties. http.proxyHost and http.proxyPort. The HttpURLConnection implementation will do the actual dirty work for you.
For a wealth of information about this, do a search on these forums.
Similar Messages
-
Error message about firewall and internet sharing
hello all i have a question regarding the use of firewall and internet sharing.
I have a PMG5 connected to internet through Airport. I've linked an Xbox 360 via the built-in ethernet port in order to access Xbox Live. I had to open specific UDP ports on the OS X firewall but it now works fine. However, in the Sharing Preference Pane, Internet Tab, i still get an error message saying that my Internet Sharing is disturbed by the settings of the firewall and sharing services, it says that i did not activate "personal web sharing" in the first two tabs...but i DID ! And there's no way to get rid of this error message.
I know I know some may consider it's not a real problem because it's just an error message while the connection actually works fine but well, I tend to hate error messages when they're not supposed to show up. So if anyone know the answer, thanks in advance...
Good day to everyone
Vince, Paris...sorry about the delay in replying, was kinda busy
well trashing the pref files was useless and i tried with another user, same thing. As for the second opinion, the problem was not about which port was used cause as i said the connection sharing works fine and anyway it was the correct port that was checked, it's just that i get an error message while there is no apparent error and everything works fine, i'm told that personal web sharing is not enabled but it is...
Anyway as i said, it's probably not a real matter, as long as it works...which brings me to another thing. I've created a special protocol in the firewall to enable a proper dialog with the xbox. it's basically the same thing you do for ichat AV when you have video connection problems, you track down the concerned UDP port using terminal, you allow traffic and all... The protocol for the xbox worked great for some days, but now it seems it's not enough, the game set keeps trying on another port and i constantly have to update the protocol or deactivate the firewall...and enabling back all UDP traffic is not enough to solve it.
In a way i think everything is linked, the initial error message when everything was fine and the current trouble. Any idea?
thanks
Vince -
I get a message that my network connection has timed out while trying to update my iPhone on iTunes. Has anyone else had that problem and if so what solutions have you found? I was told to turn off my firewall and/or virus protection while updating but am nervous about doing that for obvious reasons. I'm also disgusted with Apple not providing free tech support.
See this article about the ports that have to be open during the update process. iTunes has to contact Apple during the download. iTunes for Windows: Troubleshooting security software issues
-
I can't get the IOS 5 to work for windows Vista. I'm running kaspersky pure 2.0, windows firewall and windows defender. I have turned them all off, I then attach my Ipod 4th gen and I get the "cannot connect to itunes update server". I ran diagnostics in itunes and it tells me I dont have a internet connection. I'm on the internet right now, and I DO have a internet connection, but it tells me Itunes says otherwise. I'm able to send this message on the same pc with internet connection but keep running into this error. I have now read discussiong boards through apple and disabled all my firewalls, still no luck. I was able to update the lates version of itunes, and just waiting to get my ipod updated now, please help me.
On the computer you should be able to go to the network properites. Go to the TCP part and unchec the line that says obtaind DNS automatically and check the one that says use the following. Add the 8.8.8.8 and Google other 8.8.4.4.
For more info see:
https://developers.google.com/speed/public-dns/ -
Have deleted temp video, configured anti spam and firewall, and one specific video keeps giving me an error. Just tried downloading a previous episode of the show and it worked just fine. Always sunny in philly "Charlie rules the world" anyone else??
Have deleted temp video, configured anti spam and firewall, and one specific video keeps giving me an error. Just tried downloading a previous episode of the show and it worked just fine. Always sunny in philly "Charlie rules the world" anyone else??
-
I used to have iTunes 4.3.1, something like that, it kept asking me to upgrade but i had an older ipod so i couldnt. I recently broke my ipod so now i have one for itunes 10.5.3.3 because my ipod came shipped with ios5.0 installed. So i tried to update itunes, didnt work. I uninstalled it, didnt work. I disabled firewall and antiviurs, didnt work. Ive called tech support, as soon as the person hung up thinking that it was working, it stopped working. I REALLY LOVE MUSIC and want songs on my new ipod. Please someone help....
First try removing and reinstalling all the Apple software using the following or the link within it that applies to XP.
Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
Then try the other items in:
iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows -
Unable to receive internet connection over wifi connection. Shows that I am connected to the network, but do not have internet access. Checked my firewall and turned it off. What else am I missing or should be doing differently?
You might want to try resetting your router and your modem - just unplug the cords, leave them unplugged for about 3-5 minutes and then replug the modem and then the router in that order.
This may or may not correct your problem - call back if it doesn't.
Clinton -
HttpURLConnection and URLConnection
hi,
what's the difference between HttpURLConnection and URLConnection ?
When should I use the first and when the second one ?
thanksThe Javadoc shows the relationship. Cast a URLConnection to an HttpURLConnection when the URL protocol is HTTP.
-
This is the message I get when I open Firefox:
Unable to connect
Firefox can't establish a connection to the server at en-gb.start3.mozilla.com.
* The site could be temporarily unavailable or too busy. Try again in a few
moments.
* If you are unable to load any pages, check your computer's network
connection.
* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox.
See [[Server not found]] and [[Firewalls]] and http://kb.mozillazine.org/Firewalls
See also http://kb.mozillazine.org/Error_loading_websites -
I can't get artwork, I get a -609 error. I have tried turning off firewall and antivirus. Theewindows firewall is set to allow itunes anyhow. Any suggestions?
Perhaps try the "Error -609" section in the Specific Conditions and Alert Messages: (Mac OS X / Windows) section of the following document:
iTunes: Advanced iTunes Store troubleshooting -
After installing the new update for Firefox 3.6, no matter what I do, I cannot connect to the internet using Firefox. I can get on the internet using my other browsers (Google Chrome and Internet Explorer), so Firefox is the only one that doesn't work. I have already checked my firewall and have added and removed Firefox from my firewall to no avail. I've also already uninstalled and reinstalled Firefox, but so far it hasn't helped.
I have already tried removing firefox from my firewall. Even when I do that, my firewall doesn't detect firefox and prompt me to add it. And when I manually add it, it still doesn't work anyways. I've already tried the link as well, but it has been unhelpful. :/
I'm not sure if it matters, but a few weeks before this, I did download Microsoft Security Essentials. -
How to configure array for UAG 2010 with topology Between a frontend firewall and a backend firewall
Hi,
We want to publish exchange 2013 through UAG 2010. What is the best topology for UAG 2010?
Can we configure UAG 2010 arrawy with topology "Between a frontend firewall and a backend firewall" ?
Can we configure UAG 2010 array in workgroup?
What is the drawback to use ARR to publish exchange 2013?
Thanks
Jitender
jitenderHi Jitender - I have doen quite a few UAG deployments like this and is fully supported sitting in a DMZ between Firewalls. However, for an array the UAG Servers muts be domain joined. In these deployments the question is whether to place a Domain In the
DMZ (locked down of course) or allow traffic through to a domain controller via the backend firewall.
The link you require is here -
http://technet.microsoft.com/en-gb/library/ee428826.aspx
Kr
John Davies -
Why ill the flash player not intialize even after disabling firewall and antivisurs software
Why will the flash player not intialize even after disabling firewall and anitvirus software?
Windows XP and internet exployer? I can get the flash player to begin the
download but stops at about 50% initalization
Greenleaf Compaction, Inc.
142 W. Main
P.O. Box 265
Hopkins, MI 49328
Phone: 1-877-552-9369
Fax: (269) 793-7298
New email address: [removed] -
i am unable to download updates for my iphone 4 using my pc. i have turned off firewall and spam however the downloadkeeps stopping about halfway through saying i have been disconnected from the network and to check my settings. very frustrating! help!
Hi Jen. My daughter just compleated her nursing program and is now working as a full time nurse. Focus and study hard and soon you will be there too. Now to the problem at hand. I have the same problem. I gave up on it and satisfied myself with my iPod without the upgrade. Reason being I've read so many posts of people having problems after the upgrade. But I'm sure other factors are involved. Nevertheless here is the fix most say works to solve the problem: What ever virus protection you have installed on your computer, disable it. Then try to install the update. After that enable the protection. I had Kaspersky, and it does it's job well. The thinking is, the virus protection is blocking the upgrade. Hope this works. Charlie
-
Help needed with Firewall and pureftpd
I am having trouble getting the Leopard Firewall to let through ftp connections with PureFTPD manager 1.7
On a clean install of Leopard I set the firewall to "Set access for specific services and applications". For ssh, and apache (web sharing) this worked just fine.
I then installed PureFTPD Manager 1.7 (The version that is supposed to work with Leopard).
However I have been unable to get the firewall to let through connections to the pure-ftpd server.
I selected "allow" when OSX prompted me whether ProFTPD should be permitted to open a port. That worked right after I installed ProFTPD Manager until I reset the computer. Then it stopped working.
I tried adding the pure-ftpd application to the application list in the Firewall settings. That didn't work.
I always get "Deny pure-ftpd connecting from ..." in the firewall log.
Has anyone out there gotten pro-ftpd to work with the Leopard firewall set to "Set access for specific services and applications?"
Please don't suggest to disable the firewall or to use ipfw. Disabling the firewall I don't consider a reasonable solution for a computer that is exposed to the internet, and I would prefer not to have to use ipfw for everything.
Thank youI'm assuming that this works fine if you disable the firewall altogether, correct?
ipfw won't help you here since the way that the leopard firewall is setup, it's already set as an 'allow all'.
Rather than waiting for the 'do you want to allow...' dialog to come up, have you tried clicking the + in the firewall and adding the application directly?
Also, can you describe how you are performing your tests? From the same system or a different system? From behind a router/firewall or on the same segment?
You may also want to read through this post on how the firewall works. It sounds like you already understand 99% of it though. http://discussions.apple.com/thread.jspa?threadID=1337153&tstart=0#6317068
One last resort option would be to delete the firewall preference file and reboot to start over.
You'd want to nuke /Library/Preferences/com.apple.alf.plist
Maybe you are looking for
-
Digital Photo Frame df1010v2 - how to download photos in the order they appear on USB?
Photos installed nicely into my df1010v2 digital photo frame, but not in the order I wanted them. I had painstakingly named all of them by date, and they appeared chronologically on the USB drive I copied them from, but they downloaded in random bunc
-
How to change the reason in a ICWC-followup-process with the copying-BAdI?
Hi all, I want to use the followup- and docflow-functionality in ICWC to copy most of the information from one process to another. I made the definition of a copying control in the customizing -> working with a new BAdI and the copying routine. Every
-
Hi everybody, i updated my IPAD bought in october 2013 to IOS 8.02. Now the IPAD only goes to the apple logo, every few minutes it blinks blue and starts over. I tried doing the home plus switch thing and it doesnt work. Itunes does not recognize th
-
The encoding "ISO8859_1" is not supported.
I am trying to bring up WLS 6.1 for the examples that got shipped by BEA and I am getting this error: Starting WebLogic Server .... <Dec 28, 2001 5:50:46 PM CST> <Notice> <Management> <Loading configuration file .\config\examples\config.xml ...> <Dec
-
HT5085 I am having trouble with an iBooks but it is not working. Any hints?
I am having trouble with downloading iBooks. The book has many repeated pages and missing pages. I have tried going to "purchased" and downloading it again but the download doesn't work. Thanks.!