diff options
-rw-r--r-- | erlaubteAdressen | 9 | ||||
-rw-r--r-- | mirror.php | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/erlaubteAdressen b/erlaubteAdressen index 863c183..84be984 100644 --- a/erlaubteAdressen +++ b/erlaubteAdressen @@ -1,7 +1,8 @@ 127.0.0.1 192.168.0.12 192.168.0.15 -2a02:2450:115a:96:f160:717f:45f8:6c60 -2a02:2450:115a:96:6f45:5c80:9478:d966 -2a02:2450:115a:96:339f:29fb:8919:bd49 -2a02:2450:115a:96:2a34:fedf:2f75:a69d +x:x:x:x:2a34:fedf:2f75:a69d +x:x:x:x:339f:29fb:8919:bd49 +x:x:x:x:6f45:5c80:9478:d966 +x:x:x:x:f160:717f:45f8:6c60 +x:x:x:x:5454:5ff:fe3a:d954 @@ -19,6 +19,15 @@ $ea = fopen($wurzel."erlaubteAdressen","r"); while (! feof($ea)) { $zeile = trim(fgets($ea)); + if ((strpos($zeile,"x:")!==false) && + (strpos($_SERVER["SERVER_ADDR"],":")!==false)) { + $zeile = explode(":",$zeile); + $my_addr = explode(":",$_SERVER["SERVER_ADDR"]); + foreach ($zeile as $key => $val) + if ($val=="x") + $zeile[$key]=$my_addr[$key]; + $zeile = implode(":",$zeile); + } if ($zeile == $_SERVER["REMOTE_ADDR"]) break; } |