Configuring DNS spoofing
DNS spoofing is effective only when:
The DNS proxy is enabled on the device.
No DNS server or route to any DNS server is specified on the device.
Follow these guidelines when you configure DNS spoofing:
You can configure only one replied IPv4 address and one replied IPv6 address. If you use the command multiple times, the most recent configuration takes effect.
After DNS spoofing takes effect, the device spoofs a DNS request even though a matching static DNS entry exists.
To configure DNS spoofing:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enable DNS proxy. | dns proxy enable | By default, DNS proxy is disabled. |
3. Enable DNS spoofing and specify the IP address used to spoof DNS requests. |
| By default, DNS spoofing is disabled. You can specify both an IPv4 address and an IPv6 address. |