大网数据广告活动
服务器运维问答

Redirect DNS requests with OpenWrt

· 52CE 我爱测

I've brought a wireless router to my office, because there's no free network socket near my place. Every normal computer that is connected via Ethernet cable normally gets an IP and DNS server addresses from the enterprise router…

问题原文

原帖链接 · Nikolai Kim · CC BY-SA 3.0

I've brought a wireless router to my office, because there's no free network socket near my place. Every normal computer that is connected via Ethernet cable normally gets an IP and DNS server addresses from the enterprise router by DHCP.

Our organization has some internal addresses that have their own URIs that are resolved by the local DNS server. Now I can access them by IP address, but not URI, as "the host is unknown".

In the DHCP and DNS section of LuCI (OpenWrt's webinterface) under the option DNS Forwardings I specified the addresses of enterprise DNS servers (they are static), but with no success.

How can I make OpenWrt forward all DNS requests that it can't resolve itself, to these enterprise servers, or just all DNS traffic to that servers?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 3.0

Don't bother with DNS forwarding, or with OpenWrt's internal DNS server, just serve the existing DNS servers to your DHCP clients directly. You can do this by setting DHCP option 6, which will be formatted in the web interface like:

6,192.168.32.35,192.168.48.35

You can access the relevant part of the web interface in LuCI by going through Network --> Interfaces --> LAN --> Scroll down to bottom --> "Advanced Settings" tab:

I also have to remind you to do this only with the explicit knowledge and approval of your company's network admin, IT department, etc.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-08-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。