Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid3 reverse proxy, client ip

    pfSense Packages
    3
    6
    2.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      deddric
      last edited by

      I´m running 2.1 and squid3 with a webserver on dmz, however i just get my internal dmz gw address, is there a way so i get the clients actuall ip in the apache logs instead of the gw.

      is that doable?

      /d

      1 Reply Last reply Reply Quote 0
      • D
        deddric
        last edited by

        Any ideas on this?

        i cant really think that people that are using this solution wont have correct client ips of the visitors.

        if this package cant do it, is there a package that can preserve client ip´s ?

        regards /d

        1 Reply Last reply Reply Quote 0
        • L
          louis-m
          last edited by

          are you on about the webserver apache log or the gateway squid log? never tried getting the squid log onto another server (apart from syslog)

          1 Reply Last reply Reply Quote 0
          • D
            deddric
            last edited by

            @louis-m:

            are you on about the webserver apache log or the gateway squid log? never tried getting the squid log onto another server (apart from syslog)

            Thank you for answering.

            I meen the apache log´s on the webserver which is on a dmz behind my pfsense box, all i get in apache log is
            10.10.10.1 - - [28/Dec/2012:20:49:46 +0100] "GET /favicon.ico HTTP/1.1" 404 479

            and i would like to get the client ip address in my apache server
            for instance
            123.123.123.123 - - [28/Dec/2012:20:49:46 +0100] "GET /favicon.ico HTTP/1.1" 404 479

            regards /d

            1 Reply Last reply Reply Quote 0
            • L
              louis-m
              last edited by

              as above, i've never tried it. possibly look at an ssh connection and then specify the squid log into the log directory of the web server? eg external_access_log
              as for appending it into the existing log file, i'm not sure if it can be done and if it could, you would have double entries eg one from the client and one from the gateway.
              there's more than likely someone on here that could shed more light on this but i'd be inclined to use a syslog etc

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                @deddric:

                i cant really think that people that are using this solution wont have correct client ips of the visitors.

                Most reverse proxies does it. You need to set a header var with x-forwarded-for or similiar to get it on web server and change it's log to include it.

                Take a look on http://httpd.apache.org/docs/2.2/mod/mod_proxy.html at Reverse Proxy Request Headers

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.