Can't get certificates & DNS challenge refuses to work

This means the request is not reaching Caddy at all. There must be a network issue (e.g. firewall) blocking the request. You mentioned that your modem does not allow the ports 80/443. This limitation might be contributing to what you’re experiencing.