Announcement

Collapse
No announcement yet.

CloudFlare and IP Address

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Answered] CloudFlare and IP Address

    Hi everybody,

    ​

    ​

    ​I need help getting my vBulletin 4.2.1 to show the real IP Addresses instead of my host IP (CloudFlare Partner). I have tried to use a plugin on vBulletin.org called Proxy to Real IP I think it only worked for a day, or maybe never but not working at all now. Please help
    Last edited by M.Rizk; Wed 8th May '13, 3:31am.

  • #2
    Edit your config.php file in the includes folder, check the "reverse proxy IP" section.
    Gentoo Geek

    Comment


    • #3
      I tried everything but nothing working.

      I added this to the top of config.php:
      $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"] ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"];

      I also edited the part you mentioned to:
      /* #### Reverse Proxy IP ####
      If your use a system where the main IP address passed to vBulletin is the address of a proxy server
      and the actual 'real' ip address is passed in another http header then you enter the details here */

      /* Enter your known [trusted] proxy servers here. You can list multiple trusted IPs separated by a comma.*/
      //$config['Misc']['proxyiplist'] = '127.0.0.1, 75.98.175.8, 204.93.240.0, 204.93.177.0, 199.27.128.0, 173.245.48.0, 103.21.244.0, 103.22.200.0, 103.31.4.0, 141.101.64.0, 108.162.192.0, 190.93.240.0, 188.114.96.0, 197.234.240.0, 198.41.128.0';

      /* If the real IP is passed in a http header variable other than HTTP_X_FORWARDED_FOR, then you can set the name here; */
      //$config['Misc']['proxyipheader'] = 'HTTP_CF_CONNECTING_IP';

      Comment


      • #4
        Remove the // in front of the $config['Misc']['proxyiplist'] and $config['Misc']['proxyipheader']. // means ignore this line.



        In the long run, you will probably need to have mod_cloudflare installed in your primary hosting company's Apache.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          Originally posted by Wayne Luke View Post
          Remove the // in front of the $config['Misc']['proxyiplist'] and $config['Misc']['proxyipheader']. // means ignore this line.







          In the long run, you will probably need to have mod_cloudflare installed in your primary hosting company's Apache.


          Yes now it works fine! Thanks.



          * I am sorry but my PHP knowledge is not that good

          Comment


          • #6
            https://www.cloudflare.com/ips
            https://www.cloudflare.com/ips-v4

            This list should be copy paste-able in proxyiplist but it isn't now because the code doesn't take CIDR in to consideration.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X