UnboundBL icon indicating copy to clipboard operation
UnboundBL copied to clipboard

Blocklist and whitelist fields empty

Open Madj42 opened this issue 6 years ago • 11 comments

Running into an issue with the two fields above where they show up blank on page load. They are definitely there but look to be hidden in the page load. Has anyone else ran into this issue or have a fix? I'm assuming this plugin is abandoned?

Madj42 avatar Nov 10 '19 05:11 Madj42

The same problem here, is the project really abandoned?

marcelloinfoweb avatar Dec 12 '19 11:12 marcelloinfoweb

@alectrocute sorry to bother but could you at least resolve this problem? In the meantime ill check if i can do something about but i'm not a developer and my knowledge is limited. Thanks for your work.

Keltere avatar Feb 22 '20 12:02 Keltere

Strangely the fields have all the links listed but they disappear after showing the count of the entries

Before: Screenshot (43)

After: Screenshot (44)

You can see it on the right

I think it's just a javascript problem and this is the script that must be fixed

function numberWithCommas(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function getStats(){ajaxCall(url="/api/unboundbl/service/stats",sendData={},callback=function(e,n){$("#statsInner").text(numberWithCommas(e.message))})}$(document).ready(function(){var e={frm_general_settings:"/api/unboundbl/general/get"};mapDataToFormUI(e).done(function(e){formatTokenizersUI(),$(".selectpicker").selectpicker("refresh")}),getStats(),$("#responseMsg").addClass("hidden"),$("#console-dnsbl").addClass("hidden"),mapDataToFormUI(e).done(function(e){}),$("#saveAct").click(function(){$("#saveAct").prop('disabled',true),saveFormToEndpoint(url="/api/unboundbl/general/set",formid="frm_general_settings",callback_ok=function(){$("#saveAct_progress").addClass("fa fa-spinner fa-pulse"),$("#console-dnsbl").removeClass("hidden"),$("#responseMsgInner").text("Working..."),ajaxCall(url="/api/unboundbl/service/reload",sendData={},callback_ok=function(){ajaxCall(url="/api/unboundbl/service/refresh",sendData={},callback=function(e,n){$("#responseMsg").removeClass("hidden"),$("#saveAct").prop('disabled',false),$("#responseMsg").text("Settings changed! Please restart your DNS resolver."),$("#responseMsgInner").text(e.message),getStats(),$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse")})})})})});const copyToClipboard=e=>{const n=document.createElement("textarea");n.value="include:/var/unbound/dnsbl.conf",n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",document.body.appendChild(n);const t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);n.select(),document.execCommand("copy"),document.body.removeChild(n),t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t))};

Keltere avatar Feb 22 '20 13:02 Keltere

@Madj42 @marcelloinfoweb on /usr/local/opnsense/mvc/app/views/OPNsense/Unboundbl/general.volt replace it with this after removing the .txt extension general.volt.txt

For this workaround i just removed mapDataToFormUI(e).done(function (e) {}) from the script You won't be able to copy the url but it's a decent workaround for now.

Keltere avatar Feb 22 '20 13:02 Keltere

@Keltere thank you for this, can you please create a pull request so it can be fixed in the future?

kevin88252 avatar Apr 08 '20 13:04 kevin88252

@Keltere thank you for this, can you please create a pull request so it can be fixed in the future?

It isn't a fix, just a workaround so i will not make a pull request, sorry. Anyway even with this fix if a great number of entries is added unbound will just stop working. Don't know how many or what is causing this (maybe multiple entries of the same host). I really suggest to just pick a raspberry pi and use pihole if you need dns block or move to bind

Keltere avatar Apr 08 '20 14:04 Keltere

maybe you are right, it is sad to see that there is no more developing...

does bind work on opnsense?

kevin88252 avatar Apr 08 '20 14:04 kevin88252

maybe you are right, it is sad to see that there is no more developing...

does bind work on opnsense?

Of course some uses unbound and bind together but i didn't look into yet. Good luck.

Keltere avatar Apr 08 '20 15:04 Keltere

I've been meaning to get back to this project, but full-time work has taken priority as of late. :(

alectrocute avatar Apr 13 '20 18:04 alectrocute

I've been meaning to get back to this project, but full-time work has taken priority as of late. :(

By my test Unbound itself crashes with a lot of entries. If unbound can't handle the load there is no point in continuing this project and in that case don't worry at all. Anyway thanks for at least have tried to do something for the community, hope you stay safe this days.

Keltere avatar Apr 13 '20 18:04 Keltere

+1 for me also... I am not seeing my working block and white lists as I add them. They simply disappear on each service restart.

Would be helpful to know where the whitelist entries are stored off to.. image

...EDIT: Think I found it. Will just have to remember to hand edit this and restart unboundDNS each time since UI is currently a blackhole. cat /usr/local/etc/Unboundbl/UnboundBL.conf image

fireheadman avatar Jul 10 '20 17:07 fireheadman