• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Dnsmasq domain overrides import from url or use alias? or command line edit?

Scheduled Pinned Locked Moved DHCP and DNS
3 Posts 3 Posters 936 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z
    znerol_1
    last edited by Jan 25, 2014, 5:24 AM

    Hi everybody,

    my setup currently requires about 60 domains to be queried from a specific dns server rather than the default servers… any way to batch import them from a list or do they have to be added one by one... would it be difficult to add the possibility to use alias? or is there a way to edit conveniently via command line without having to mess around with viconfig?

    background:  ISP here censors some domains at a dns level and i have set up an alternative dns server that bypasses isp dns but is too slow to be used for all dns... ideally I could simply maintain one list of censored domains that could be accessible to all routers

    Kind regards,
    Lorenz

    1 Reply Last reply Reply Quote 0
    • P
      phil.davis
      last edited by Jan 25, 2014, 5:20 PM

      There is not any quick way to suck all that in on the GUI at present. But you can edit config.xml from the GUI:
      WARNING: Take a backup of the config first - Diagnostics->Backup/Restore

      1. Make a couple of domain override entries from the GUI
      2. Diagnostics->Edit, Load /cf/conf/config.xml
      3. Find the entries you made, make 60 in similar format - make sure not to stuff it up!
      4. Save
      5. Go back to the GUI DNS page, the entries should be listed
      6. Hit Save to force it to reload the running DNS settings
        WARNING AGAIN: when you make typos while doing this it will be your problem to fix it - make sure you have backup and understand what you are doing.

      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

      1 Reply Last reply Reply Quote 0
      • E
        evilpete
        last edited by Nov 27, 2020, 4:52 AM

        you can create a file such as "/root/blockset.conf"

        containing something line:

        address=/discord.com/discord.gg/127.0.0.1
        address=/roblox.com/rbxcdn.com/127.0.0.1
        

        then in the Custom options area for dnsmasq gui

        conf-file=/usr/local/etc/dnsmasq.conf
        conf-file=/root/blockset.conf
        

        If you want them to change on a schedule create a cron script to update or replace the file and reload the service

        see topic cli commands to start and stop services for instructions on how to properly do this...

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          [[user:consent.lead]]
          [[user:consent.not_received]]