Opening port not working

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











up vote
1
down vote

favorite












I have a python server running on port 8000 on a raspberry pi and would like to make it accessible within the local network, which is currently not working.



The interface wlan0 is configured with the IP 10.0.0.69 and netmask 255.255.255.0.



I can't reach the server within the local network (from a different host):



root@DESKTOP-Lukas:~# curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


I also can't reach the server from the raspberry pi:



lukas@raspberrypi:~ $ curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


The server is running and listening on port 8000:



lukas@raspberrypi:~ $ sudo netstat -tnlp | ack 8000
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


The server responds properly when using localhost:



lukas@raspberrypi:~ $ curl localhost:8000
<h1>Not Found</h1><p>The requested URL / was not found on this server.</p>


The firewall has allow actions for port 8000:



lukas@raspberrypi:~ $ sudo ufw status
Status: active

To Action From
-- ------ ----
...
8000 ALLOW Anywhere
8000/tcp ALLOW Anywhere
8000 (v6) ALLOW Anywhere (v6)
8000/tcp (v6) ALLOW Anywhere (v6)






share|improve this question



















  • You are not listening external inerface. You are listening (bound) to 172.0.0.1 (localhost). See "Local Address" column
    – user996142
    Apr 19 at 18:57






  • 1




    Who is the troll downvoting all questions here?
    – ajeh
    Apr 19 at 19:53










  • Sadly, it's unlikely they will reveal themselves.
    – DopeGhoti
    Apr 19 at 20:55














up vote
1
down vote

favorite












I have a python server running on port 8000 on a raspberry pi and would like to make it accessible within the local network, which is currently not working.



The interface wlan0 is configured with the IP 10.0.0.69 and netmask 255.255.255.0.



I can't reach the server within the local network (from a different host):



root@DESKTOP-Lukas:~# curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


I also can't reach the server from the raspberry pi:



lukas@raspberrypi:~ $ curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


The server is running and listening on port 8000:



lukas@raspberrypi:~ $ sudo netstat -tnlp | ack 8000
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


The server responds properly when using localhost:



lukas@raspberrypi:~ $ curl localhost:8000
<h1>Not Found</h1><p>The requested URL / was not found on this server.</p>


The firewall has allow actions for port 8000:



lukas@raspberrypi:~ $ sudo ufw status
Status: active

To Action From
-- ------ ----
...
8000 ALLOW Anywhere
8000/tcp ALLOW Anywhere
8000 (v6) ALLOW Anywhere (v6)
8000/tcp (v6) ALLOW Anywhere (v6)






share|improve this question



















  • You are not listening external inerface. You are listening (bound) to 172.0.0.1 (localhost). See "Local Address" column
    – user996142
    Apr 19 at 18:57






  • 1




    Who is the troll downvoting all questions here?
    – ajeh
    Apr 19 at 19:53










  • Sadly, it's unlikely they will reveal themselves.
    – DopeGhoti
    Apr 19 at 20:55












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a python server running on port 8000 on a raspberry pi and would like to make it accessible within the local network, which is currently not working.



The interface wlan0 is configured with the IP 10.0.0.69 and netmask 255.255.255.0.



I can't reach the server within the local network (from a different host):



root@DESKTOP-Lukas:~# curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


I also can't reach the server from the raspberry pi:



lukas@raspberrypi:~ $ curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


The server is running and listening on port 8000:



lukas@raspberrypi:~ $ sudo netstat -tnlp | ack 8000
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


The server responds properly when using localhost:



lukas@raspberrypi:~ $ curl localhost:8000
<h1>Not Found</h1><p>The requested URL / was not found on this server.</p>


The firewall has allow actions for port 8000:



lukas@raspberrypi:~ $ sudo ufw status
Status: active

To Action From
-- ------ ----
...
8000 ALLOW Anywhere
8000/tcp ALLOW Anywhere
8000 (v6) ALLOW Anywhere (v6)
8000/tcp (v6) ALLOW Anywhere (v6)






share|improve this question











I have a python server running on port 8000 on a raspberry pi and would like to make it accessible within the local network, which is currently not working.



The interface wlan0 is configured with the IP 10.0.0.69 and netmask 255.255.255.0.



I can't reach the server within the local network (from a different host):



root@DESKTOP-Lukas:~# curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


I also can't reach the server from the raspberry pi:



lukas@raspberrypi:~ $ curl http://10.0.0.69:8000
curl: (7) Failed to connect to 10.0.0.69 port 8000: Connection refused


The server is running and listening on port 8000:



lukas@raspberrypi:~ $ sudo netstat -tnlp | ack 8000
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


The server responds properly when using localhost:



lukas@raspberrypi:~ $ curl localhost:8000
<h1>Not Found</h1><p>The requested URL / was not found on this server.</p>


The firewall has allow actions for port 8000:



lukas@raspberrypi:~ $ sudo ufw status
Status: active

To Action From
-- ------ ----
...
8000 ALLOW Anywhere
8000/tcp ALLOW Anywhere
8000 (v6) ALLOW Anywhere (v6)
8000/tcp (v6) ALLOW Anywhere (v6)








share|improve this question










share|improve this question




share|improve this question









asked Apr 19 at 18:51









Lukas T

113




113











  • You are not listening external inerface. You are listening (bound) to 172.0.0.1 (localhost). See "Local Address" column
    – user996142
    Apr 19 at 18:57






  • 1




    Who is the troll downvoting all questions here?
    – ajeh
    Apr 19 at 19:53










  • Sadly, it's unlikely they will reveal themselves.
    – DopeGhoti
    Apr 19 at 20:55
















  • You are not listening external inerface. You are listening (bound) to 172.0.0.1 (localhost). See "Local Address" column
    – user996142
    Apr 19 at 18:57






  • 1




    Who is the troll downvoting all questions here?
    – ajeh
    Apr 19 at 19:53










  • Sadly, it's unlikely they will reveal themselves.
    – DopeGhoti
    Apr 19 at 20:55















You are not listening external inerface. You are listening (bound) to 172.0.0.1 (localhost). See "Local Address" column
– user996142
Apr 19 at 18:57




You are not listening external inerface. You are listening (bound) to 172.0.0.1 (localhost). See "Local Address" column
– user996142
Apr 19 at 18:57




1




1




Who is the troll downvoting all questions here?
– ajeh
Apr 19 at 19:53




Who is the troll downvoting all questions here?
– ajeh
Apr 19 at 19:53












Sadly, it's unlikely they will reveal themselves.
– DopeGhoti
Apr 19 at 20:55




Sadly, it's unlikely they will reveal themselves.
– DopeGhoti
Apr 19 at 20:55










1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










Your netstat output shows you the problem:



tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


Specifically, 127.0.0.1:8000 shows that your web server is bound only to the loopback address 127.0.0.1. You need to either bind it to the actual network interface or, more simply, bind it to all addresses (usually by specifying 0.0.0.0) and it will then be accessible by all other hosts with a route to your Pi.






share|improve this answer























    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f438798%2fopening-port-not-working%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
    4
    down vote



    accepted










    Your netstat output shows you the problem:



    tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


    Specifically, 127.0.0.1:8000 shows that your web server is bound only to the loopback address 127.0.0.1. You need to either bind it to the actual network interface or, more simply, bind it to all addresses (usually by specifying 0.0.0.0) and it will then be accessible by all other hosts with a route to your Pi.






    share|improve this answer



























      up vote
      4
      down vote



      accepted










      Your netstat output shows you the problem:



      tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


      Specifically, 127.0.0.1:8000 shows that your web server is bound only to the loopback address 127.0.0.1. You need to either bind it to the actual network interface or, more simply, bind it to all addresses (usually by specifying 0.0.0.0) and it will then be accessible by all other hosts with a route to your Pi.






      share|improve this answer

























        up vote
        4
        down vote



        accepted







        up vote
        4
        down vote



        accepted






        Your netstat output shows you the problem:



        tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


        Specifically, 127.0.0.1:8000 shows that your web server is bound only to the loopback address 127.0.0.1. You need to either bind it to the actual network interface or, more simply, bind it to all addresses (usually by specifying 0.0.0.0) and it will then be accessible by all other hosts with a route to your Pi.






        share|improve this answer















        Your netstat output shows you the problem:



        tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 743/python


        Specifically, 127.0.0.1:8000 shows that your web server is bound only to the loopback address 127.0.0.1. You need to either bind it to the actual network interface or, more simply, bind it to all addresses (usually by specifying 0.0.0.0) and it will then be accessible by all other hosts with a route to your Pi.







        share|improve this answer















        share|improve this answer



        share|improve this answer








        edited Apr 19 at 18:59


























        answered Apr 19 at 18:54









        DopeGhoti

        40k54779




        40k54779






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438798%2fopening-port-not-working%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay