ページへ戻る
印刷
XOOPS サイトの IPv6 対応の私的メモ
をテンプレートにして作成 ::
XOOPS マニア
UsersWiki
:nao-pon/blog/2017-02-14 をテンプレートにして作成
開始行:
#navi
RIGHT:&rsslink(../);
#boxdate
* XOOPS サイトの IPv6 対応の私的メモ
RIGHT:&tag(IPv6,XOOPS,Webサーバー);
hypweb.net の Web サーバーを IPv6 対応しました。
IPv6 でアクセスすると左上に IPv6 の文字が表示されます。
&ref(hypweb_IPv6.png);
しかし、XOOPS 固有の問題がありちょこちょこ修正しています。
このページはその私的メモで、随時更新していきます。
** 施した対策
- online テーブルの online_ip カラムの文字数拡張(39文字)
- protector モジュールの class/protector.php ip_match() ...
- protector モジュールの一般設定 信頼できる IP に ^::1$ ...
- protector モジュールの管理画面の BadIP のリストアップと...
- d3forum の posts テーブルの poster_ip, modifier_ip カラ...
- xpWiki モジュールの counter, tb テーブルの ip カラムの...
** ToDo
- protector の BadIP の登録で IPv6 のプレフィクス長を管理...
** 詳細メモ
*** class/protector.php ip_match()
#code(php,366-){{
function ip_match( $ips )
{
foreach( $ips as $ip => $info ) {
if( $ip ) {
$ip = strtolower($ip);
switch( substr( $ip , -1 ) ) {
case '.' :
case ':' :
// foward match
if( substr( @$_SERVER['REMOTE_ADDR'] , 0 , strlen( $...
$this->ip_matched_info = $info ;
return true ;
}
break ;
case '0' :
case '1' :
case '2' :
case '3' :
case '4' :
case '5' :
case '6' :
case '7' :
case '8' :
case '9' :
case 'a' :
case 'b' :
case 'c' :
case 'd' :
case 'e' :
case 'f' :
// full match
if( @$_SERVER['REMOTE_ADDR'] == $ip ) {
$this->ip_matched_info = $info ;
return true ;
}
break ;
default :
// perl regex
if( @preg_match( $ip , @$_SERVER['REMOTE_ADDR'] ) ) {
$this->ip_matched_info = $info ;
return true ;
}
break ;
}
}
}
$this->ip_matched_info = null ;
return false ;
}
}}
RIGHT:&font(90%){&page_comments;};
#navi
終了行:
#navi
RIGHT:&rsslink(../);
#boxdate
* XOOPS サイトの IPv6 対応の私的メモ
RIGHT:&tag(IPv6,XOOPS,Webサーバー);
hypweb.net の Web サーバーを IPv6 対応しました。
IPv6 でアクセスすると左上に IPv6 の文字が表示されます。
&ref(hypweb_IPv6.png);
しかし、XOOPS 固有の問題がありちょこちょこ修正しています。
このページはその私的メモで、随時更新していきます。
** 施した対策
- online テーブルの online_ip カラムの文字数拡張(39文字)
- protector モジュールの class/protector.php ip_match() ...
- protector モジュールの一般設定 信頼できる IP に ^::1$ ...
- protector モジュールの管理画面の BadIP のリストアップと...
- d3forum の posts テーブルの poster_ip, modifier_ip カラ...
- xpWiki モジュールの counter, tb テーブルの ip カラムの...
** ToDo
- protector の BadIP の登録で IPv6 のプレフィクス長を管理...
** 詳細メモ
*** class/protector.php ip_match()
#code(php,366-){{
function ip_match( $ips )
{
foreach( $ips as $ip => $info ) {
if( $ip ) {
$ip = strtolower($ip);
switch( substr( $ip , -1 ) ) {
case '.' :
case ':' :
// foward match
if( substr( @$_SERVER['REMOTE_ADDR'] , 0 , strlen( $...
$this->ip_matched_info = $info ;
return true ;
}
break ;
case '0' :
case '1' :
case '2' :
case '3' :
case '4' :
case '5' :
case '6' :
case '7' :
case '8' :
case '9' :
case 'a' :
case 'b' :
case 'c' :
case 'd' :
case 'e' :
case 'f' :
// full match
if( @$_SERVER['REMOTE_ADDR'] == $ip ) {
$this->ip_matched_info = $info ;
return true ;
}
break ;
default :
// perl regex
if( @preg_match( $ip , @$_SERVER['REMOTE_ADDR'] ) ) {
$this->ip_matched_info = $info ;
return true ;
}
break ;
}
}
}
$this->ip_matched_info = null ;
return false ;
}
}}
RIGHT:&font(90%){&page_comments;};
#navi
ページ名: