How to clear ban list?

Hi,

guys, I need help. :slight_smile:

I was trying to set up the Yandex Smart Home custom component this night (https://github.com/dmitry-k/yandex_smart_home) and typed three or more times invalid password by mistake during oAuth. Now I have a ban and don’t know how to resolve it.
I was looking for ip_bans.yaml in the config folder but there is no such file. Does anyone know how to clear the ban list?

I have this error in logs:

2020-11-26 11:13:48 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 5-45-207-2.spider.yandex.com (5.45.207.2) (Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5409 Safari/536.5)

The component works fine before, I just tried to set up it again on clear HA.
I’m using 0.118.3, HassOS 4.16.
Also, I didn’t have the ip_ban_enabled option in http section of configuration.yaml, docs says that this parameter should be false by default but in .storage/http ip_ban_enabled: true.

If you don’t have ip ban enabled, then homeassistant hasn’t banned the ip.

If it had, the message from the log you posted would have included the phrase ‘banning ip address’ (or something similar), and the ip address would be added to the ip_bans.yaml file, where you could just delete it and restart.

So, given that homeassistant hasn’t done this, define what you mean by

Now I have a ban and don’t know how to resolve it.

Thanks for the reply!

I saw the prefix [homeassistant.components.http.ban] in logs and decided that it means a ban.

It looks like the Yandex Smart Home custom component requires a refresh token so I have to successfully pass oAuth and I did but when a third-party service is trying to get the token something happens: I got an error on the third-party service page, the warning in logs and

Login attempt failed Login attempt or request with invalid authentication from 5-45-207-2.spider.yandex.com (5.45.207.2) (Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) YaBrowser/1.0.1084.5402 Chrome/19.0.1084.5409 Safari/536.5)

in frontend notifications.

I’ve also checked /config/.storage/auth file and it looks that the token generated successfully

{
    "id": "80bc************************20e2",
    "user_id": "213b************************c919",
    "client_id": "https://social.yandex.net/",
    "client_name": null,
    "client_icon": null,
    "token_type": "normal",
    "created_at": "2020-11-26T09:13:48.346497+00:00",
    "access_token_expiration": 1800.0,
    "token": "19c9************************************************************************************************************************f09e",
    "jwt_key": "6490************************************************************************************************************************9afc",
    "last_used_at": "2020-11-26T09:13:48.347271+00:00",
    "last_used_ip": "5.45.207.2"
}

Oh, sorry :slight_smile:

A problem in the custom component and 0.118.*
Found related topic on GitHub: https://github.com/dmitry-k/yandex_smart_home/issues/116

There is a fixed version for 0.118.*: https://github.com/AlexxIT/yandex_smart_home_fix

1 Like