1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script: Clean, Lean and Mean Adblocking

Discussion in 'Tomato Firmware' started by haarp, Apr 23, 2013.

  1. ryzhov_al

    ryzhov_al Networkin' Nut Member

    Also, routers with lots of RAM may use another DNS-based ad-blocking solution — the adsuck, a small DNS server that immediately returns "non-existent domain" (NXDOMAIN) answer for blacklisted sites and this is a main advantage: browser/OS don't have to wait an answer from pixelserv server, because no request to pixelserv at all! Whitelists is supported too.

    Here is how to use it.
     
  2. haarp

    haarp LI Guru Member

    Yeah, but the point of pixelserv is to avoid big ugly "domain not found" errors where ads used to be. ;) You can also disable pixelserv in my script. It will then redirect to 0.0.0.0, which, being an invalid IP, will also avoid doing any requests.
     
  3. ryzhov_al

    ryzhov_al Networkin' Nut Member

    No one says "your script is bad", no. I glad someone supports ad-blocking script with no additional requirements. But there is another good things:
    • when darkknight93 says about cookies — I remind Adblock plus on router,
    • when zbeyuz says about new routers with large RAM — I remind the adsuck, which also can block sites by regexp;),
    • also there is a DansGuardian in repo which can block some elements by it's fuzzy logics, and can set "trust level" for separate home users (kids/adults, for example).
    Regards, Alexander Ryzhov.
     
  4. Bird333

    Bird333 Network Guru Member

    My vote is a.
     
  5. pronsta

    pronsta Serious Server Member

    thx for the tutorial! works like charm :)
     
  6. haarp

    haarp LI Guru Member

    ignore me
     
  7. haarp

    haarp LI Guru Member

    Alright, v4.0 is live. Please reread the entire start post!
     
    zbeyuz likes this.
  8. zbeyuz

    zbeyuz Serious Server Member

    When I paste the Pixelserv script into Tools -> System, it shows this error below.

    openssl: can't load library 'libssl.so.1.0.0'
    gunzip: invalid magic
    echo: write error: Broken pipe

    What does it mean ?
     
  9. haarp

    haarp LI Guru Member

    It means that whoever made your firmware broke openssl. Nothing I can do.

    You could try manually installing the files via scp or something, but that's cumbersome.
     
  10. zbeyuz

    zbeyuz Serious Server Member


    OMG, I am using Toastman Beta version. I will try the official version and see how it goes. Thank you.
     
  11. haarp

    haarp LI Guru Member

    I added some hints on how to manually install it without openssl to the start post, check it out.

    But you should really annoy Toastman until he fixes openssl. That's a major oversight.
     
  12. Toastman

    Toastman Super Moderator Staff Member Member

    Yes, it's broken since update. I'll fix it when I get home soon. But it IS marked "BETA" in nice big letters !!!

    The purpose of these BETA builds is to get feedback, there may be several things that need to be sorted out. The code is posted to GIT repo so that anyone is free to do their own bugfixes and contribute to the project.
     
    zbeyuz likes this.
  13. haarp

    haarp LI Guru Member

    Awesome! :) Thanks.
     
  14. zbeyuz

    zbeyuz Serious Server Member



    I have just flashed the official latest version, but the script still doesn't work...

    When I click execute the script, it doesn't show any result or sign.

    Wondering why ???

    By the way, I tried your new method, but for this line: paste the script from this link into a file and manually transfer it to PREFIX/adblock.sh.

    What kind of file will be saved into jffs in my case ?
     
  15. jerrm

    jerrm Network Guru Member

    It probably worked. It won't output anything if successful. Have you checked the prefix folder?
     
  16. Bird333

    Bird333 Network Guru Member

    How can I disable the iptables entris in the script?
     
  17. zbeyuz

    zbeyuz Serious Server Member


    Yes, I did and it is: PREFIX="/jffs/adblock/"
     
  18. haarp

    haarp LI Guru Member

    I don't see why you'd have a need for that, they shouldn't interfere with anything else.

    You'll have to modify the script directly in PREFIX/adblock.sh

    sounds like it should work then. You'll probably want RAMLIST, don't forget it!
     
  19. zbeyuz

    zbeyuz Serious Server Member

    It works now, but with some error and only 1 source. Here is the logs:

    /jffs/adblock/adblock.sh: /jffs/adblock/config: line 38: EOF: not found
    ADBLOCK: Download starting
    Connecting to www.malwaredomainlist.com (143.215.130.61:80)
    - 100% |*******************************| 40558 --:--:-- ETA
    ADBLOCK: Downloaded, generating /jffs/adblock/blocklist
    ADBLOCK: Config generated, 1286 unique hosts to block
    ADBLOCK: pixelserv already running, skipping
    ADBLOCK: Done, restarting dnsmasq
    .
    Done.
     
  20. haarp

    haarp LI Guru Member

    Please redo the config file from the start post, there was some error that I didn't find at first.
     
    zbeyuz likes this.
  21. mvsgeek

    mvsgeek Addicted to LI Member

    I've been following this thread for a while, and finally took the plunge, here's my $0.02...

    1. My router is an Asus RT-N16 running Tomato Firmware v1.28.0501.3 MIPSR2Toastman-RT-N K26 USB VLAN-Ext

    2. Installation instructions in the original post worked perfectly, including the optional install of Pixelserv. I really like the copy/paste method of installing & unzipping binaries, simple yet elegant:) I installed everything to a thumbdrive mounted as /mnt/USBA/adblock.


    3. From an ssh connection, I've been toggling adblock, clearing browser cache, and then visiting frequently used sites which usually have annoying pop-ups - most of them are now gone:D However, does anyone have a definitive test methodology?

    4. Massive kudos to haarp, and all others who contributed:D:D
     
  22. jerrm

    jerrm Network Guru Member

  23. Bird333

    Bird333 Network Guru Member

    That's fine. Can I just comment out the iptables lines?
     
  24. Bird333

    Bird333 Network Guru Member

    It doesn't seem to be working for me. I ran the script from cli to watch the output. It downloaded the files and said something like 11000+ hosts to block. But then it said something about 'unexpected '}' on line 161. I don't see 'br0:1' in ifconfig. I also don't see the iptables rules added either.
     
  25. Ernesto Elias

    Ernesto Elias Serious Server Member

    Well I figured out the problem and it was because I did not check intercept udp port 53 :/ lol silly me but now since I came back on this thread I can see there is a new version and want to install it on a thumb drive. How do I do that I haven't really gotten around on thumb drives on open source firmwares >_<
     
  26. Frequenzy

    Frequenzy Networkin' Nut Member

    can you share how you did it using a usb drive. i dont want to install on jffs. thanks.
     
  27. philess

    philess Networkin' Nut Member

    I´ve been using this simple link to test if it works:

    http://rcm.amazon.com/e/cm?t=thedailydownl-20&o=1&p=11&l=ez&f=ifr&f=ifr

    Remember to flush your OS´s DNS cache and restart your browser to see a difference.
     
  28. Bird333

    Bird333 Network Guru Member

  29. philess

    philess Networkin' Nut Member

    Close browser, in command prompt "ipconfig /flushdns", start browser.
     
  30. mvsgeek

    mvsgeek Addicted to LI Member

    I already had a thumbdrive named "USBA" mounted as /mnt/USBA - for router log files, scripts etc. All I did was following haarp's instructions in the original post to adjust PREFIX at the top of each script. So in my case

    PREFIX="/cifs1/adblock/" ## adjust this! became PREFIX="/mnt/USBA/adblock/" ## adjust this!

    Copy/paste/execute each script, and voila:D
     
  31. mvsgeek

    mvsgeek Addicted to LI Member

    Thanks, I see a big difference, so it's working.
    With the blocker enabled, I now see a Cookie Control icon in the bottom right corner on this web site (linksysinfo.org) but so far not on any others. Anyone else see this?
     
  32. philess

    philess Networkin' Nut Member

    I´ve had the Cookie Control button for weeks on this forum, probably even months.
    It is related to your browser. This Adblock script or pixelserv dont have anything to do with it.
     
  33. mvsgeek

    mvsgeek Addicted to LI Member

    Hmmm...I've run the following with IE, Firefox, and Chrome:

    1. Close browser
    2. Run CCleaner
    3. Toggle adblock script OFF
    4. Open browser, go to linksysinfo.org - NO Cookie Control icon.

    5. Close browser
    6. Run CCleaner
    7. Toggle adblock script ON
    8. Open browser, go to linksysinfo.org - Cookie Control icon is displayed

    Same result for all 3 browsers. My default browser is Chrome, with no extensions installed.
    Not really a big deal, just rather puzzling.
     
  34. philess

    philess Networkin' Nut Member

    I dont use CCleaner.
     
  35. haarp

    haarp LI Guru Member

    (ba)sh doesn't like empty blocks. Just remove the iptables line and the entire { .. } block it connects to.
     
  36. Ernesto Elias

    Ernesto Elias Serious Server Member

    I am having problems with this script. Well I'm trying to execute it from a usb (I've seen posts on how to format the usb and rename from telnet) and so far from when I try to activate all the hosts download but I get this error at the end.

    sed: /mnt/Data/adblock/blocklist: No such file or directory
    /mnt/Data/adblock/adblock.sh: line 146: can't open /mnt/Data/adblock/blocklist: no such file
    ADBLOCK: Config generated, unique hosts to block
    ADBLOCK: Done, restarting dnsmasq
    .
    Done.


    I do not know what else to do >_<
     
  37. fubdap

    fubdap Addicted to LI Member

    @Ernesto - try:
    /tmp/mnt/Data/adblock/blocklist
     
  38. Bird333

    Bird333 Network Guru Member

    shouldn't the script work with the rules? It doesn't for me.
     
  39. haarp

    haarp LI Guru Member

    I thought you just wanted to rip out the iptables stuff? That's how you'd do it. What you did was break it, that's why it wouldn't work. It'll still work without iptables, but these rule are in place to only expose the least possible potential attack surface. Just good practice.

    Huh. That shouldn't happen. Can you pastebin.com your config and the entire output from script execution?
    I actually suspect that you messed with the CONF variable. Most users should not touch that one.
     
  40. Bird333

    Bird333 Network Guru Member

    Ultimately, I do want to remove the iptables stuff, but right now I just want to get it to work. All I did was comment out (#) the iptables 'delete' rules and 'insert' rules. After it didn't work I removed the #'s and it still doesn't work. What do you recommend at this point?
     
  41. haarp

    haarp LI Guru Member

    Comment all 4 lines
    Code:
            iptables -vL INPUT | grep -q "$BRIDGE.*$redirip *tcp dpt:www" || {
                iptables -I INPUT -i $BRIDGE -p all -d $redirip -j DROP
                iptables -I INPUT -i $BRIDGE -p tcp -d $redirip --dport 80 -j ACCEPT
            }
    Then do a proper adblock.sh restart
     
  42. Bird333

    Bird333 Network Guru Member

    Right now I just want to get it running stock. I'll try a restart later.
     
  43. Monk E. Boy

    Monk E. Boy Network Guru Member

    Actually /mnt/Data and /tmp/mnt/Data both point to the same location. I actually went through my configs and removed /tmp/ everywhere to save a few bytes.

    I would check and make sure your drive is actually mounted to Data and not DATA. Check in USB Support under USB and NAS, down near the bottom it should list something like:
    Partition 'Data' ext3 (3,296.77 MB / 3,227.13 MB free) is mounted on /tmp/mnt/Data

    If it's FAT/FAT32 then it'll be mounted as DATA instead, since volume names under FAT/FAT32 aren't case sensitive.
     
  44. Bird333

    Bird333 Network Guru Member

    It's working. Thanks
     
  45. Frequenzy

    Frequenzy Networkin' Nut Member

    whats the effect of the ip tables? so it should work even without them
     
  46. Bird333

    Bird333 Network Guru Member

    The iptables rules block all connections to the router except pixelserv on port 80. When pixelserv is started on 192.168.1.254 for example, that creates another ip address that the router accepts connections on. So to prevent other connections besides pixelserv the iptables rules are put in. Yes the script will work if you disable the iptables rules correctly.
     
  47. Ernesto Elias

    Ernesto Elias Serious Server Member

    I checked it again to make sure and it says Data not DATA because I formatted the flash drive from the router using telnet.
     
  48. Monk E. Boy

    Monk E. Boy Network Guru Member

    What do
    ls -l /tmp/mnt/

    and
    ls -l /mnt/

    show?

    I wrote up a little blurb on formatting flash drives as ext3 using Tomato itself not too long ago.
     
  49. Ernesto Elias

    Ernesto Elias Serious Server Member

    Yeah thats where I learned how to do it lol

    and it shows this:
    drwxr-xr-x 4 root root 4096 Dec 31 19:06 Data







    and @haarp I did not mess with the conf setting its all normal just changed the prefix and to disable pixelserv to 0 because I do not knonw how to set it up with usb >_<
     
  50. Ernesto Elias

    Ernesto Elias Serious Server Member

    it says not found >_<
     
  51. Monk E. Boy

    Monk E. Boy Network Guru Member

    Well, you know your drive is mounted as Data then. ls -l /mnt/Data/ and see what's there.

    I wonder if you have a file called adblock instead of a folder called adblock.
     
  52. jakey

    jakey Networkin' Nut Member

    I subscribe to an external VPN service and use their client on my Win8 PC.

    How to make this script work in this case ? The script works as it should when not using the VPN service.
     
  53. Ernesto Elias

    Ernesto Elias Serious Server Member

    drwxr-xr-x 2 root root 4096 Dec 31 19:08 adblock
    drwx------ 2 root root 16384 Dec 31 19:11 lost+found

    It gave me that.
     
  54. fubdap

    fubdap Addicted to LI Member

    You may have to start all over again and read the instructions carefully.

     
  55. Ernesto Elias

    Ernesto Elias Serious Server Member

    Well maybe I'm missing something can you explain it to me or give me instructions again because I thought I was doing it right >_<
     
  56. haarp

    haarp LI Guru Member

    When it comes down to it, that can't be the error. The script should already know the correct prefix, because it uses the same folder it itself resides in. And it should bail out if anything goes wrong, so your error is something I really want to fix, but without the data I asked you to supply, that is gong to be hard...
     
  57. Bird333

    Bird333 Network Guru Member

    Did you adjust the 'PREFIX' variable in the script and the config file to '/mnt/Data/adblock' before you ran them?
     
  58. Ernesto Elias

    Ernesto Elias Serious Server Member

    Can yo tell me how to do it because as each day passes I'm getting more and more into linux. It's like a haven for networking people but me of course I'm still learning

    and yes I did exactly like that
     
  59. fubdap

    fubdap Addicted to LI Member

    Below is what you posted earlier. Take out the blocklist and have just:
    '/mnt/Data/adblock'
    and see what happens.
    Code:
    sed: /mnt/Data/adblock/blocklist: No such file or directory
    /mnt/Data/adblock/adblock.sh: line 146: can't open /mnt/Data/adblock/blocklist: no such file
    ADBLOCK: Config generated, unique hosts to block
    ADBLOCK: Done, restarting dnsmasq
    .
    Done.
    
     
  60. Ernesto Elias

    Ernesto Elias Serious Server Member

     
  61. M0g13r

    M0g13r LI Guru Member

    nice haarp ! thx

    May 1 19:49:56 fli4l user.notice ADBLOCK: Downloaded, generating /mnt/stuff/adblk/blocklist
    May 1 19:51:45 fli4l user.notice ADBLOCK: Config generated, 285533 unique hosts to block
    May 1 19:51:45 fli4l user.notice ADBLOCK: Setting up pixelserv on 192.168.0.254

    :D
     
  62. Ernesto Elias

    Ernesto Elias Serious Server Member

    Dude can you tell me step by step on how you did it please?
     
  63. mvsgeek

    mvsgeek Addicted to LI Member

    Try as I might, I've been unable to get haarp's installation instructions to fail:( I've even tried with a different flash drive, formatted as ext3 instead of FAT32, went back to square one, followed haarp's instructions in the original post, but still no luck, everything works perfectly:mad: All I changed was the PREFIX at the top of each of the 3 scripts.

    Maybe you have a bad flash drive?
     
  64. M0g13r

    M0g13r LI Guru Member

    the first steps doesn't work ..... dont know why ....

    start from first >> If this fails, << on first post then it works

    PREFIX/ should be always the same in both scripts
     
  65. Ernesto Elias

    Ernesto Elias Serious Server Member

    Well I tried it again after formatting it again >_< and for some reason I managed to get pixelserv running but not the script >_< lol man I still got the old script but I wanted to run the new version on usb because I get to add more sources.

    UPDATE: Well I couldn't get it to work so I got the old script and update it with the new sources and ran it from command and also got pixelserv to work from usb so right now as of typing this it is running :)

    and also is there a way on how to transfer a file to usb like from telnet or something to the usb and execute it ? so I can make a text file and transfer it to the usb and make it run on start up instead of rerunning the command each time the router reboots ?
     
  66. mvsgeek

    mvsgeek Addicted to LI Member

    Please go back and read haarp's instructions once again :
    • If you want to enable Adblock automatically when the router boots, just put /YOUR/PREFIX/HERE/adblock.shinto the WAN Up section on Administration->Scripts
    • If you want to have Adblock automatically update its filters, just put /YOUR/PREFIX/HERE/adblock.sh into one of the Custom commands on Administration->Scheduler

    If you set the PREFIX variable correctly, you don't have to worry about transferring files via telnet or ssh - haarp's installation scripts take care of all that for you. To run automatically on startup, just add the adblock.sh command to the WAN Up scripts.
     
  67. Ernesto Elias

    Ernesto Elias Serious Server Member

    No I don't have his script on my USB because it is not working for some reason the reason I'm asking is because I'm using his old script to do it
     
  68. gof

    gof Networkin' Nut Member

    Ive just finished installing this very nice addition to my Tomato RT-N12. I had a problem though, which was that the command:

    sort -u "$listprefix"/source-* -o "$listprefix/blocklist"

    It seems that the -o parameter is not respected so the output is just logged to standard out instead of into the blocklist file, which is then never created. I changed the line to:

    sort -u "$listprefix"/source-* > "$listprefix/blocklist"

    and this fixed the problem and now blocklist got generated correctly.

    /Gof
     
  69. haarp

    haarp LI Guru Member

    What Tomato are you using? -o should work in most busybox environments.
     
  70. Frequenzy

    Frequenzy Networkin' Nut Member

    can't seem to get v4.0 to work on usb. looks like i'll be stuck at v3.7 which works great for me.
     
  71. gof

    gof Networkin' Nut Member

    Pretty sure im using:

    tomato-K26-1.28.7502.2MIPSR2Toastman-RT-MiniIPv6.trx

    Although im at work atm, so i cannot check.

    /Gof
     
  72. haarp

    haarp LI Guru Member

    What's the matter?

    I will replace the sort line in future versions. Shouldn't be a problem.
     
  73. haarp

    haarp LI Guru Member

    Updated to 4.1. If you previously had problems, try this one, it adds more checks.
     
  74. mvsgeek

    mvsgeek Addicted to LI Member

    Update was a piece of cake:) I only updated the script, not the config, is this correct? Then stop--> force --> restart, and everything looks good.
    Thanks, haarp!
     
  75. haarp

    haarp LI Guru Member

    Yep, this is correct. 'restart' would have been enough, too :)

    I'd let you guys know if the config had to be regenerated or if there were additional steps needed for an update.
     
  76. Bird333

    Bird333 Network Guru Member

    New challenge. :) I have a separate network on br1. One of the computers on that interface I have set to use opendns. Apparently, since it uses opendns as the dns server instead of the router as the dns server the adblock doesn't work. Is there some way you can fix the script to have it use pixelserv for the block list but use opendns for everything else?

    EDIT: The more I think about it, this maybe a dnsmasq setup issue. I going to ask on their discussion list first. Just to verify, your script essentially adds all the hosts to dnsmasq.custom for dnsmasq to use correct?
     
  77. jerrm

    jerrm Network Guru Member

    Correct, it assumes dnsmasq is acting as dns server/forwarder for the network. If the clients are pointing directly to opendns, I don't think there is any way for the script to work.

    If there is a way to conditionally define where dnsmasq forwards to based on the source interface, then it may be doable. Don't know if that's possible or not, it would mean dnsmasq would need separate caches for each interface.
     
  78. Bird333

    Bird333 Network Guru Member

    Well, I am using this option ('dhcp-option=dp,6,208.67.220.220') for Dnsmasq to specify the use of opendns. Hopefully there is some way to tell it to use the dnsmasq.custom before using opendns.
     
  79. jerrm

    jerrm Network Guru Member

    That means the clients are talking directly to the opendns servers, dnsmasq isn't really involved. I don't see it working, but dsnmasq might prove me wrong.
     
  80. Bird333

    Bird333 Network Guru Member

    Yeah I'm sure I'll have to change my config but hopefully there is a way to do it.
     
  81. darkknight93

    darkknight93 Networkin' Nut Member

    Istn the DHCP Option 6 the DNS Server provided by DHCP? In other words: Client requests IP and stuff via DHCP and gets as DNS Server the Server you specified (208.67.220.220)? So he would not contact your Routers dns --> Adblock will not work.
    Just try a ipconfig /all on your Client - you will see that DNS Server is not your Routers IP but the OpenDNS Server

    You could do the trick with leaving DHCP Option 6 (DNS) at Default values/removing that line from dnsmasq config and specify the OpenDNS Server in the Basic Tab (Static DNS).
    To only use OpenDNS for resolving hostnames on WAN you Need to uncheck in Advanced->DNS/DHCP Options "Use received DNS with user-entered DNS"

    EDIT: I've just read through history and know I understand the issue... BR1 .
    Sorry for missunderstandig. I'll leave the reply as is if anyone else has some similiar issues...

    EDIT2: Can you try 'dhcp-option=dp,6,192.168.2.1,208.67.220.220' replace 192.168.2.1 with Routers br1 Interface ip
     
  82. JAC70

    JAC70 Networkin' Nut Member

    This is most excellent, harp, thank you. I'm hoping this will stop the issue of pixelsrv crashing when I make minor config changes.

    One small request, for the sake of clarity, could you capitalize or bold or colorize the font for the pastebin links indicated by the "this link" text? They weren't highlighted in my browser, which confused me for a bit. Thanks.
     
  83. haarp

    haarp LI Guru Member

    Correct. You could enable "Intercept DNS port(UDP 53)" to force the OpenDNS clients to use dnsmasq regardless, and then set OpenDNS as the router's DNS server. But there is no way to have a hybrid approach, like you're asking.

    Consider it done
     
  84. darkknight93

    darkknight93 Networkin' Nut Member

    I don't know how and why but since yesterday my router Begins to freeze with active Adblock script... Dnsmasq is running with 100% cpu load - and can not be killed.
    (Asus RT-N66U with v108 Shibby Mod)

    Is there any way to log whats happening? I stopped adblock script via "sh adblock.sh stop" now everything is fine again :S

    EDIT: Seems that my Asus RT-N66U is bricked/dead. He stops working after approx 10min... I'll order a new one to test...
    I think its a hardware-related issue due sometimes he just boots in recovery mode :S

    EDIT2: My replacement Asus now is working normally - so this post can be ignored...^^
     
  85. windozer

    windozer Networkin' Nut Member

    Foolproof instructions. Mounted usb drive is my PREFIX. Installed pixelserv, script and config, and added into WANUP, scheduler. Thanks for everything.
     
  86. QSxx

    QSxx LI Guru Member

    Just an idea for those of us who like to keep large blacklists/whitelists... Why not introduce an option for script to handle separate files for "whitelist" and "blacklist" instead of just entering lines of hosts in CONFIG.

    Otherwise it DOES work better than All-in-one...
     
  87. HunterZ

    HunterZ LI Guru Member

    Thanks for this, it suits my needs than ALL-U-NEED. I'm running Toastman on an RT-N16 with a CIFS mount for external storage needs.

    Also: I run something called nullserv on a Linux box, which is like pixelserv but it also serves up dummy files of formats besides .gif. I was able to get it working with this ad blocker by configuring the ad blocker not to use pixelserv, and then changing the default redirect IP from 0.0.0.0 to 192.168.1.4 (my Linux box IP).
     
  88. mstombs

    mstombs Network Guru Member

    nullserv.c source is here
    https://github.com/flexiondotorg/nullserv/blob/master/nullserv.c,
    runs under a inetd, as did the adblock using pixelserv in dd-wrt optware solution OTRW
    should be easy to compile for router, and I will do that sometime since there's some strange code using "==" to compare strings that doesn't look correct!
    Would be easy to add the different responses to the standalone c-pixelserv which has its own sticky thread on this forum if anyone interested.
     
  89. HunterZ

    HunterZ LI Guru Member

    Oh yeah, I totally forgot about that. I fixed it to use strcasecmp() in my local copy. I just notified the author and sent him my local copy, which I should have done in the first place.

    If anyone is interested in my local copy, PM me.

    Would love to see something that runs on the router and serves up more than just .gif's.
     
  90. Badders44

    Badders44 LI Guru Member

    +1
     
  91. srouquette

    srouquette Network Guru Member

  92. Badders44

    Badders44 LI Guru Member

    Ah, great idea, didn't think of that. Unfortunately, it's a whitelist I'm after.
     
  93. QSxx

    QSxx LI Guru Member


    I used to do that and keep NAS webserver up for only two files, whitelist and blacklist. Since a complete overhaul of adblocking script was done, I expected that this time author will think of keeping whitelist/blacklist in a file, especially because script itself relies heavily on usb/jffs storage.

    I guess we'll just have to wait for haarp to make an apearance and plead our case with him XD
     
  94. HunterZ

    HunterZ LI Guru Member

    FYI, the author of nullserv has merged my changes into his github repo version.

    Diff: https://github.com/flexiondotorg/nullserv/commit/86e652a340d9fa8436efe3661587024fdb7cb6b2?w=1

    Would love to see a native router compile. I can't find clear/non-scary directions for setting up a native or cross-compiler toolchain, or else I'd try it myself.
     
  95. lancethepants

    lancethepants Network Guru Member


    Wow, small program. I went ahead and made a static binary, so should run in most places.
    http://lancethepants.com/files. In the binary section.
    edit: I also compressed it using upx. Sits at 102.1 KB

    Compiled with Tomatoware, also available on my site.
    https://github.com/lancethepants/tomatoware
     
    Monk E. Boy likes this.
  96. HunterZ

    HunterZ LI Guru Member

    Okay, so I'm an idiot. How do I run it without inetd?

    If I try to run it on its own, it segfaults.
     
  97. jerrm

    jerrm Network Guru Member

    It shouldn't segfault, just sit there waiting for input from stdin.

    But it is pretty useless without inetd or equivalent. xinetd is available under entware or optware.

    I've tested and it seems to work OK, but I wonder about performance under xinetd/inetd. Wish it was capable of listening natively.
     
  98. Bird333

    Bird333 Network Guru Member

    What does this do that is different than pixelserv? Why would we want to switch?
     
  99. JugsteR

    JugsteR Serious Server Member

    It handles more formats apparently.

    Signature? Signature!
     
  100. HunterZ

    HunterZ LI Guru Member

    Yeah, it doesn't segfault unless I hit the Enter key. That's probably OK, as that was probably an unexpected input.

    I looked for inetd on entware, but I guess my searching was too restrictive to pick up on the presence of xinetd. I'll have to search again.

    So the idea of enhancing pixelserv to support more formats may be the best solution for this use case then.

    The author of nullserv says that my interest has re-ignited his, so maybe I'll ask him about making a standalone daemon mode.

    Edit: Sent him an email, and included pixelserv v30

    Edit 2: Got this response:
    As far as I know, pixelserv only serves up 1x1 gif files in response to all requests.

    Nullserv, on the other hand, serves up gif, jpg, swf (flash), and text data to satisfy web page's requests for around 11 file extensions using around 8 MIME types. I haven't tried pixelserv, but I would imagine that by serving up something closer to what is being asked for, pages should look a little less disrupted by the removal of ads.
     

Share This Page