Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The DNS server stops working every couple of hours #62

Closed
ElliottDCooper opened this issue Jun 14, 2023 · 8 comments
Closed

The DNS server stops working every couple of hours #62

ElliottDCooper opened this issue Jun 14, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@ElliottDCooper
Copy link

ElliottDCooper commented Jun 14, 2023

The DNS server stops working every couple of hours (does not respond to DNS queries) and it continues to work after a restart. Everything works properly after the restart.

I am using docker image ghcr.io/mosajjal/sniproxy:v2.0.3 with default configuration + domain acl. The log level is info and there is nothing in the logs (like no one sends any DNS queries).

@mosajjal
Copy link
Owner

been running sniproxy on my machine for a few hours with no issues. what are you using as upstream proxy? maybe change that to something like this as a test?

upstream_dns: udp://8.8.8.8:53

@ElliottDCooper
Copy link
Author

Thanks for replying.
Yes, I'm using udp://8.8.8.8:53. Actually, I haven't seen the issue in the last three days, but it was happening before. No config changed. Maybe because there was less load on the system in the last three days.

@ElliottDCooper
Copy link
Author

I used a script that performs a lot of DNS queries (like a query per 5ms for 5 minutes), and it happened again.
The CPU and memory usage are normal.

CONTAINER ID   NAME                          CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O        PIDS
xyz   sni-proxy-1       0.00%     5.438MiB / 1.883GiB   0.28%     328kB / 258kB     246kB / 8.19kB   5

Output of a sample dig:

$ dig @serverip google.com

; <<>> DiG 9.16.1-Ubuntu <<>> @serverip google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

@mosajjal mosajjal added the bug Something isn't working label Jun 17, 2023
@mosajjal
Copy link
Owner

I've made some changes in DNS (still work in progress) in #63, feel free to install it and see how that works. doesn't support DNS over SOCKS5 proxy though (for now).

go install github.com/mosajjal/sniproxy@f07c7f317a3634797ad6c5768e3a77fb905f6cb1

@ElliottDCooper
Copy link
Author

I switched to this version. I haven't tested yet.

@ElliottDCooper
Copy link
Author

ElliottDCooper commented Jul 22, 2023

Hi,
I used version f07c7f317a3634797ad6c5768e3a77fb905f6cb1, and it happened again. The DNS server stopped working and it continued to work after a docker restart.

dig's result when it's not working:

$ dig @serverip google.com
; <<>> DiG 9.16.1-Ubuntu <<>> @serverip google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

The server's log is kinda frozen too.

@almdandi
Copy link

almdandi commented Nov 2, 2023

I would like to add to this problem. I experienced today the same problem. I first tried to ask the dns server for google.com über nslookup from my windows pc. I did saw the dns traffic from my windows pc to the sniproxy but no outbound dns traffic ware made. I then checked if the docker host system can lookup domains, and dns worked. After that a spawned a bash shell in the container uns tried to make a http request with curl and this also worked. At last i just restarted the container and that solved the dns problem. I ran the sniproxy in DEBUG mode, so i can provide the log but there ware no errors in to logs. The only thing i noticed was the a missing INFO line in the logs INF dns.go:91 > returned origin address for fqdn google.com. and rtt 38.296349ms service=dns was missing. After the restart it showed up again.

@mosajjal
Copy link
Owner

I'll consider this issue closed due to the changes I've made to the proxy. if the problem still exists, please re-open the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants