You are not logged in.

#1 2016-07-04 23:05:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Apache access logs show the IP of my router not of the traffic

I am seeing the IP of the router (192.168.1.1) as the first column of /var/log/httpd/access_log when I browse into my apache server from an external IP.  Is there a module I need to enable to have the actual IP reported?

EDIT: Interestingly, if I connect from my LTE phone, I do see an external IP in the logs, but if I browse to my domainname from my laptop (wifi), the reported IP is not my WAN IP but my router IP.  Is this the expected behavior?

Last edited by graysky (2016-07-04 23:21:27)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2016-07-05 12:19:21

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Re: Apache access logs show the IP of my router not of the traffic

It depends on your network configuration. In general when you connect from outside of your network you should see external IP inside logfile. When connecting from LAN (via Wifi for example) you should see router's external IP if you don't have any internal DNS. Router's internal IP is rather not expected and suggests strange NAT rules.


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#3 2016-07-06 06:46:23

severach
Member
Registered: 2015-05-23
Posts: 192

Re: Apache access logs show the IP of my router not of the traffic

Some routers can NAT port mapped incomming connections. This feature can be used to quickly solve gateway and multi homing problems until time can be devoted to fixing the endpoints.

Offline

Board footer

Powered by FluxBB