Koozali.org formerly Contribs.org

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: fred2k3 on June 26, 2014, 07:02:35 PM

Title: Restricting registration IPs
Post by: fred2k3 on June 26, 2014, 07:02:35 PM
Every so often we get hacking attempts on our SAIL 3.1.1-22 PBX (which cause a huge grind) in the form of repeated:

[Jun 26 16:11:31] NOTICE[4426]: chan_sip.c:24331 handle_request_register: Registration from '"6006" <sip:6006@Our PBX IP>' failed for '64.22.107.114:8550' - Wrong password

I know we can drop these using: /sbin/iptables -I INPUT -s '64.22.107.114 -j DROP

..but how can I restrict registration by IP address?

And how did the hackers find out about that extension number?
Title: Re: Restricting registration IPs
Post by: compsos on June 29, 2014, 08:52:09 AM
Hi Fred
Install fail2ban and get the asterisk.conf file from sarkpbx.com site. It will stop them after 3 attempts for 24 hrs.
Title: Re: Restricting registration IPs
Post by: anosh on December 03, 2014, 08:04:16 AM
Thanks for your reply.
Title: Re: Restricting registration IPs
Post by: hamarima on February 15, 2017, 03:38:39 PM
Does anybody know how to restrict the IPs that are virtual IPs? when users try to login througth horison wm ware, for example...
Title: Re: Restricting registration IPs
Post by: ReetP on February 16, 2017, 07:44:29 PM
Does anybody know how to restrict the IPs that are virtual IPs? when users try to login througth horison wm ware, for example...

An IP is an IP, virtual or not. Do you mean a public or private IP ?

IMHO the best option is to not make your server publicly accessible and only allow access from vpn or trusted local connections.

E.g my users on my networks can only connect via router based ipsec in the offices, or with openvpn if off site.

My 10c for a quieter life.....

B. Rgds
John
Title: Re: Restricting registration IPs
Post by: jameswilson on March 29, 2017, 10:09:49 PM
On a serious note I use 3cx on a vm. Id rather use sail but its not directly integrated into sme, how much would be required £ wise to if there is an interest?
Title: Re: Restricting registration IPs
Post by: Jean-Philippe Pialasse on March 30, 2017, 09:25:40 PM
have you considered https://wiki.contribs.org/FreePBX ?
contrib already integrated, with backup and restore functionality. Recent version of Asterisk supported, and up to date version of Freepbx to handle easily your configuration.