[Dnsmasq-discuss] Need help on configuring dnsmasq

Matus UHLAR - fantomas uhlar at fantomas.sk
Mon May 8 08:50:11 UTC 2023


>On Monday, May 8th, 2023 at 1:49 PM, Monthly Posting <dnsmasq-discuss at lists.thekelleys.org.uk> wrote:
>> On Mon, May 08, 2023 at 03:45:29AM +0000, public1020 wrote:
>>
>> > I'm trying to use dnsmasq to hijack example.com, but not
>> > api.example.com, so I used the following configuration:
>> > address=/example.com/192.168.1.10
>> >
>> > However, dnsmasq also hijacks *.example.com to this IP address.
>> > Now how can I hijack only the specific address with dnsmasq?

>> Play with two changes in the configuration:
>>
>> api.example.com=valid_address
>> example.com=hijack_address
>>
>> See manual page for actual syntax.
>> Karma bonus points for sharing what works.

On 08.05.23 06:23, public1020 via Dnsmasq-discuss wrote:
>I want dnsmasq to do exact match, e.g "address=/example.com/IP" should only match example.com, not *.example.com.
>
>Does dnsmasq support that?

it does and the answer is listed in dnsmasq manual page, just where you 
would search for it:

-A, --address=/<domain>[/<domain>...]/[<ipaddr>]


... Note that /etc/hosts and DHCP leases override this for individual names.



-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
You have the right to remain silent. Anything you say will be misquoted,
then used against you.



More information about the Dnsmasq-discuss mailing list