Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working behind a proxy and I save my code using .

My snippets of java code contain some system parameters to tell java about our proxy:

    System.setProperty("http.proxyHost", "xxxxxxxxx");
    System.setProperty("http.proxyPort", "1234");

aside from specifying those parameters on the command line or storing them in a config file, is it safe to publish this IP on a public server ? Could a hacker use it to attack my server ?

share|improve this question
Configuration should go in configuration files (which don't get committed, at least publicly), not in the source files. – EEAA Oct 31 '12 at 13:48
It depends on many, many things to answer in your specific case. But in general, if the secrecy of an IP address (and port) is the only thing keeping your server safe, it's not safe. – Ladadadada Oct 31 '12 at 14:14
up vote 4 down vote accepted

You should not rely on security by obscurity. It does not make any difference whether you publish this IP or not. There are many people running scans of the whole IPv4 address space for open or vulnerable proxies, so once it's reachable, it will be discovered in a matter of days. As long as the proxy itself is secure, you can publish the address.

share|improve this answer
where 'days' equals about 30 minutes. – Sirex Oct 31 '12 at 23:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.