0

This question already has an answer here:

I created a Digital Ocean droplet recently, to learn how to make Django app. Eventually they say I should use Gunicorn to serve and Nginx to face the world, however, in very early stage of learning how to develop, I use Django to serve like this: python manage.py runserver 0:8000. In this way, I can access my test site on a browser in my local computer via the internet.

If I server python manage.py runserver, it would serve locally on the server (droplet) only, and since there is no interface there is no way to test my site visually except curl localhost:8000 but that is very inefficient to me as a beginner.

Last night, I was running the django server just like that and the server logs become strange, I have to turn it off:

Invalid HTTP_HOST header: 'www.freeproxies.ga:80'. You may need to add 'www.freeproxies.ga' to ALLOWED_HOSTS.
Bad Request: /www.freeproxies.ga:80
[01/Feb/2019 23:01:05] "CONNECT www.freeproxies.ga:80 HTTP/1.1" 400 60852
Invalid HTTP_HOST header: 'webcam02.dynv6.net:80'. You may need to add 'webcam02.dynv6.net' to ALLOWED_HOSTS.
Bad Request: /webcam02.dynv6.net:80
[01/Feb/2019 23:01:05] "CONNECT webcam02.dynv6.net:80 HTTP/1.1" 400 60852
Invalid HTTP_HOST header: 'freeproxies.gq:80'. You may need to add 'freeproxies.gq' to ALLOWED_HOSTS.
Bad Request: /freeproxies.gq:80
[01/Feb/2019 23:01:05] "CONNECT freeproxies.gq:80 HTTP/1.1" 400 60748
Invalid HTTP_HOST header: 'webcam02.dynv6.net'. You may need to add 'webcam02.dynv6.net' to ALLOWED_HOSTS.
Bad Request: /http:/webcam02.dynv6.net/myipha.php
[01/Feb/2019 23:01:06] "GET http://webcam02.dynv6.net/myipha.php?rnd=d1dbc4a3df9bce83b60eccef6e6858e5&rn=804905455 HTTP/1.1" 400 62028
[01/Feb/2019 23:01:26] code 400, message Bad request syntax ('\x04\x01\x00P¹Ñ\x17+\x00')
[01/Feb/2019 23:01:26] "P¹Ñ+" 400 -
[01/Feb/2019 23:01:46] code 400, message Bad request syntax ('\x04\x01\x00P\x90LR¦\x00')
[01/Feb/2019 23:01:46] "PLR¦" 400 -
[01/Feb/2019 23:02:06] code 400, message Bad request syntax ('\x04\x01\x00P\x90LR¦\x00')
[01/Feb/2019 23:02:06] "PLR¦" 400 -
[01/Feb/2019 23:02:26] code 400, message Bad request syntax ('\x05\x01\x00')
[01/Feb/2019 23:02:26] "" 400 -
[01/Feb/2019 23:02:46] code 400, message Bad request syntax ('\x05\x01\x00')
[01/Feb/2019 23:02:46] "" 400 -
[01/Feb/2019 23:03:06] code 400, message Bad request syntax ('\x05\x01\x00')
[01/Feb/2019 23:03:06] "" 400 -
[01/Feb/2019 23:03:26] code 400, message Bad request syntax ('\x04\x01\x00P\x00\x00\x00\x01\x00web1.crabdance.com\x00')
[01/Feb/2019 23:03:26] "Pweb1.crabdance.com" 400 -
[01/Feb/2019 23:03:46] code 400, message Bad request syntax ('\x04\x01\x00P\x00\x00\x00\x01\x00www.freeproxies.ga\x00')
[01/Feb/2019 23:03:46] "Pwww.freeproxies.ga" 400 -

I'm very new so any information is not trivial at all. What are these requests trying to do? They clearly do not want to authenticate. What are these freeproxies and webcam requests? Why?

I have ufw enable that allow OpenSSH and port 8000. I do not have CA so my link on the internet is http.

marked as duplicate by Steffen Ullrich, Community Feb 2 at 10:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Possible duplicate of NGINX Hacking Attempt - in short: somebody is scanning for open HTTP and SOCKS proxies. This is pretty normal if you run a server facing the wild wild internet. Nothing to worry about as long as your server is configured properly. – Steffen Ullrich Feb 2 at 9:27
  • It seems to request for a domain name that is not mine. Could it be that the domain name is associated with my current IP in the past? – Linh Chi Nguyen Feb 2 at 10:21
  • Again, these are attempts to use your server as a proxy. In this case the Host header will be the one of the final target and not your host. – Steffen Ullrich Feb 2 at 10:43

Browse other questions tagged or ask your own question.