Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Block ads with alias?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Block ads with alias? (Read 4043 times)
conanTheRouter
Newbie
Posts: 18
Karma: 3
Block ads with alias?
«
on:
June 17, 2018, 11:32:55 pm »
Hi!
So I'm trying to block ads why adding aliases.
I have found this thread:
https://forum.opnsense.org/index.php?topic=7207.msg32357#msg32357
I have added my list under "Firewall -> Aliases -> View",
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
Then, according to the thread, I added a block rule under "Rules -> Floating". But, it doesn't work when visiting
https://pi-hole.net/pages-to-test-ad-blocking-performance/
Can someone pls tell me how the floating rule should be set-up to work?
Logged
marjohn56
Hero Member
Posts: 1701
Karma: 179
Re: Block ads with alias?
«
Reply #1 on:
June 18, 2018, 09:09:19 am »
That's for Geo IP blocking. What you need is DNS bocking. I found a good method a couple of weeks ago, works perfectly.
Try this..
https://devinstechblog.com/
«
Last Edit: June 18, 2018, 09:13:30 am by marjohn56
»
Logged
OPNsense 24.7
-
Qotom Q355G4
- ISP -
Squirrel 1Gbps
.
Team Rebellion Member
- If we've helped you remember to applaud
conanTheRouter
Newbie
Posts: 18
Karma: 3
Re: Block ads with alias?
«
Reply #2 on:
June 19, 2018, 05:40:17 pm »
Nice! Seems to a hassle comparing to updating lists with pfBlocker or the geoIP.
Logged
marjohn56
Hero Member
Posts: 1701
Karma: 179
Re: Block ads with alias?
«
Reply #3 on:
June 19, 2018, 06:47:06 pm »
It's a serious hassle... took me all of three minutes to configure..
Logged
OPNsense 24.7
-
Qotom Q355G4
- ISP -
Squirrel 1Gbps
.
Team Rebellion Member
- If we've helped you remember to applaud
nospam
Newbie
Posts: 29
Karma: 0
Re: Block ads with alias?
«
Reply #4 on:
June 27, 2018, 07:45:34 pm »
I've tried the script using the MVPS hosts file on OPNsense 18.1.10-i386 but the script just generates a 0 byte file and doesn't work.
What is the correct format of the /var/unbound/ad-blacklist.conf file?
I've tried
abcstats.com 0.0.0.0
and
0.0.0.0 abcstats.com
and
abcstats.com 127.0.0.1
and
127.0.0.1 abcstats.com
but I keep getting the error
opnsense: /usr/local/etc/rc.bootup: The command '/usr/local/sbin/unbound -c '/var/unbound/unbound.conf'' returned exit code '1', the output was '/var/unbound/ad-blacklist.conf:1: error: unknown keyword '127.0.0.1' /var/unbound/ad-blacklist.conf:1: error: unknown keyword 'abcstats.com' read /var/unbound/unbound.conf failed: 2 errors in configuration file [1530118919] unbound[39953:0] fatal error: Could not read config file: /var/unbound/unbound.conf'
and DNS crashes
Logged
marjohn56
Hero Member
Posts: 1701
Karma: 179
Re: Block ads with alias?
«
Reply #5 on:
June 28, 2018, 08:25:01 am »
I am currently away having a few days R&R, so I cannot check the format. However I suggest you do exactly as said in the link provided and examine the file created to see what the format is. It worked first time when I initially set it up.
Logged
OPNsense 24.7
-
Qotom Q355G4
- ISP -
Squirrel 1Gbps
.
Team Rebellion Member
- If we've helped you remember to applaud
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Block ads with alias?