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

DNS forward error #368

Closed
wellsgz opened this issue Jan 14, 2020 · 8 comments
Closed

DNS forward error #368

wellsgz opened this issue Jan 14, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@wellsgz
Copy link

wellsgz commented Jan 14, 2020

Describe the bug
DNS forward will result query error,

;; Warning: ID mismatch: expected ID 40089, got 5635
;; Warning: query response not set

To Reproduce
Steps to reproduce the behavior:

  1. Forward client dns port to local
  2. try to resolve FQDN w/ dig or nslookup

Expected behavior
UDP forwarding shall work regardless of layer 7 protocol

Screenshots or logs

aa@bb:~$ sudo netstat -tunpl | grep 53
udp6       0      0 :::53                   :::*                                27464/nps
aa@bb:~$ dig www.google.com @127.0.0.1
;; Warning: ID mismatch: expected ID 13324, got 5635
;; Warning: query response not set

Server (please complete the following information):

  • OS: [Arch]
  • ARCH: [Debian 10]
  • Tunnel [UDP]
  • Version [0.26.0]

Client (please complete the following information):

  • OS: [Arch]
  • ARCH: [Amd64]
  • Tunnel [UDP]
  • Version [0.26.0]
@wellsgz wellsgz added the bug Something isn't working label Jan 14, 2020
@cnlh
Copy link
Collaborator

cnlh commented Jan 14, 2020

image
image
Uploading image.png…

[root@iZj6c7blu2y24upo5ku332Z tmp]# netstat -tunpl | grep 53
udp6 0 0 :::53 :::* 9430/nps

你是否进行了正确的dns服务器设置?

@wellsgz
Copy link
Author

wellsgz commented Jan 14, 2020

我可以确认DNS服务在客户端(内网节点)的设置是正确的,实际上我在从frp迁移到nps,同样的dns服务通过frp转发是可以工作的.

我在测试时发现DNS请求好像服务端收到了DNS请求,然而并没有被转发到客户端(内网节点),附上我的配置供参考.

image

image

@cnlh
Copy link
Collaborator

cnlh commented Jan 15, 2020 via email

@cnlh
Copy link
Collaborator

cnlh commented Jan 15, 2020

我可以确认DNS服务在客户端(内网节点)的设置是正确的,实际上我在从frp迁移到nps,同样的dns服务通过frp转发是可以工作的.

我在测试时发现DNS请求好像服务端收到了DNS请求,然而并没有被转发到客户端(内网节点),附上我的配置供参考.

image

image

另外贴一下客户端日志

@cnlh
Copy link
Collaborator

cnlh commented Jan 15, 2020

我可以确认DNS服务在客户端(内网节点)的设置是正确的,实际上我在从frp迁移到nps,同样的dns服务通过frp转发是可以工作的.

我在测试时发现DNS请求好像服务端收到了DNS请求,然而并没有被转发到客户端(内网节点),附上我的配置供参考.

image

image

另外麻烦将目标设置为114之类的dns测试下

@wellsgz
Copy link
Author

wellsgz commented Jan 15, 2020

我可以确认DNS服务在客户端(内网节点)的设置是正确的,实际上我在从frp迁移到nps,同样的dns服务通过frp转发是可以工作的.
我在测试时发现DNS请求好像服务端收到了DNS请求,然而并没有被转发到客户端(内网节点),附上我的配置供参考.
image
image

另外麻烦将目标设置为114之类的dns测试下

不好意思非常抱歉我发现Arch是有default第的iptable rules没在INPUT chain放DNS,给您带来不必要的麻烦了

@cnlh
Copy link
Collaborator

cnlh commented Jan 15, 2020

ok 后续有问题再继续沟通

@cnlh cnlh closed this as completed Jan 15, 2020
@wellsgz
Copy link
Author

wellsgz commented Jan 15, 2020

不好意思又要麻烦亲了,我在修正了iptables之后测试仍然发现有问题,附上测试的日志如下:

通过日志可以看到服务端(nps)有转发到UDP报文到客户端(npc),客户端(npc)也有收到报文,然而好像报文被进程/内核丢弃了并没有转发到目的端口(这个时候在dns服务看不到query request)

image

cnlh added a commit that referenced this issue Jan 15, 2020
cnlh added a commit that referenced this issue Feb 12, 2020
kiririx pushed a commit to kiririx/nps that referenced this issue Jul 26, 2022
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

2 participants