Hi all, Fairly new user here... I've got a server that sits on our LAN behind a SonicWall firewall. Our Dancer2 application is running on port 8080 and is being reverse proxied by Apache. Yuck, I know. So, I'd like to get the actual client's IP address for logging purposes. To test that, I've got these lines in my program: session->write("CLIENT_IP", request->remote_address); session->write("FORWARD_IP", request->header('x-forwarded-for')); session->write("REAL_IP", request->header('x-real-ip')); These tests were based on a few Google searches. What I find in my session is: (sanitized) CLIENT_IP: 127.0.0.1 FORWARD_IP: 98.101.x.y REAL_IP: ~ However, my address is 10.2.1.219. The 98.101.x.y address is our outward facing IP address on the SonicWall. The Apache config resembles: <Location "/Apps/"> ProxyPass "http://127.0.0.1:8080/Apps/" </Location> So, is what I'm wanting to do even possible in this configuration? If so, how? Thanks in advance, -- Mike Diehl
On 4/7/20 4:04 PM, Mike Diehl wrote:
Hi all,
Fairly new user here...
I've got a server that sits on our LAN behind a SonicWall firewall. Our Dancer2 application is running on port 8080 and is being reverse proxied by Apache.
Yuck, I know.
So, I'd like to get the actual client's IP address for logging purposes. To test that, I've got these lines in my program:
session->write("CLIENT_IP", request->remote_address);
session->write("FORWARD_IP", request->header('x-forwarded-for'));
session->write("REAL_IP", request->header('x-real-ip'));
These tests were based on a few Google searches.
What I find in my session is: (sanitized)
CLIENT_IP: 127.0.0.1
FORWARD_IP: 98.101.x.y
REAL_IP: ~
However, my address is 10.2.1.219. The 98.101.x.y address is our outward facing IP address on the SonicWall.
The Apache config resembles:
<Location "/Apps/">
ProxyPass "http://127.0.0.1:8080/Apps/"
</Location>
So, is what I'm wanting to do even possible in this configuration? If so, how?
Hello Mike, did you add behind_proxy to your configuration (https://metacpan.org/pod/Dancer2::Manual::Deployment#Running-stand-alone-beh...) ? Regards Racke
Thanks in advance,
--
Mike Diehl
_______________________________________________ dancer-users mailing list dancer-users@lists.preshweb.co.uk https://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. Provisioning with Ansible.
participants (2)
-
Mike Diehl -
Stefan Hornburg (Racke)