8800NL: Internal machines IP

Discussions for BiPAC 8800 series: 8800NL, 8800NLR2, 8800AXL, 8800AXLR2
Post Reply
MysteryFCM
Posts: 19
Joined: Mon Nov 03, 2014 2:21 am

8800NL: Internal machines IP

Post by MysteryFCM »

Any idea why the machines inside the network would start showing as the routers IP (e.g. scripts using REMOTE_ADDR) instead of their actual IP? (can't for the life of me, find a setting in the router to correct that)

Example:

- Router has 192.168.0.1
- Machine has 192.168.0.5*
- ipconfig /all shows machine as 192.168.0.5
- Intranet uses PHP and uses the following to ID machines connecting to it and 192.168.0.5 connects to the site for whatever reason;

Code: Select all

<?php $sIP = $_SERVER['REMOTE_ADDR']; echo $sIP; ?>
- $sIP returns 192.168.0.1 instead of 192.168.0.5

* Obviously, whether this is statically assigned or DHCP is irrelevant.

I know the above is a stupid example, but it's the only one that popped into my head (not had enough coffee yet)
killsta
Posts: 11
Joined: Sun May 24, 2015 12:50 pm

Re: 8800NL: Internal machines IP

Post by killsta »

This usually happens when you're connecting to your webserver via the router's public IP, especially if you have a domain name associated to your public IP and you're accessing your webserver via the domain. Essentially your internal PC will be passing through the router's WAN before being forwarded to the local LAN IP of the webserver.

Have you tried accessing the webserver via it's local IP directly, I.e. http://192.168.0.X? Your PHP REMOTE_ADDR function should then show the machine's LAN IP, rather than the router's WAN IP.
MysteryFCM
Posts: 19
Joined: Mon Nov 03, 2014 2:21 am

Re: 8800NL: Internal machines IP

Post by MysteryFCM »

I'm already aware of that, but cheers (I've got a few servers here, and all traffic passes through a gateway (WAN -> Gateway -> Servers)).

Previously, the correct IP was being used, not sure at this point why that would've changed (don't recall changing any of the config of the router, nor have the servers/machines been changed)
Post Reply