Web lists-archives.com

Re: Life getting to complicated?

On 22/04/2019 11:35, Lester Caine wrote:
initially it seemed that the port forwarding to make the web server appear on the static IP address was not working. It took three days and four different fault reports to BT and Netgear to establish that ACTUALLY port forwarding was working, it was just internally we could not now see the sites, externally they were working fine! BT's premium support was the first to even check after Netgear claimed the problem was obviously with the BT line :(

OK the problem was not the one reported, so now we need to know why the Netgear is not showing the local connections?

This aspect is not a PHP problem but a possible answer to it follows. First of all, for the avoidance of doubt, I understand from the above that this is correct:
(a) A local web server that is connected to the Internet via your domestic BT FTTC line.
(b) Your network is connected to the line via a Netgear router.
(c) The router is configured to do NAT and port forwarding/mapping to provide external public access to the web server via the public IP address (which works).
(d) And that you cannot access the web server from your internal network when accessing it via the external IP address or domain name.

If the above is correct then it's probably because the Netgear router is not doing "NAT loopback". When enabled, NAT loopback is where the router allows packets originating from the LAN to pass through and then come back in from the WAN side via the NAT public IP address.

Somewhere there should be an option to enable NAT loopback on the Netgear router.

There's a rather brief Netgear article about NAT loopback here: https://kb.netgear.com/000049578/NETGEAR-Router-support-for-NAT-Loopback

Fixing the Netgear so it can 'phone home' is obviously the real problem now, or is there some way of getting around that so that PHP can still work locally as happens with my non-PHP sites?

If you can't enable NAT loopback on the router then the alternative is to use the local LAN IP address of the web server in any PHP scripts instead of the domain/host name (which resolves to the public IP address).

Mark Rousell