0

I can SSH via local network.

nmap -p <ssh_port> 192.168.1.xx => <ssh_port> open

But I can't SSH over the internet even port forwarded.

nmap -p <ssh_port> xxxx.duckdns.org or <public_ip> => <ssh_port> closed

And I also have another port forwarding to and it work find over the internet.

nmap -p <cctv_port> xxxx.duckdns.org or <public_ip> => <cctv_port> open

How do I check what is the problems (my ubuntu, router, duckdns or ISP) ? and How to fix it ?

Update1:

  • I contact to my ISP and thay told they doesn't block any ports.
  • Now I try using python3 -m http.server 8181 and do port forward but can't access from outside too.
  • 1
    Some ISP block some common ports. You may try to change to use other ports. – Lok Lam Cheng Apr 21 '18 at 6:17
  • I also try some other ports but still closed. – PoundXI Apr 21 '18 at 6:20
  • Now I try to use SSH port with working cctv_port. But port not open. – PoundXI Apr 21 '18 at 6:22
  • 1
    seems problem at router, if ssh working fine within LAN. – Lok Lam Cheng Apr 21 '18 at 6:25
  • 1
    Are you trying from inside your own network, to the external address? Not all routers support hairpinning. Try from outside your network, or get a friend to try for you. – vidarlo Apr 21 '18 at 8:47
0

The problem is I configured port forwarding wrong. On some huawei router (eg. HG8247H) you need to set external ports mapping to the internal ports, But I forgot to set external ports for some rules.

It's makes my router wrong port mapping behavier. (eg. client request access to port xxx, but client get access to port yyy that is on a previous rules)

I fixed it by add external port on each rules.

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.