携帯電話からのリクエストを受け付ける


Apacheで携帯電話からのリクエストを受け付けるにはhttpd.confのlocationディレクティブで
各キャリアが公開しているIPアドレスを指定してあげればOKです。

各社が公開しているIPアドレスのページは以下の通りです。
ただし、更新されうるものなので、サイト構築時だけでなく定期的にチェックする必要があります。

http://www.nttdocomo.co.jp/service/imode/make/content/ip/index.html

http://au.kddi.com/ezfactory/tec/spec/ezsava_ip.html

http://developers.softbankmobile.co.jp/dp/tech_svc/web/ip.php

http://www.willcom-inc.com/ja/service/contents_service/club_air_edge/for_phone/ip/

以下、2007年12月末時点での各キャリア(Docomo,au,Softbank,willcom)が公開しているIPアドレスをもとに作成したhttpd.confの該当部分のサンプルです。

<location "/hoge/">
    Order deny,allow
    Deny from all
    Allow from 192.168.0
    Allow from 127.0.0.1
#     DoCoMo iMode
#     http://www.nttdocomo.co.jp/service/imode/make/content/ip/index.html
   Allow from 210.153.84.0/24
   Allow from 210.136.161.0/24
   Allow from 210.153.86.0/24
#     DoCoMo full browser
   Allow from 210.153.87.0/24
#     SoftBank
#     http://developers.softbankmobile.co.jp/dp/tech_svc/web/ip.php
   Allow from 123.108.236.0/24 
   Allow from 123.108.237.0/27 
   Allow from 202.179.204.0/24 
   Allow from 202.253.96.224/27 
   Allow from 210.146.7.192/26 
   Allow from 210.146.60.192/26 
   Allow from 210.151.9.128/26 
   Allow from 210.169.130.112/28 
   Allow from 210.175.1.128/25 
   Allow from 210.228.189.0/24 
   Allow from 211.8.159.128/25 
#     au
#     http://au.kddi.com/ezfactory/tec/spec/ezsava_ip.html
   Allow from 210.169.40.0/24 
   Allow from 210.196.3.192/26 
   Allow from 210.196.5.192/26 
   Allow from 210.230.128.0/24 
   Allow from 210.230.141.192/26 
   Allow from 210.234.105.32/29 
   Allow from 210.234.108.64/26 
   Allow from 210.251.1.192/26 
   Allow from 210.251.2.0/27 
   Allow from 211.5.1.0/24 
   Allow from 211.5.2.128/25 
   Allow from 211.5.7.0/24 
   Allow from 218.222.1.0/24 
   Allow from 61.117.0.0/24 
   Allow from 61.117.1.0/24 
   Allow from 61.117.2.0/26 
   Allow from 61.202.3.0/24 
   Allow from 219.108.158.0/26 
   Allow from 219.125.148.0/24 
   Allow from 222.5.63.0/24 
   Allow from 222.7.56.0/24 
   Allow from 222.5.62.128/25 
   Allow from 222.7.57.0/24 
   Allow from 59.135.38.128/25 
   Allow from 219.108.157.0/25 
   Allow from 219.125.151.128/25 
   Allow from 219.125.145.0/25 
   Allow from 121.111.231.0/25 
   Allow from 121.111.231.160/27
#     willcom
#     http://www.willcom-inc.com/ja/service/contents_service/club_air_edge/for_phone/ip/
   Allow from 61.198.142.0/24
   Allow from 219.108.14.0/24
   Allow from 61.198.161.0/24
   Allow from 219.108.0.0/24
   Allow from 61.198.249.0/24
   Allow from 219.108.1.0/24
   Allow from 61.198.250.0/24
   Allow from 219.108.2.0/24
   Allow from 61.198.253.0/24
   Allow from 219.108.3.0/24
   Allow from 61.198.254.0/24
   Allow from 219.108.4.0/24
   Allow from 61.198.255.0/24
   Allow from 219.108.5.0/24
   Allow from 61.204.3.0/25
   Allow from 219.108.6.0/24
   Allow from 61.204.4.0/24
   Allow from 221.119.0.0/24
   Allow from 61.204.6.0/25
   Allow from 221.119.1.0/24
   Allow from 125.28.4.0/24
   Allow from 221.119.2.0/24
   Allow from 125.28.5.0/24
   Allow from 221.119.3.0/24
   Allow from 125.28.6.0/24
   Allow from 221.119.4.0/24
   Allow from 125.28.7.0/24
   Allow from 221.119.5.0/24
   Allow from 125.28.8.0/24
   Allow from 221.119.6.0/24
   Allow from 211.18.235.0/24
   Allow from 221.119.7.0/24
   Allow from 211.18.238.0/24
   Allow from 221.119.8.0/24
   Allow from 211.18.239.0/24
   Allow from 221.119.9.0/24
   Allow from 125.28.11.0/24
   Allow from 125.28.13.0/24
   Allow from 125.28.12.0/24
   Allow from 125.28.14.0/24
   Allow from 125.28.2.0/24
   Allow from 125.28.3.0/24
   Allow from 211.18.232.0/24
   Allow from 211.18.233.0/24
   Allow from 211.18.236.0/24
   Allow from 211.18.237.0/24
   Allow from 125.28.0.0/24
   Allow from 125.28.1.0/24
   Allow from 61.204.0.0/24
   Allow from 210.168.246.0/24
   Allow from 210.168.247.0/24
   Allow from 219.108.7.0/24
   Allow from 61.204.2.0/24
   Allow from 61.204.5.0/24
   Allow from 61.198.129.0/24
   Allow from 61.198.140.0/24
   Allow from 61.198.141.0/24
   Allow from 125.28.15.0/24
   Allow from 61.198.165.0/24
   Allow from 61.198.166.0/24
   Allow from 61.198.168.0/24
   Allow from 61.198.169.0/24
   Allow from 61.198.170.0/24
   Allow from 61.198.248.0/24
   Allow from 125.28.16.0/24
   Allow from 125.28.17.0/24
   Allow from 211.18.234.0/24
   Allow from 219.108.8.0/24
   Allow from 219.108.9.0/24
   Allow from 219.108.10.0/24
   Allow from 61.198.138.100/32
   Allow from 61.198.138.101/32
   Allow from 61.198.138.102/32
   Allow from 61.198.139.160/28
   Allow from 61.198.139.128/27
   Allow from 61.198.138.103/32
   Allow from 61.198.139.0/29
   Allow from 219.108.15.0/24
   Allow from 61.198.130.0/24
   Allow from 61.198.163.0/24
</location>