Squid3 reverse proxy, client ip



  • 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



  • 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



  • 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)



  • @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



  • 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



  • @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


Locked