I had to restrict access to the Asterisk server from the computer that Kyivstar provides with the Internet. One problem is that Kyivstar distributes dynamic IP addresses. That is, the computer itself cannot be registered, since the IP address of the computer is constantly changing. So I decided to allow subnets Kievstar, and all the others to ban. Thus, we cut off all sorts of hackers and bots from China and other sinners such countries, who are very fond of scanning and to beat Asterisk by selecting a login - password for sips on the telephone. And all that is allowed is to cope with the minimum load (if any) and fail2ban.
I decided to call the operator and check with him the list of subnets from which IP clients connected to them are distributed, to which I was told that they do not provide such information to anyone under any conditions.
Google also did not please me with the list of Kyivstar subnets, but I dug up the addresses of subnets and decided to share it on the site at the same time so that I did not have to search if anyone needed it.
In Asterisk, we add the desired sip:
deny=0.0.0.0/0.0.0.0 permit=37.115.0.0/18 permit=37.115.64.0/18 permit=37.115.128.0/17 permit=37.229.0.0/16 permit=46.185.0.0/18 permit=46.185.64.0/18 permit=46.211.0.0/16 permit=81.23.16.0/21 permit=81.23.24.0/21 permit=94.153.0.0/17 permit=94.153.128.0/17 permit=109.162.0.0/18 permit=109.162.64.0/18 permit=134.249.0.0/18 permit=134.249.64.0/18 permit=134.249.128.0/17 permit=176.8.0.0/17 permit=176.8.128.0/17 permit=178.137.0.0/17 permit=193.28.200.0/24 permit=193.41.60.0/22 permit=195.245.200.0/24 permit=217.20.165.160/29
The list is current on 09.10.2012.
List 1:
37.115.0.0-37.115.63.255 37.115.64.0-37.115.127.255 37.115.128.0-37.115.255.255 37.229.0.0-37.229.255.255 46.185.0.0-46.185.63.255 46.185.64.0-46.185.127.255 46.211.0.0-46.211.255.255 81.23.16.0-81.23.23.255 81.23.24.0-81.23.31.255 94.153.0.0-94.153.127.255 94.153.128.0-94.153.255.255 109.162.0.0-109.162.63.255 109.162.64.0-109.162.127.255 134.249.0.0-134.249.63.255 134.249.64.0-134.249.127.255 134.249.128.0-134.249.255.255 176.8.0.0-176.8.127.255 176.8.128.0-176.8.255.255 178.137.0.0-178.137.127.255 193.28.200.0-193.28.200.255 193.41.60.0-193.41.63.255 195.245.200.0-195.245.200.255 217.20.165.160-217.20.165.167
List 2:
37.115.0.0/18 37.115.64.0/18 37.115.128.0/17 37.229.0.0/16 46.185.0.0/18 46.185.64.0/18 46.211.0.0/16 81.23.16.0/21 81.23.24.0/21 94.153.0.0/17 94.153.128.0/17 109.162.0.0/18 109.162.64.0/18 134.249.0.0/18 134.249.64.0/18 134.249.128.0/17 176.8.0.0/17 176.8.128.0/17 178.137.0.0/17 193.28.200.0/24 193.41.60.0/22 195.245.200.0/24 217.20.165.160/29




comment