Virtual IP for Synology

I'm running a pi-hole on my synology NAS with chroot and everything's working apart from the blocked page. As I have to use a different port the blocked page redirects to my NAS' login page. What's the best way to get around this? Is it to somehow do a virtual IP or can the blocked page be configured to work with a different port?

I have this exact same problem. Blocked pages are being redirected to the custom https port of the NAS login page. This is preventing the wife from shopping via ebates (because of the redirect) and some sites which get referrals for posting links to amazon or newegg products. If you happen to figure it out - please post solution. Thanks!

There's a few posts on the forums about setting up a virtual IP address for Pi-hole, but it's a pretty standard thing you can find on the internet. That would be the easiest I think for getting around port 80 being taken already.

There's none about a virtual IP on a synology nas when using chroot, at least when I tried to look.

Well, not specifically about synology. It's a generic topic.

Can you link it? I assumed that a virtual IP was below the pi-hole itself and would need some tinkering for synology. So this is doable within the pi-hole itself? I'm not too familiar with this.

I've got pihole already running on a custom port and pihole is my dhcp and DNS server. the nas admin login is also running on a different custom port and from what I can tell - something is telling pihole to use the Nas login port instead of using the pihole blocked page. nothing is using port 80 or 443. I was able to whitelist one of the redirected sites - which is why I think it has to do with the blocked page, but I don't know where to start looking. any guidance would be most appreciated.

Here's a guide that might work: Configuring virtual network interfaces in Linux -

I also found an alternative synology install method which might be helpful: Alternative Synology installation method

1 Like

ok thanks! I'll give those a read and report back.

Some more reading :wink:
This is how I got a virtual IP working and how to bind the Pi-hole daemons to this new IP (except for DHCP):

Maybe you can apply some for that chroot of yours.

What should i use instead of wlan0:0, I get "Cannot find device "wlan0:0"

I'm using chroot not docker.

Interestingly, during my initial setup I tried to use a different IP entirely via chroot - but realized that because it wasn't part of the main Synology NAS "OS" I wasn't able to make any adjustments to the built-in firewall that is running - so had to clear it out and wound up starting over from scratch. So all that's left is figuring out how to redirect the custom ports on the "known" IPs. I realize that if I turned off a lot of existing functionality on the Synology - pihole would most likely work without any issue, but the whole point of this exercise is to add pihole functionality. So far, i'm close - but not 100% - hopefully, I'll have time within the next few days to work on it some more.

If you read my posting, I mentioned I used the wireless wlan interface instead of the wired eth interface.
And that howto is intended for Debian based distro's ... not sure if works on a Synology chroot.

I didnt mention Docker ? EDIT:oops, missed out you were replying to @Mcat12
But Docker is a sort of chroot too in a sense.

Not sure if a virt IP is the way to go.
Maybe you need to setup a separate "network namespace" to get some sort of isolation and not have the Synology daemons bind to that virt IP and conflicting with the Pi-hole daemons:

But why all the effort when you can run Pi-hole on Synology in a Docker container ?

I believe below one is even tailored for Synology:

Ugh - it just got worse. Did the update and then added more to the whitelist. seemed like even more sites were reporting certificate errors - when they were all just being redirected to the NAS. Never did see the pihole block page. I'll try again when I have more time - meanwhile, it's just back to opendns and noscript. pihole has been removed.

If I could do docker I would obviously. It's not supported on all models.

Any fellow users figured this out?