2

I work in a company that installs CCTV, and with this we often have to do networking to allow remote viewing of these devices. One thing I have noticed is that when you are connected to the network (Via WIFI or LAN) you cant connect to the device using the external IP, so I've had to set the app to have 2 "Devices", one internal and one external. The internal connects directly to the internal IP of the device, and the external connects to the device via the public IP and forwarded ports.

My question is, is there a way to make it so that you can connect using the external IP even though you are connected to the internal network?

Clients want "simple" and there are a few that cant figure out that you use internal for when connected to the network and external for not, so i would like to simplify this to one button if its possible.

  • Unfortunately questions about networks over which have no control are explicitly off-topic. If your clients are giving you private addresses, there is nothing to be done since private addresses can't appear on the public Internet. It would be much less simple for a client to allow a public address into its network. – Ron Maupin Mar 2 '16 at 7:05
  • I have access to the network tho? the app they are using currently accesses the network from the public IP provided by the ISP. I just want to know if there is a way so that they can access the device on the app using the Public IP again provided by the ISP whilst connected to the said network – Matt Wilkinson Mar 2 '16 at 7:13
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 13 '17 at 19:02
2

What you are looking for is called "NAT Hairpin" or "NAT reflection" or "NAT loopback"

It may not be supported by the customer gateway, and the exact way to configure it depends of course of the box used as gateway.

Quoted from this article in Wikipedia

NAT loopback

NAT loopback, also known as NAT hairpinning or NAT reflection,[9] is a feature in many consumer routers[10] which permits the access of a service via the public IP address from inside the local network. This eliminates the need for using separate domain name resolution for hosts inside the network than for the public network for a website, for example.

The following describes an example network:

Public address: 203.0.113.1. This is the address of the WAN interface on the router.
Internal address of router: 192.168.1.1
Address of the server: 192.168.1.2
Address of a local computer: 192.168.1.100

If a packet is sent to the public address by a computer at 192.168.1.100, the packet would normally be routed to the default gateway (the router), unless an explicit route is set in the computer's routing tables. A router with the NAT loopback feature detects that 203.0.113.1 is the address of its WAN interface, and treats the packet as if coming from that interface. It determines the destination for that packet, based on DNAT (port forwarding) rules for the destination. If the data were sent to port 80 and a DNAT rule exists for port 80 directed to 192.168.1.2, then the host at that address receives the packet.

If no applicable DNAT rule is available, the router drops the packet. An ICMP Destination Unreachable reply may be sent. If any DNAT rules were present, address translation is still in effect; the router still rewrites the source IP address in the packet. The local computer (192.168.1.100) sends the packet as coming from 192.168.1.100, but the server (192.168.1.2) receives it as coming from 203.0.113.1. When the server replies, the process is identical as for an external sender. Thus, two-way communication is possible between hosts inside the LAN network via the public IP address.

  • Ahh i see what you mean, do you by chance know if its possible on a netcomm nb16wv-02 router at all? – Matt Wilkinson Mar 2 '16 at 7:49
  • after a quick glance at the doc, seems not. But this kind of device is off-topic here. – JFL Mar 2 '16 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.