britannic / blacklist

Blacklist and Adware Blocking for the Ubiquiti EdgeMax Router
Other
532 stars 35 forks source link

Installation error #45

Closed MaurUppi closed 2 years ago

MaurUppi commented 2 years ago

sudo curl -L https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public.key | sudo apt-key add -

ubnt@EdgeRouter-4:~$ sudo curl -L https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public.key
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

I'm not sure is it add successfully, so that i tried to download it manually but show below error information.

ubnt@EdgeRouter-4:~$ sudo curl -L -k https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public.key

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
        <head>
            <title>Error: 404 Not Found</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans;}
              body {background-color: #fff; border: 1px solid #ddd;
                    padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            </style>
        </head>
        <body>
            <h1>Error: 404 Not Found</h1>
            <p>Sorry, the requested URL <tt>&#039;https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public.key&#039;</tt>
               caused an error:</p>
            <pre>Not found: &#039;/britannic/debian-repo/master/blacklist/public.key&#039;</pre>
        </body>
    </html>

So how can I ensure "public.key" had been add successfully by the CLI you provide?

My approach is use web browser to download keyfile, so that upload by SCP then use "sudo apt-key add public.key"

ubnt@EdgeRouter-4:~$ sudo apt-key add public.key
OK

But it looks has some error msg:

ubnt@EdgeRouter-4:~$ sudo apt-get update Ign:1 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch InRelease Ign:2 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch Release Ign:3 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main all Packages Ign:4 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main mips Packages Ign:5 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main Translation-en Ign:3 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main all Packages Ign:4 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main mips Packages Ign:5 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main Translation-en Ign:3 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main all Packages Ign:4 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main mips Packages Ign:5 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main Translation-en Ign:3 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main all Packages Ign:4 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main mips Packages Ign:5 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main Translation-en Ign:3 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main all Packages Ign:4 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main mips Packages Ign:5 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main Translation-en Ign:3 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main all Packages Err:4 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main mips Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Ign:5 https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch/main Translation-en Reading package lists... Done W: The repository 'https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public stretch Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch https://raw.githubusercontent.com/britannic/debian-repo/master/blacklist/public/dists/stretch/main/binary-mips/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none E: Some index files failed to download. They have been ignored, or old ones used instead.

MaurUppi commented 2 years ago

Following you mentioned instruction to install blacklisting on my "EdgeRouter 4 v2.0.9-hotfix.2"

ubnt@EdgeRouter-4:~$ sudo curl -L -O https://raw.githubusercontent.com/britannic/blacklist/master/edgeos-dnsmasq-blacklist_1.2.4.7_mips.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
ubnt@EdgeRouter-4:~$ sudo curl -L --insecure -O https://raw.githubusercontent.com/britannic/blacklist/master/edgeos-dnsmasq-blacklist_1.2.4.7_mips.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   868  100   868    0     0   4521      0 --:--:-- --:--:-- --:--:--  4544

ubnt@EdgeRouter-4:~$ sudo dpkg -i edgeos-dnsmasq-blacklist_1.2.4.7_mips.deb dpkg-deb: error: 'edgeos-dnsmasq-blacklist_1.2.4.7_mips.deb' is not a debian format archive dpkg: error processing archive edgeos-dnsmasq-blacklist_1.2.4.7_mips.deb (--install): subprocess dpkg-deb --control returned error exit status 2 Errors were encountered while processing: edgeos-dnsmasq-blacklist_1.2.4.7_mips.deb

britannic commented 2 years ago

Please refer to the instructions here. I wasn't able to reproduce the issues you reported, which seem to be caused by a failed download (check the downloaded file type, it likely isn't a complete debian pkg file). Also you will get quicker responses by posting your questions to the Ubiquiti thread here.