I have a Hasicorp Vault server running and when I do a curl request on it locally using the command below I get an error (below).
When I run the command curl -H "X-Vault-Token: $VAULT_TOKEN" $VAULT_ADDR/v1/secret/keys
it works fine on the vault server but when I do it from my laptop it gives me the error.
Both $VAULT_TOKEN
and $VAULT_ADDR
are set properly on local machine.
Error
curl: (7) Failed to connect to example.com port 8200: Operation timed out
/etc/vault.hcl
backend "file" {
path = "/var/lib/vault"
scheme = "http"
redirect_addr = "http://example.com:8200"
VAULT_ADDR = "http://example.com:8200"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 0
tls_cert_file = "/etc/letsencrypt/live/example.com/fullchain.pem"
tls_key_file = "/etc/letsencrypt/live/example.com/privkey.pem"
}
Issue didn't end up being anything to do with vault but instead was a firewall issue with port 8200
blocked on Azure.