1

Update It's working actually, I had to adjust my local IP address, which is constantly changing. So sorry for the inconvenience.


I can ssh to my computer1 from my computer2 on my local network, using my local IP:

ssh user@192.168.1.5

However, I want to ssh from outside my home, using my public IP:

ssh user@113.174.34.171

I have access to my router (ZTE F600W) configuration but obviously can’t make port forwarding right.

I tried different things and reboot the router like 10 times already.


enter image description here


enter image description here


The firewall on my computer is disabled. Is there something else I can possibly check?


Edit

As suggested by @Enrico Polesel, I stabilized my local IP on my computer manually, instead of getting one automatically via DHCP.

Network setting on the computer

It seems to work so far.

Now the last improvement I can make is using a dynamic IP service because my public IP is dynamic.


I'm using the service "my.noip.com" and it works fine.

enter image description here

Now I can ssh to my computer with the same hostname, and everything is handled correctly to my computer :-)

5
  • In your ssh command example up top you have the IP address listed as 192.168.0.5 but in your router configuration you have the port forwarding setup to go to IP address 192.168.1.5. Is that IP address in your first command in the post just a typo as you wrote out your question, or is that disparity the root of your problem? – n8te Dec 22 '18 at 5:29
  • @n8te Good catch, I made a typo in my first command (I just corrected it). – Yoric Dec 22 '18 at 5:34
  • Have you confirmed your public IP really is what you think it is by using whatsmyip? That’s a weird network setup you’re showing. – Appleoddity Dec 22 '18 at 5:35
  • @Appleoddity I used https://www.whatismyip.com to confirm my public IP (Your IPv4 is: 113.174.34.171). What is weird, the router interface, or the data I'm filling in? – Yoric Dec 22 '18 at 5:40
  • I'm sorry, it's actually working. Since my machine is constantly changing its local IP address (192.168.1.5 or 192.168.1.4 or 192.168.1.3 or 192.168.1.2) I had to adjust it accordingly. So sorry for the inconvenience. Thank you so much for your attention anyway, it still helped me a lot! – Yoric Dec 22 '18 at 5:54
1

If now your problem is that you PC IP is constantly changing you can reserve one address for your PC from your router DHCP configuration (you'll save the association between the MAC address and the IP and the DHCP server will always give that IP to your PC).

Another way to "stabilize" the PC ip would be to configure it as a static IP on the PC (but be careful to choose an address outside the DHCP pool of your router. This solution may be the easiest, but every time you move your PC to other networks you'd have to change the IP configuration.

1
  • Yes that's a great idea. I'm trying to associate my MAC address with my local IP now... So that I won't get a "random" IP every time the machine reboot. I'll write here if I succeeded or not. – Yoric Dec 22 '18 at 11:14

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.