Lukasz Wojciechowski
2006-May-01 10:51 UTC
[Asterisk-Users] Listening on one IP and binding to other IP - is this possible ?
Hello Im new to Asterisk and generally to IPPBX. Quick specification of my SOHO system: 1. 2 Interfaces: WAN and LAN 4. 5 VoIP phones configured with SIP attached to LAN 5. 1 external SIP line configured as "gateway" for VoIP phones to allow outbound calls. What I want is to set secure Asterisk platform. I would like Asterisk to allow connections only from LAN but I would also like to use 1 SIP account which requires registration on my provider sip server which needs Internet connection. When I set sip.conf "bindaddr" option to my LAN addres I was sure that Asterisk will use WAN interface for Internet connections but i was wrong :|. When I set "bindaddr" back to "0.0.0.0" then all is ok except that Asterisk allow to connect and register SIP accounts from WAN. My general question is: How to make Asterisk listen only on LAN interface and use WAN interface for Internet connections ? I could set NAT from LAN => WAN but this would be ugly, so I prefer to handle this problem using Asterisk configuration. Thaks in advance for any help
Bartosz Jozwiak
2006-May-02 11:00 UTC
[Asterisk-Users] Listening on one IP and binding to other IP - isthis possible ?
> Hello > > Im new to Asterisk and generally to IPPBX. > > Quick specification of my SOHO system: > 1. 2 Interfaces: WAN and LAN > 4. 5 VoIP phones configured with SIP attached to LAN > 5. 1 external SIP line configured as "gateway" for VoIP phones to allow > outbound calls. > > What I want is to set secure Asterisk platform. I would like Asterisk to > allow connections only from LAN but I would also like to use 1 SIP > account which requires registration on my provider sip server which > needs Internet connection. > > When I set sip.conf "bindaddr" option to my LAN addres I was sure that > Asterisk will use WAN interface for Internet connections but i was wrong > :|. > > When I set "bindaddr" back to "0.0.0.0" then all is ok except that > Asterisk allow to connect and register SIP accounts from WAN. > > My general question is: > How to make Asterisk listen only on LAN interface and use WAN interface > for Internet connections ? > > I could set NAT from LAN => WAN but this would be ugly, so I prefer to > handle this problem using Asterisk configuration. >To solve it quickly... set up some kind of firewall with iptables and allow/disallow sip access from certain IP addresses. Bartosz