# More than one "Conditional Forwarding" entry in the GUI

**URL:** <https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359>\
**Category:** Implemented\
**Created:** [August 3, 2018, 6:29am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359 "2018-08-03T06:29:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbellon](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/sbellon/32/40455_2.png) [@sbellon](https://discourse.pi-hole.net/u/sbellon)\
**Post date:** [August 3, 2018, 6:29am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/1 "2018-08-03T06:29:37Z")

</div>

Hi all,

while I understand that in most cases one "Conditional Forwarding" rule is sufficient, there are situations where you'd want more than one entry. In the "Upstream DNS Servers" section above you can enter multiple servers, it would be nice to have multiple "Conditional Forwarding" entries as well.

Thanks!

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 3, 2018, 6:45am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/2 "2018-08-03T06:45:41Z")

</div>

Could you give an example of how or when this would be used and why it would be helpful?

---

<div class="post-metadata">

**Author:** ![sbellon](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/sbellon/32/40455_2.png) [@sbellon](https://discourse.pi-hole.net/u/sbellon)\
**Post date:** [August 3, 2018, 6:48am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/3 "2018-08-03T06:48:13Z")

</div>

When forwarding to a Ubiquiti USG, then the localdomain forwarding like

server=/my.local.domain/192.168.1.1

is not enough. There are also rules like

server=/setup/192.168.1.1  
server=/setup.ubnt.com/192.168.1.1  
server=/unifi/192.168.1.1  
server=/USG/192.168.1.1

necessary to resolve UBNT internal names. Currently I'm doing this with a /etc/dnsmasq.d/05-custom.conf and everything is well, I just thought that adding additional fields to the GUI would be nicer.

---

<div class="post-metadata">

**Author:** ![Chris\_1](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@Chris\_1](https://discourse.pi-hole.net/u/Chris_1)\
**Post date:** [August 6, 2018, 7:06pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/4 "2018-08-06T19:06:15Z")

</div>

Hi sbellon and jfb,

Same problem here. I'd like several "Conditional Forwarding" as I've got my local LAN (10.0.0.1), my Google WiFi Mesh (192.168.86.1) and two VPN Servers (10.8.0.1 and 10.9.0.1) which all use my Pi-Hole on Raspi with LAN and WiFi to filter DNS. It is

server=/testwifi/192.168.86.1 # Google WiFi  
server=/lan/10.0.0.1 # Local LAN  
server=/openvpn1/10.8.0.1 # VPN1  
server=/openvpn2/10.9.0.1 # VPN2

I'd do it also through the config files if its possible?

---

<div class="post-metadata">

**Author:** ![sbellon](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/sbellon/32/40455_2.png) [@sbellon](https://discourse.pi-hole.net/u/sbellon)\
**Post date:** [August 7, 2018, 6:07am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/5 "2018-08-07T06:07:07Z")

</div>

Config files works perfectly, as mentioned in my post.

---

<div class="post-metadata">

**Author:** ![Chris\_1](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@Chris\_1](https://discourse.pi-hole.net/u/Chris_1)\
**Post date:** [August 7, 2018, 5:37pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/7 "2018-08-07T17:37:18Z")

</div>

@anon55913113 and @sbellon thanks a lot, works like a charm 🙂

---

<div class="post-metadata">

**Author:** ![Chris\_1](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@Chris\_1](https://discourse.pi-hole.net/u/Chris_1)\
**Post date:** [August 8, 2018, 7:23pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/9 "2018-08-08T19:23:11Z")

</div>

@anon55913113 thanks again, yes, I messed up my config file with the hash signs as if comments...

---

<div class="post-metadata">

**Author:** ![dephcon](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dephcon/32/4559_2.png) [@dephcon](https://discourse.pi-hole.net/u/dephcon)\
**Post date:** [August 8, 2018, 8:23pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/10 "2018-08-08T20:23:56Z")

</div>

@jfb Another real world use case would be for local domains that span multiple subnets. When you configure conditional forwarding, it assumes the reverse lookup subnet based on your configured router IP. In mycase i'm just using "local" but i'm using it on 3 different subnets/vlans.

I've had to create a custom file like @anon55913113 but just with additional reverse zones:

```
 pi@ns01:~ $ cat /etc/dnsmasq.d/02-custom.conf
 server=/4.81.10.in-addr.arpa/10.81.0.6

```

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [August 8, 2018, 9:16pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/11 "2018-08-08T21:16:51Z")

</div>

Adding more and more features that will only be used by a few experts out there seems to be not a good idea. Each new feature can bring new issues along and the more complex the entire system becomes, the more complicated and possibly less straightforward the interface becomes for the arbitrary user.

We deliberately allow experienced users to configure anything they want by placing custom configuration files into `/etc/dnsmasq.d/`. This allows for a much greater flexibility than could ever be possible with a GUI.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [December 7, 2018, 4:06pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/14 "2018-12-07T16:06:32Z")

</div>

Split this topic on December 7, 2018, 4:06pm UTC

A post was split to a new topic: [Conditional forwarding help](https://discourse.pi-hole.net/t/conditional-forwarding-help/14930)

---

<div class="post-metadata">

**Author:** ![jcotsj](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jcotsj/32/6117_2.png) [@jcotsj](https://discourse.pi-hole.net/u/jcotsj)\
**Post date:** [February 8, 2019, 6:43pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/15 "2019-02-08T18:43:53Z")

</div>

What is the maximum number of entries for conditional forwarders?

I have tried to define more than 20 and it has not worked.  
Is there a limit?

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [February 10, 2019, 10:57pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/16 "2019-02-10T22:57:08Z")

</div>

> [@jcotsj](#):
>
> I have tried to define more than 20 and it has not worked.

I'm not aware of a limit. Please post the exact error message you got and ideally also the lines you added and we can work from there.

---

<div class="post-metadata">

**Author:** ![hwoodiwiss](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/h/ecccb3/32.png) [@hwoodiwiss](https://discourse.pi-hole.net/u/hwoodiwiss)\
**Post date:** [March 7, 2019, 10:14pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/17 "2019-03-07T22:14:39Z")

</div>

As another example of how this could be useful, I want to set up a SteamCache server on the same network as my pihole, but I don't want to have to daisychain all my DNS reqs through the cache servers DNS server.

---

<div class="post-metadata">

**Author:** ![derrickmehaffy](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/derrickmehaffy/32/12511_2.png) [@derrickmehaffy](https://discourse.pi-hole.net/u/derrickmehaffy)\
**Post date:** [February 12, 2020, 1:58pm UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/18 "2020-02-12T13:58:51Z")

</div>

I've got a simple use-case here, multiple internal domains.... Especially if you have multiple site to site VPNs.

---

<div class="post-metadata">

**Author:** ![Master](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/master/32/682_2.png) [@Master](https://discourse.pi-hole.net/u/Master)\
**Post date:** [February 15, 2020, 10:30am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/19 "2020-02-15T10:30:26Z")

</div>

I have more than one local domain which should be resolved by one local DNS-server.  
Currently my setupVars has following entries:

```auto
CONDITIONAL_FORWARDING=true
CONDITIONAL_FORWARDING_IP=123.456.789.1
CONDITIONAL_FORWARDING_DOMAIN=mydomain
CONDITIONAL_FORWARDING_REVERSE=123.456.789.in-addr.arpa

```

How can I add more local domains?

---

<div class="post-metadata">

**Author:** ![razvani](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@razvani](https://discourse.pi-hole.net/u/razvani)\
**Post date:** [July 12, 2020, 8:25am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/20 "2020-07-12T08:25:15Z")

</div>

I have also multiple internal domains: HomeLab, SmartDevices, HomeComputers. It would be nice to have this in web interface.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Coro](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/coro/32/15424_2.png) [@Coro](https://discourse.pi-hole.net/u/Coro)\
**Post date:** [July 13, 2020, 6:12am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/21 "2020-07-13T06:12:11Z")

</div>

> [@Master](#):
>
> How can I add more local domains?

You can easily do this with custom `dnsmasq` config files in `/etc/dnsmasq.d/` You can check for how it is done with the files created by Pi-hole to see how to do it yourself.

> [@razvani](#):
>
> It would be nice to have this in web interface.

As far as I see, the web interface actually tries to stay simple instead of becoming a full network management system (I think this has been stressed by @DanSchaper) . The typical user is a first-time network user and has no idea about all the concepts of DHCP and other wizardry terms.

What I absolutely love about Pi-hole is that they try to keep it simple for the average user who you wants to put this next to their router, set up and forget, however, still offer enormous flexibility by allowing almost anything you can imagine by their open architecture. Unlike similar projects, you can ~~fairly~~ easily edit all the config files (mostly in `/etc/dnsmasq.d`) to realize arbitrarily complex networking configurations. I removed "fairly" because you can ask anything here on the forum and there will be someone who walks you through and can give a lot of insight into things (also when there is an easier way to achieve what you are looking for). This is the second most important bit of why Pi-hole is fantastic and "successful".

---

<div class="post-metadata">

**Author:** ![Master](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/master/32/682_2.png) [@Master](https://discourse.pi-hole.net/u/Master)\
**Post date:** [July 13, 2020, 9:07am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/22 "2020-07-13T09:07:59Z")

</div>

> [@Coro](#):
>
> You can easily do this with custom `dnsmasq` config files in `/etc/dnsmasq.d/` You can check for how it is done with the files created by Pi-hole to see how to do it yourself.

Are there any special file names required?  
How can I check if the config file is loaded by FTL?

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [July 13, 2020, 9:13am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/23 "2020-07-13T09:13:23Z")

</div>

Pihole uses

```auto
/etc/dnsmasq.d/01-pihole.conf
/etc/dnsmasq.d/02-pihole-dhcp.conf
/etc/dnsmasq.d/04-pihole-static-dhcp.conf"

```

> <https://github.com/pi-hole/pi-hole/blob/4d25f695267590b61a4061f9bb43448005d99b85/advanced/Scripts/webpage.sh>

They filenames have the pattern `[0-9,0-9]-name.conf`

---

<div class="post-metadata">

**Author:** ![Coro](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/coro/32/15424_2.png) [@Coro](https://discourse.pi-hole.net/u/Coro)\
**Post date:** [July 13, 2020, 10:01am UTC](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359/24 "2020-07-13T10:01:39Z")

</div>

> [@Master](#):
>
> Are there any special file names required?

The pattern is specified in `/etc/dnsmasq.conf`

Anything `*.conf` will work, I have seen posts by developers suggesting something like `99-something.conf`

> [@Master](#):
>
> How can I check if the config file is loaded by FTL?

There isn't much you can do to check (you could add an invalid setting to see if it fails), otherwise, you can trust that all files in this directory, ending in `.conf` will be read.

[Next page](https://discourse.pi-hole.net/t/more-than-one-conditional-forwarding-entry-in-the-gui/11359.md?page=2)
