Connecting to my own network via external IP

2

Even though I have seen and read quite a few similar Q's I was still unable to understand what is required for me to be able to do this.

I have an internal network. One of the machines is a web server. The router is configured for NAT redirecting a specific port to to that machine.

A public domain name is configured using dynamic DNS to point to my external address.

So incoming communication hits the router from its WAN interface and gets pointed to the internal server on the right port.

But if I try to use my public domain name from another machine within my network if fails to be redirected to the server.


In a way I would like that the same NAT rules would apply not only to incoming traffic but to outgoing (sort-of) traffic and have it sent back to the right server.

Assuming this helps, my router (D-Link DSL-2760U) does support static routing, but I am not sure how to configure it. It has the following parameters:

  • IP Version
  • DstIP/PrefixLength
  • Gateway Interface
  • Metric

epeleg

Posted 2012-03-02T09:53:02.670

Reputation: 457

1You need a router that supports hairpin NAT. – David Schwartz – 2012-03-02T11:16:44.663

can't this be done with my own router? is it not possible to use plain static routing for this? I just care about the IP being directed to the required destination not the port. – epeleg – 2012-03-02T16:19:10.373

1It's hairpin NAT, either the router supports it or it doesn't. Most only support WAN-to-LAN and LAN-to-WAN NAT. LAN-to-LAN is an unusual requirement and frequently not supported. – David Schwartz – 2012-03-02T16:24:09.803

Answers

2

It's hairpin NAT, either the router supports it or it doesn't. Most only support WAN-to-LAN and LAN-to-WAN NAT. LAN-to-LAN is an unusual requirement (for a SoHo router) and frequently not supported.

David Schwartz

Posted 2012-03-02T09:53:02.670

Reputation: 58 310

1since my own router does not seem to support this feature I ended up using a hosts file. – epeleg – 2012-03-06T08:39:24.830