code: private String determinateLocalIP() throws IOException {
  		Socket socket = null;
  
  		try {
  			URL url = new URL(defaultRepositoryUrl);
  			int port = url.getPort() > -1 ? url.getPort() : url.getDefaultPort();
  
  			log.debug("Determinating local IP-Adress by connect to {}:{}", defaultRepositoryUrl, port);
  			InetAddress address = Inet4Address.getByName(url.getHost());
  
  			socket = new Socket();
  			socket.connect(new InetSocketAddress(address, port), 3000);
  			InputStream stream = socket.getInputStream();
  			InetAddress localAddress = socket.getLocalAddress();
  			stream.close();
  
  			String localIp = localAddress.getHostAddress();
  
  			log.info("Local IP-Adress is {}", localIp);
  
  			return localIp;
  		} finally {
  			if (socket != null) {
  				socket.close();
  			}
  		}
  	}
docs: Ermittelt anhand der Default-Repository-URL die IP-Adresse der
  Netzwerkkarte, die Verbindung zum Repository hat.