Connection timed out for netcat after opening port in router












0















So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444.



Finally when I go on kali and, using my mobile data hotspot, I want to connect to my Windows. But when I try it doesn't work, and when I check ports using:



nc -vn HOSTNAME PORT


it says:




Connection timed out.




Could anyone help me please? I've already tried using netcat between the two PCs in the same network and it works perfectly, so I thinks it's a network problem. My router is an Asus DSL-N12E_C1.










share|improve this question

























  • Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?

    – user772515
    Feb 27 '18 at 0:21











  • Which version of nc you've got, can you paste it? And the exact output of the error?

    – kenorb
    Feb 27 '18 at 12:25











  • I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow?

    – Nils Magnus
    Feb 27 '18 at 12:27


















0















So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444.



Finally when I go on kali and, using my mobile data hotspot, I want to connect to my Windows. But when I try it doesn't work, and when I check ports using:



nc -vn HOSTNAME PORT


it says:




Connection timed out.




Could anyone help me please? I've already tried using netcat between the two PCs in the same network and it works perfectly, so I thinks it's a network problem. My router is an Asus DSL-N12E_C1.










share|improve this question

























  • Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?

    – user772515
    Feb 27 '18 at 0:21











  • Which version of nc you've got, can you paste it? And the exact output of the error?

    – kenorb
    Feb 27 '18 at 12:25











  • I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow?

    – Nils Magnus
    Feb 27 '18 at 12:27
















0












0








0








So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444.



Finally when I go on kali and, using my mobile data hotspot, I want to connect to my Windows. But when I try it doesn't work, and when I check ports using:



nc -vn HOSTNAME PORT


it says:




Connection timed out.




Could anyone help me please? I've already tried using netcat between the two PCs in the same network and it works perfectly, so I thinks it's a network problem. My router is an Asus DSL-N12E_C1.










share|improve this question
















So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444.



Finally when I go on kali and, using my mobile data hotspot, I want to connect to my Windows. But when I try it doesn't work, and when I check ports using:



nc -vn HOSTNAME PORT


it says:




Connection timed out.




Could anyone help me please? I've already tried using netcat between the two PCs in the same network and it works perfectly, so I thinks it's a network problem. My router is an Asus DSL-N12E_C1.







linux networking netcat






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 27 '18 at 12:23









kenorb

11.5k1580116




11.5k1580116










asked Feb 26 '18 at 21:20









Alex RilyAlex Rily

111




111













  • Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?

    – user772515
    Feb 27 '18 at 0:21











  • Which version of nc you've got, can you paste it? And the exact output of the error?

    – kenorb
    Feb 27 '18 at 12:25











  • I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow?

    – Nils Magnus
    Feb 27 '18 at 12:27





















  • Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?

    – user772515
    Feb 27 '18 at 0:21











  • Which version of nc you've got, can you paste it? And the exact output of the error?

    – kenorb
    Feb 27 '18 at 12:25











  • I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow?

    – Nils Magnus
    Feb 27 '18 at 12:27



















Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?

– user772515
Feb 27 '18 at 0:21





Yes, it's a network problem that means the port forwarding rules are incorrect or there's a problem with the router or the way you're trying to establish the connection. You know you'd need to use the public IP when accessing from outside, don't you?

– user772515
Feb 27 '18 at 0:21













Which version of nc you've got, can you paste it? And the exact output of the error?

– kenorb
Feb 27 '18 at 12:25





Which version of nc you've got, can you paste it? And the exact output of the error?

– kenorb
Feb 27 '18 at 12:25













I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow?

– Nils Magnus
Feb 27 '18 at 12:27







I don't understand your network setup: You have a home network connected with a router to the Internet (cable or ADSL), right? To this internal network is your Windows PC connected, right? How did you start the netcat-Listener? netcat -l -p 4444? How is your Kali connected to the Internet? How did you configure your portforwarding? Did you verify it somehow?

– Nils Magnus
Feb 27 '18 at 12:27












1 Answer
1






active

oldest

votes


















0















On Windows PC I've opened a netcat listener on port 4444.




Make sure your netcat binds and listens on all IP addresses, not only on localhost, e.g.



nc -v -l 0.0.0.0 4444


See: Netcat for Windows.



Then make sure you can connect to that port on the same machine. Then try remotely.






Then on my router I've opened port 4444.




Apart of opening the port, make sure that you've also forwarding that port into the right host like:




  • PUBLIC_ROUTER_IP:4444 <-> INTERNAL_WINDOWS_IP:4444




To connect to the remote port, run:



nc -v example.com 80


or use telnet command, e.g.



telnet PUBLICIP PORT




See also: Why is "nc -l xxxx" not opening a port?






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1298636%2fconnection-timed-out-for-netcat-after-opening-port-in-router%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0















    On Windows PC I've opened a netcat listener on port 4444.




    Make sure your netcat binds and listens on all IP addresses, not only on localhost, e.g.



    nc -v -l 0.0.0.0 4444


    See: Netcat for Windows.



    Then make sure you can connect to that port on the same machine. Then try remotely.






    Then on my router I've opened port 4444.




    Apart of opening the port, make sure that you've also forwarding that port into the right host like:




    • PUBLIC_ROUTER_IP:4444 <-> INTERNAL_WINDOWS_IP:4444




    To connect to the remote port, run:



    nc -v example.com 80


    or use telnet command, e.g.



    telnet PUBLICIP PORT




    See also: Why is "nc -l xxxx" not opening a port?






    share|improve this answer




























      0















      On Windows PC I've opened a netcat listener on port 4444.




      Make sure your netcat binds and listens on all IP addresses, not only on localhost, e.g.



      nc -v -l 0.0.0.0 4444


      See: Netcat for Windows.



      Then make sure you can connect to that port on the same machine. Then try remotely.






      Then on my router I've opened port 4444.




      Apart of opening the port, make sure that you've also forwarding that port into the right host like:




      • PUBLIC_ROUTER_IP:4444 <-> INTERNAL_WINDOWS_IP:4444




      To connect to the remote port, run:



      nc -v example.com 80


      or use telnet command, e.g.



      telnet PUBLICIP PORT




      See also: Why is "nc -l xxxx" not opening a port?






      share|improve this answer


























        0












        0








        0








        On Windows PC I've opened a netcat listener on port 4444.




        Make sure your netcat binds and listens on all IP addresses, not only on localhost, e.g.



        nc -v -l 0.0.0.0 4444


        See: Netcat for Windows.



        Then make sure you can connect to that port on the same machine. Then try remotely.






        Then on my router I've opened port 4444.




        Apart of opening the port, make sure that you've also forwarding that port into the right host like:




        • PUBLIC_ROUTER_IP:4444 <-> INTERNAL_WINDOWS_IP:4444




        To connect to the remote port, run:



        nc -v example.com 80


        or use telnet command, e.g.



        telnet PUBLICIP PORT




        See also: Why is "nc -l xxxx" not opening a port?






        share|improve this answer














        On Windows PC I've opened a netcat listener on port 4444.




        Make sure your netcat binds and listens on all IP addresses, not only on localhost, e.g.



        nc -v -l 0.0.0.0 4444


        See: Netcat for Windows.



        Then make sure you can connect to that port on the same machine. Then try remotely.






        Then on my router I've opened port 4444.




        Apart of opening the port, make sure that you've also forwarding that port into the right host like:




        • PUBLIC_ROUTER_IP:4444 <-> INTERNAL_WINDOWS_IP:4444




        To connect to the remote port, run:



        nc -v example.com 80


        or use telnet command, e.g.



        telnet PUBLICIP PORT




        See also: Why is "nc -l xxxx" not opening a port?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 27 '18 at 12:37









        kenorbkenorb

        11.5k1580116




        11.5k1580116






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1298636%2fconnection-timed-out-for-netcat-after-opening-port-in-router%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Terni

            A new problem with tex4ht and tikz

            Sun Ra