daphne always listening on 0.0.0.0

17 views
Skip to first unread message

Arnau Bria

unread,
Sep 14, 2021, 9:44:38 AM9/14/21
to Django users
Dear all,

I start daphne like:

bin/daphne \
  -b 127.0.0.1 -e ssl:8001:privateKey=/.../cert.pem:certKey=/opt.../privkey.pem \
  NewRweb.asgi:application

but daphne keeps listeinig on 0.0.0.0:

2021-09-13 13:39:45,785 daphne.cli   INFO     Starting server at ssl:8001:privateKey=/.../cert.pem:certKey=.../privkey.pem, tcp:port=8000:interface=127.0.0.1
2021-09-13 13:39:45,786 daphne.server INFO     HTTP/2 support not enabled (install the http2 and tls Twisted extras)
2021-09-13 13:39:45,786 daphne.server INFO     Configuring endpoint ssl:8001:privateKey=/.../cert.pem:certKey=/.../privkey.pem
2021-09-13 13:39:45,791 daphne.server INFO     Listening on TCP address 0.0.0.0:8001
2021-09-13 13:39:45,791 daphne.server INFO     Configuring endpoint tcp:port=8000:interface=127.0.0.1
2021-09-13 13:39:45,791 daphne.server INFO     Listening on TCP address 127.0.0.1:8000

and

# netstat -putan|grep 8001
tcp        0      0 0.0.0.0:8001            0.0.0.0:*               LISTEN      11161/python


how can I restrictc daphne to localhost?


my daphne version is 
python 3.8.2
daphne 3.0.1
channels 3.0.2

TIA,
Arnau

Reply all
Reply to author
Forward
0 new messages