Virtual IP for Synology


#1

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?


#2

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!


#3

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.


#4

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


#5

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


#6

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.


#7

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.


#8

Here’s a guide that might work: https://linuxconfig.org/configuring-virtual-network-interfaces-in-linux

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


#9

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


#10

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.


#11

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


#12

I’m using chroot not docker.


#13

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.


#14

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 ?

https://hub.docker.com/r/diginc/pi-hole/

I believe below one is even tailored for Synology:

https://hub.docker.com/r/tslenter/pi_hole/


#15

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.


#16

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


#17

Any fellow users figured this out?