Upgrade 3CX to v18 and get it hosted free!

Asterisk sip permit-deny-mask

Author image

IP address mask for SIP traffic

In a user/peer definition in Asterisk config sip.conf, you may limit SIP traffic to and from this peer to a certain IP or network

Syntax

permit=<ipaddress>/<network mask>
deny=<ipaddress>/<network mask>

Order Matters! – The last matching rule is the one used. If no rule matches, then the connection is permitted.

Examples:

deny=192.168.40.38/255.255.255.255
Denies traffic from this IP address

permit=192.168.40.0/255.255.255.0
Allows traffic from this network

deny=0.0.0.0/0.0.0.0
permit=216.207.245.47/255.255.255.255
Deny every address except for the only one allowed.

You may have multiple rules for masking traffic. Rules are processed from the first to the last.

See also

  • sip.conf: insecure=

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.