1

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

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 ?

Pierre
  • 429
  • 1
  • 5
  • 14
  • 2
    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
  • 7
    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

1 Answers1

4

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.