Configuring DNS spoofing

Restrictions and guidelines

Prerequisites

The DNS proxy is enabled on the device.

No DNS server or route to any DNS server is specified on the device.

Procedure

  1. Enter system view.

    system-view

  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. Choose one option as needed:

    IPv4:

    dns spoofing ip-address [ vpn-instance vpn-instance-name ]

    IPv6:

    ipv6 dns spoofing ipv6-address [ vpn-instance vpn-instance-name ]

    By default, DNS spoofing is disabled.