Frank Church
2010-Aug-06 14:45 UTC
[asterisk-users] How does deny/permit work in sip.conf?
I have been seeing some attempts to register devices on my Asterisk and I want to reconfigure it so that devices will be registered only if they are from the correct address, ie 192.168.1.8/255.255.255.255. I thought using a config like deny=0.0.0.0/0.0.0.0 permit=192.168.1.8/255.255.255.255 but it is not working the way I thought? Does that need a host=static.ip entry to work, rather than the deny/permit option? Does using a host=dynamic setting override any deny/permit and port=5060 options? Does being a peer or a user make a difference here?
Bruce Ferrell
2010-Aug-06 15:21 UTC
[asterisk-users] How does deny/permit work in sip.conf?
On 08/06/2010 07:45 AM, Frank Church wrote:> I have been seeing some attempts to register devices on my Asterisk > and I want to reconfigure it so that devices will be registered only > if they are from the correct address, ie 192.168.1.8/255.255.255.255. > > I thought using a config like > > deny=0.0.0.0/0.0.0.0 > permit=192.168.1.8/255.255.255.255 > > but it is not working the way I thought? > > Does that need a host=static.ip entry to work, rather than the > deny/permit option? > > Does using a host=dynamic setting override any deny/permit and > port=5060 options? > > Does being a peer or a user make a difference here? > >I had this same problem once. host=<ip address> or host=dynamic if you want to use permit/deny. Permit/deny and host=dynamic allows a sip peer or user to have a range of addresses.
jwexler at mail.usa.com
2010-Aug-07 01:14 UTC
[asterisk-users] How does deny/permit work in sip.conf?
This works. I have tested with the following settings: In regards to the specifics of your question: In sip.conf: dynamic_exclude_static=yes In users.conf, for each user (changing the permit statement to the ip of each user): hassip=yes host=dynamic registersip=yes deny=0.0.0.0/0.0.0.0 permit=192.168.1.8/255.255.255.255 (using your ip setting) Hope that helps -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Frank Church Sent: Friday, August 06, 2010 11:46 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] How does deny/permit work in sip.conf? I have been seeing some attempts to register devices on my Asterisk and I want to reconfigure it so that devices will be registered only if they are from the correct address, ie 192.168.1.8/255.255.255.255. I thought using a config like deny=0.0.0.0/0.0.0.0 permit=192.168.1.8/255.255.255.255 but it is not working the way I thought? Does that need a host=static.ip entry to work, rather than the deny/permit option? Does using a host=dynamic setting override any deny/permit and port=5060 options? Does being a peer or a user make a difference here? -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users