Cannot SSH over the internet even port forwarded

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












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.






share|improve this question


















  • 1




    Some ISP block some common ports. You may try to change to use other ports.
    – Lok Lam Cheng
    Apr 21 at 6:17










  • I also try some other ports but still closed.
    – PoundXI
    Apr 21 at 6:20










  • Now I try to use SSH port with working cctv_port. But port not open.
    – PoundXI
    Apr 21 at 6:22






  • 1




    seems problem at router, if ssh working fine within LAN.
    – Lok Lam Cheng
    Apr 21 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 at 8:47














up vote
0
down vote

favorite












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.






share|improve this question


















  • 1




    Some ISP block some common ports. You may try to change to use other ports.
    – Lok Lam Cheng
    Apr 21 at 6:17










  • I also try some other ports but still closed.
    – PoundXI
    Apr 21 at 6:20










  • Now I try to use SSH port with working cctv_port. But port not open.
    – PoundXI
    Apr 21 at 6:22






  • 1




    seems problem at router, if ssh working fine within LAN.
    – Lok Lam Cheng
    Apr 21 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 at 8:47












up vote
0
down vote

favorite









up vote
0
down vote

favorite











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.






share|improve this question














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.








share|improve this question













share|improve this question




share|improve this question








edited Apr 21 at 14:00

























asked Apr 21 at 6:07









PoundXI

204




204







  • 1




    Some ISP block some common ports. You may try to change to use other ports.
    – Lok Lam Cheng
    Apr 21 at 6:17










  • I also try some other ports but still closed.
    – PoundXI
    Apr 21 at 6:20










  • Now I try to use SSH port with working cctv_port. But port not open.
    – PoundXI
    Apr 21 at 6:22






  • 1




    seems problem at router, if ssh working fine within LAN.
    – Lok Lam Cheng
    Apr 21 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 at 8:47












  • 1




    Some ISP block some common ports. You may try to change to use other ports.
    – Lok Lam Cheng
    Apr 21 at 6:17










  • I also try some other ports but still closed.
    – PoundXI
    Apr 21 at 6:20










  • Now I try to use SSH port with working cctv_port. But port not open.
    – PoundXI
    Apr 21 at 6:22






  • 1




    seems problem at router, if ssh working fine within LAN.
    – Lok Lam Cheng
    Apr 21 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 at 8:47







1




1




Some ISP block some common ports. You may try to change to use other ports.
– Lok Lam Cheng
Apr 21 at 6:17




Some ISP block some common ports. You may try to change to use other ports.
– Lok Lam Cheng
Apr 21 at 6:17












I also try some other ports but still closed.
– PoundXI
Apr 21 at 6:20




I also try some other ports but still closed.
– PoundXI
Apr 21 at 6:20












Now I try to use SSH port with working cctv_port. But port not open.
– PoundXI
Apr 21 at 6:22




Now I try to use SSH port with working cctv_port. But port not open.
– PoundXI
Apr 21 at 6:22




1




1




seems problem at router, if ssh working fine within LAN.
– Lok Lam Cheng
Apr 21 at 6:25




seems problem at router, if ssh working fine within LAN.
– Lok Lam Cheng
Apr 21 at 6:25




1




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 at 8:47




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 at 8:47










1 Answer
1






active

oldest

votes

















up vote
0
down vote













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.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026861%2fcannot-ssh-over-the-internet-even-port-forwarded%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    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.






    share|improve this answer


























      up vote
      0
      down vote













      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.






      share|improve this answer
























        up vote
        0
        down vote










        up vote
        0
        down vote









        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.






        share|improve this answer














        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.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 27 at 15:53

























        answered Apr 27 at 7:20









        PoundXI

        204




        204



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026861%2fcannot-ssh-over-the-internet-even-port-forwarded%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491