Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a setup like follows

  1. I have a router that connects to the INTERNET, where my ISP provides dynamic ip
  2. two systems are connected to the router with locl ip 192.168.1.2 and 192.168.1.3
  3. the local ip of the router is 192.168.1.1

My question is how can I access the computer with ip 192.168.1.2 from the Internet when I know the ip assigned by the ISP

My Dlink router has a field for NAT which is as follows enter image description here

I have SSH enabled in the 192.168.1.2 system as well as the router. When I filled the entries in the NAT table and tries to connect to the 192.168.1.2 system it still connects to the router only

The values I gave re server name: 192.168.1.2 , protocol tcp and all other port values as ssh port 22. When I gave like that it showed message that router port moved to 2222, but that port is not open when i checked using nmap

share|improve this question

2 Answers 2

What you can do is set up your SSH on 192.168.1.2 to listen on another port. Usually, you do this by editing sshd.conf or sshd_config, say, port 1022.

And when you run ssh, do it like so,

ssh -p 1022 DynamicIP

where DynamicIP is the IP assigned by your ISP.

You need to set up your router to forward port 1022 to 192.168.1.2.

If you're on Windows, consider using putty as the SSH client.

share|improve this answer

Most of the time, Network Address Translations(NAT) is done internally by home routers. Your D-link router should be able to handle the translation automatically, however you need to open/forward the port number that the ssh-server is running on. If you have ssh-server running on a pc with netID 192.168.1.2:PortNumber, then you open the PortNumber coming in from Outside for ip 192.168.1.2. Check the specs for on your Dlink router for ways to accomplish port forwarding. As for fixing your dynamic IP address issue, you might want to use free services offered by no-ip, afraid etc ... so you can resolve your dynamic/changing ip address by using there free dns name.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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