Forward DNS Query Requests
This example demonstrates how to forward DNS query requests through simple configuration of UDP type proxy.
DNS query requests typically use the UDP protocol, and frp supports penetration of intranet UDP services, with configuration similar to TCP.
Steps
-
Configure frps.toml
Add the following content to the frps.toml file:
bindPort = 7000
-
Configure frpc.toml
Add the following content to the frpc.toml file:
serverAddr = "x.x.x.x" serverPort = 7000 [[proxies]] name = "dns" type = "udp" localIP = "8.8.8.8" localPort = 53 remotePort = 6000
Please note that this example reverse-proxies Google’s DNS query server address, which is only for testing UDP proxy and has no practical significance.
-
Start frps and frpc
Start frps and frpc respectively.
-
Test DNS Query Requests
Use the following command to test UDP packet forwarding with the
dig
tool, expecting to return the resolution result for thewww.baidu.com
domain:dig @x.x.x.x -p 6000 www.baidu.com