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

Can local-dns be bound on the local-tun interface address? #1674

Open
mklnz opened this issue Sep 27, 2024 · 1 comment
Open

Can local-dns be bound on the local-tun interface address? #1674

mklnz opened this issue Sep 27, 2024 · 1 comment

Comments

@mklnz
Copy link

mklnz commented Sep 27, 2024

Can local-dns be bound on the local-tun interface address?

I've tried:

    {
      "protocol": "tun",
      "tun_interface_address": "10.255.0.1/24",
    },
    {
      "protocol": "dns",
      "local_address": "10.255.0.1",
      "local_port": 53,
      "local_dns_address": "114.114.114.114",
      "local_dns_port": 53,
      "remote_dns_address": "1.1.1.1",
      "remote_dns_port": 53,
      "client_cache_size": 1024,
      "mode": "udp_only",
    }

But it does not seem to respond to DNS requests. Is there any other way to transparently handle DNS requests according to whether it is "local" or "remote"?

@mklnz mklnz changed the title Fake-dns & integration with local-tun? Can local-dns be bound on the local-tun interface address? Sep 27, 2024
@zonyitoo
Copy link
Collaborator

It won’t work currently, because in your route table, all packets sent to 10.255.0.1 are routed to the tun interface.

There should be a way to create DNS servers behind the tun interface, which handles TCP UDP packets and bypasses them to the DNS service. If anyone interested, please submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants