First off, hello to all members, newbie here!
Some background info first, I’ve recently installed my first asterisk server, and connected it to a voip service, I’ve only added a very small amount to my account on the upstream voip provider, I will be allowing my internal users access to their extensions whilst roaming, I have a pfsense firewall and the only way I could get audio working was to configure an 1to1 NAT with one of my public IP’s, open UDP from 10000 to 50000 and open tcp/udp to 5060 and 5061, fantastic audio works when a users dials in from outside.
THEN this morning…mere hours after opening my asterisk to the world…I get this on my console
chan_sip.c:26401 handle_request_invite: Call from ‘’ (195.154.181.131:5071) to extension ‘900972592265693’ rejected because extension not found in context ‘default’.
This is not one of my devices, this is someone trying to hack me
I’ve followed some guides on security from this site.
http://www.ipcomms.net/blog/70-11-steps-to-secure-your-asterisk-ip-pbx
And I’ve run an online sip scanner from http://sipscanner.voicefraud.com/ and the only negative thing it came up with is that my asterisk is advertising that it’s an asterisk server, and what version it is.
My SIP.CONF
[general]
alwaysauthreject=yes
default=inbound
subscribecontext=default
bindport=5060
bindaddr=0.0.0.0
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
allow=h264
limitonpeer=yes
srvlookup=yes
call-limit=10
nat=force_rport,comedia
externip=(mypubip)
localnet=172.16.0.0/255.255.0.0
videosupport=yes
accept_outofcall_message=yes
outofcall_message_context=messages
auth_message_requests=no
; ###### SIP PEERS ########
; voipservice peer
[voipservice]
directmedia=no
context=cyta
host=172.16.0.108
secret=mysecret
type=peer
username=username
disallow=all
allow=ulaw
allow=alaw
allow=h264
trustrpid=yes
sendrpid=yes
insecure=invite
videosupport=yes
nat=force_rport,comedia
My extensions.conf
[general]
autofallthrough = no
priorityjumping = yes
static = yes
writeprotect = no
clearglobalvars = yes
exten => .,1,Hangup()
exten => i,1,Hangup()
[voipservice]
include => voipservice-inbound
include => voipservice-outbound
[voipservice-outbound]
exten => _XXXXXXXX,1,Dial(SIP/${EXTEN}@voipservice,20,r)
exten => _XXXXXXXX,n,Hangup()
exten => _XXXXXXXXXXXXX,1,Dial(SIP/${EXTEN}@voipservice,20,r)
exten => _XXXXXXXXXXXXX,N,Hangup()
;[internal]
exten => _6000,1,Dial(SIP/username,10,r)
exten => _6000,n,Followme(username,40,r)
exten => _6000,n,Voicemail(6000@voicemail)
exten => _6000,n,Hangup()
exten => .,1,Hangup()
exten => i,1,Hangup()
exten => _6XXX,1,Dial(SIP/${EXTEN},10,r)
exten => _6XXX,n,Followme(${EXTEN},40,r)
exten => _6XXX,n,Voicemail(${EXTEN}@voicemail)
exten => _6XXX,n,Hangup()
exten => .,1,Hangup()
exten => i,1,Hangup()
[voipservice-inbound]
exten => DID,1,Answer
exten => DID,n,Dial(SIP/6000,12)
exten => DID,n,Voicemail(6000@voicemail)
exten => DID,n,Hangup()
So I’ve only setup some basic functionality…does anyone know how this person has connected to my asterisk? and on port 5070 which is not open…unless the pfsense 1to1 NAT opens all ports.
Does this person not need to have at least a username and password to access my asterisk?
What other security measures can I take? Any help much appreciated!