$ sudo cscli lapi register -u http://192.168.1.1:8080FATA api client register: api register (http://192.168.1.1:8080/) http 400 Bad Request: http code 400, invalid body: invalid character 'C' looking for beginning of value
$ curl http://192.168.1.1:8080Client sent an HTTP request to an HTTPS server.
$ curl https://192.168.1.1:8080curl: (35) error:0A000438:SSL routines::tlsv1 alert internal error$ sudo cscli lapi register -u https://192.168.1.1:8080FATA api client register: api register (https://192.168.1.1:8080/): Post "https://192.168.1.1:8080/v1/watchers": remote error: tls: internal error
Action Protocol Source Destination Port Description Pass IPv4 TCP AppNextcloud 192.168.1.1/24 8080 Allow access to CrowdSec LAPI on OPNsense
tls: internal error
sudo cscli lapi register -u https://192.168.1.1:8080
So in fact, it seems like port 8080 delivers HTTPS:Code: [Select]$ curl https://192.168.1.1:8080curl: (35) error:0A000438:SSL routines::tlsv1 alert internal error$ sudo cscli lapi register -u https://192.168.1.1:8080FATA api client register: api register (https://192.168.1.1:8080/): Post "https://192.168.1.1:8080/v1/watchers": remote error: tls: internal error
Secure Connection FailedAn error occurred during a connection to 192.168.1.1:8080. Peer reports it experienced an internal error.Error code: SSL_ERROR_INTERNAL_ERROR_ALERT The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem.Learn more…
$sudo sockstat -l | grep crowdsec
What do you have on your OPN crowdsec plugin settings:LAPI listen address: LAPI listen port:And can you share the result of Code: [Select]$sudo sockstat -l | grep crowdsec
root@OPNsense:/usr/local/etc/crowdsec # sudo sockstat -l | grep crowdsecroot crowdsec 89455 16 tcp4 127.0.0.1:8080 *:*root crowdsec 89455 108 tcp4 127.0.0.1:6060 *:*
# sudo sockstat -l[...]root caddy 62076 11 tcp46 *:8080 *:*root caddy 62076 12 udp46 *:8080 *:*[...]
api: client: credentials_path: /usr/local/etc/crowdsec/local_api_credentials.yaml insecure_skip_verify: false server: console_path: /usr/local/etc/crowdsec/console.yaml enable: true listen_uri: 127.0.0.1:8080 log_level: info online_client: credentials_path: /usr/local/etc/crowdsec/online_api_credentials.yaml profiles_path: /usr/local/etc/crowdsec/profiles.yaml trusted_ips: - 127.0.0.1 - ::1
# cat /usr/local/etc/crowdsec/local_api_credentials.yamllogin: localhostpassword: eXcsUxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxurl: http://127.0.0.1:8080/
$ sudo cscli lapi register -u http://192.168.1.1:8080INFO Successfully registered to Local API (LAPI) INFO Local API credentials written to '/etc/crowdsec/local_api_credentials.yaml' WARN Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.
Removed custom caddy file from /usr/local/etc/caddy/caddy.d (it remained there after some recent tries in order to redirect an Unifi Controller