From 30d925a96e589d61bdaed8f818ee706f725a698f Mon Sep 17 00:00:00 2001 From: reger Date: Mon, 6 Jan 2014 07:00:16 +0100 Subject: [PATCH] reimplemented server access restriction via Jetty IPAccessHandler to allow only configured IP's to access. Handler is only loaded if a restriction is configured. Since IPAcessHandler (Jetty 8) does not support IPv6 system property java.net.preferIPv4Stack=true Testing showed system.setProperty seems to be sensitive to point of calling (earliest possible time seems to be best = early in yacy.main). Moved the "isrunning..." just open browser check also to the new routine to preread the yacy.config only once. --- htroot/Settings_ServerAccess.inc | 8 +- locales/de.lng | 1 + .../net/yacy/http/Jetty8HttpServerImpl.java | 27 +++++- source/net/yacy/yacy.java | 96 +++++++++++++------ 4 files changed, 100 insertions(+), 32 deletions(-) diff --git a/htroot/Settings_ServerAccess.inc b/htroot/Settings_ServerAccess.inc index 88c504a8f..9779df954 100644 --- a/htroot/Settings_ServerAccess.inc +++ b/htroot/Settings_ServerAccess.inc @@ -3,13 +3,17 @@ - + + company's own web pages.
+ Filter have to be entered as IP, IP range or first part of allowed IP's separated by comma (e.g. 10.100.0-100.0-100, 127. ) + further details on format see Jetty + IPAccessHandler docu. +
IP-Number filter:
(requires restart)
Here you can restrict access to the server. By default, the access is not limited, because this function is needed to spawn the p2p index-sharing function. If you block access to your server (setting anything else than '*'), then you will also be blocked from using other peers' indexes for search service. However, blocking access may be correct in enterprise environments where you only want to index your - company's own web pages.