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

Squid3 reverse proxy, client ip

Scheduled Pinned Locked Moved pfSense Packages
6 Posts 3 Posters 2.4k Views
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 Dec 28, 2012, 3:01 PM

    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 Dec 29, 2012, 11:02 AM

      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 Dec 29, 2012, 12:11 PM

        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 Dec 29, 2012, 1:08 PM

          @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 Dec 29, 2012, 3:02 PM

            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
            • M
              marcelloc
              last edited by Dec 30, 2012, 1:20 PM

              @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
              3 out of 6
              • First post
                3/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received