2

As it it sates in title.

Every router I had couldn't connect back to itself over Internet, for example:

  1. I open forward port 22 for ssh on my PC.
  2. I try to connect to that ssh with other PC in same network, with ssh user@my.public.ip but I get refused by router
  3. I can connect from other network (other public IP) just fine, with same ssh user@my.public.ip

Is that just my bad luck with routers or there is something behind it?

Thanks

  • 1
    If your router doesn't support it, then a workaround is to use a DNS entry for external that you replicate in your hosts file or internal DNS. So externally it resolves to the public address and internally resolves to the internal address. – Paul Jul 26 '13 at 0:32
6

You'll need a router that supports loop back functionality.

Many DSL routers/modems prevent loopback connections as a security feature. This means that a machine on your local network (e.g. behind your DSL router/modem) cannot connect to a forward facing IP address (such as 199.149.252.44) of a machine that it also on your local network. Connecting to the local IP address (such as 192.168.2.40) of that same machine works fine.

Source: http://opensimulator.org/wiki/NAT_Loopback_Routers

This thread over at sec discusses security implications (or lack thereof): https://security.stackexchange.com/questions/16343/is-nat-loopback-on-my-router-a-security-problem

  • 1
    Or a router that supports being reflashed with linux/bsd firmware. Linux can do lookback fine. – Zoredache Jul 26 '13 at 0:29
  • What are the adverse security implications of a NAT loopback router? – Ярослав Рахматуллин Jul 26 '13 at 3:35
  • @Ярослав Рахматуллин : I've added a security link to my answer – Brian Adkins Jul 26 '13 at 11:47

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.