Access home server from same network

0

I have a old home PC on which I host some private git repos. I push/pull using ssh, which I set up on port 54345.

I also set up a dynamic DNS server (similar do dyndns.org) for accessing the PC from outside my network.

Leaving git apart for a second, I practically do this:

  • when I'm at home, I do ssh user@192.168... -p 54345 to access this PC
  • when I'm outside, I do ssh user@dynamic.address.com -p 54345

When I'm at home though, I'm not able to access my home PC through its external IP address, because that address is shared by all the computers in the house.

How am I supposed to access this computer in an uniform way?

(here's what I thought: by moving ssh to port 54345, it should be automatic to choose the computer I want to connect to when I ssh with -p 54345; but that doesn't seem to work).

Back to the git part, the point was all about: how can I access a computer in the same way from inside/outside the network?

Suppose I have a dyndns named dd.com: I want to connect to my self hosted http server with

http://dd.com:8080

from both inside and outside the network.

(Note: every port I mentioned in this question is open to the outside)

whatyouhide

Posted 2013-06-29T01:03:30.563

Reputation: 101

1This is normally something you'd set up with a combination of port forwarding on your firewall (to direct external queries to the right system) and a local DNS server (to direct names for your systems to their internal addresses instead of the external one). – Bradd Szonye – 2013-06-29T02:25:51.383

If 54345 and 8080 are being forwarded from your router, you should be able to access them using your public IP from whichever network you are connected on, as your router is doing ip forwarding. To access all ports on your linux pc in an uniform way, you might think about using that PC as a router... – diablo – 2013-06-30T06:21:39.120

No answers