Cert error when trying to access torrent trackers, causing problems with Jackett

let’s do it the hard way

rm /etc/resolv.conf
eval "echo -e 'domain home\nnameserver 9.9.9.9' > /etc/resolv.conf"
reboot
dig bt4g.org

Thank you for your answer and your help. Sadly, dig bt4g.org still redirected to my localhost after this :

root@DietPi:~# dig bt4g.org

; <<>> DiG 9.16.22-Raspbian <<>> bt4g.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42170
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: a9e356d8cd3483638c18495561ae53a1accd2cb3e4defb8c (good)
;; QUESTION SECTION:
;bt4g.org.                      IN      A

;; ANSWER SECTION:
bt4g.org.               5       IN      A       127.0.0.1

;; Query time: 10 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Dec 06 19:17:16 +01 2021
;; MSG SIZE  rcvd: 81

So I looked into resolv.conf, and it still was

# Generated by dhcpcd from eth0.dhcp, eth0.dhcp6, eth0.ra
# /etc/resolv.conf.head can replace this line
domain home
nameserver 192.168.1.1
nameserver fe80::229a:7dff:fe37:5970%eth0
nameserver 2a01:cb00:83e7:3b00:229a:7dff:fe37:5970
# /etc/resolv.conf.tail can replace this line

So I deleted it again, and ran your command. After that, (before reboot), it was correctly set to this :

domain home
nameserver 9.9.9.9

And after a reboot, it came back to the previous one.

So there is something that replaces my resolv.conf to the wrong one at boot. But I have no idea what it could be…

Can you check if following is running

systemctl status dhcpcd.service



root@DietPi:~# systemctl status dhcpcd.service
● dhcpcd.service - DHCP Client Daemon
     Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-12-06 19:20:46 +01; 51min ago
       Docs: man:dhcpcd(8)
    Process: 273 ExecStart=/usr/sbin/dhcpcd -b (code=exited, status=0/SUCCESS)
   Main PID: 311 (dhcpcd)
      Tasks: 1 (limit: 4915)
        CPU: 3.969s
     CGroup: /system.slice/dhcpcd.service
             └─311 /usr/sbin/dhcpcd -b

déc. 06 19:22:37 DietPi dhcpcd[311]: vetha3e9c02: carrier lost
déc. 06 19:22:37 DietPi dhcpcd[311]: vetha3e9c02: deleting address fe80::f634:16eb:c794:e67d
déc. 06 19:22:37 DietPi dhcpcd[311]: vetha3e9c02: carrier acquired
déc. 06 19:22:37 DietPi dhcpcd[311]: vetha3e9c02: IAID cb:55:33:b5
déc. 06 19:22:37 DietPi dhcpcd[311]: vetha3e9c02: soliciting a DHCP lease
déc. 06 19:22:38 DietPi dhcpcd[311]: vetha3e9c02: soliciting an IPv6 router
déc. 06 19:22:42 DietPi dhcpcd[311]: vetha3e9c02: probing for an IPv4LL address
déc. 06 19:22:47 DietPi dhcpcd[311]: vetha3e9c02: using IPv4LL address 169.254.221.84
déc. 06 19:22:47 DietPi dhcpcd[311]: vetha3e9c02: adding route to 169.254.0.0/16
déc. 06 19:22:50 DietPi dhcpcd[311]: vetha3e9c02: no IPv6 Routers available

I don’t see why it says no ipv6 router available, my router has ipv6 activated and running. But maybe it has no link with the issue.

the issue is, that it is running at all. Usually dhcpcd is not needed on DietPi. As well you have a STATIC IP and therefore running a DHCP daemon is conflicting as you can see. Do you remember if you installed it yourself?

If not needed you could purge the package

apt purge dhcpcd*

IT WORKED !!! I fully uninstalled dhcpcd, re-configured my ethernet adapter, now the resolv.conf is correct and stays correct after boot, dietpi-config correctly says that Cloudflare DNS is used, and requests to bt4g (and all the other non-working trackers) now correctly redirects to the website !!!
Jackett now works perfectly with these trackers.

Thank you so much for your patience.

I really don’t know why dhcpcd was installed, I don’t remember having any app needing it…