Opening port not working
Clash 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)
networking python curl ufw port
add a comment |Â
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)
networking python curl ufw port
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
add a comment |Â
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)
networking python curl ufw port
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)
networking python curl ufw port
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
add a comment |Â
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
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
edited Apr 19 at 18:59
answered Apr 19 at 18:54
DopeGhoti
40k54779
40k54779
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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