What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

adblocking on merlin in a way like openwrt

133794m3r

Occasional Visitor
As the title says is there any easy way to do the similar in merlin? I know that it won't be _as_ easy but I've done custom virtualhosts with nginx before and if the http server on here will let me do similar I'd much rather do this than having to run a whole other program and then a third one to simple send a 1x1 px gif.

here's that persons post how they did in uci on openwrt.



Code:
Just a FYI, if you already have LuCI/uhttpd installed then you can use that webserver to serve the transparent gif. You don't need pixelserv. Here's how I got it set up:

# uci show network.alias
network.alias=interface
network.alias.ifname=br-lan
network.alias.proto=static
network.alias.ipaddr=192.168.1.254
network.alias.netmask=255.255.255.0

# uci show uhttpd.pixelserv
uhttpd.pixelserv=uhttpd
uhttpd.pixelserv.listen_http=192.168.1.254:80
uhttpd.pixelserv.home=/www_blank
uhttpd.pixelserv.error_page=/blank.gif

You'll want to change your main uhttpd listen addresses to only listen to your LAN address as well i.e. 192.168.0.1 and not 0.0.0.0.

Then you just add your pre-formatted hostfile (entries pointing to 192.168.1.254) as addnhosts list in /etc/config/dhcp and you're done.

I was going to try to use openwrt but it's just not working, I've given up, I can't compile it on my own and the builds they provie won't work on my rt-n16 and tomato whilst "OK" I'm unsure as to how much I can really do with it as it's the easy-tomato version of the thing so I'm still unsure as to where I'm going to be going.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top