wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,168
- Reaction score
- 5,199
Using Travelin' Man with WhiteList App
If you decide to implement the WhiteList App, you'll need to make a few changes to Travelin' Man because you not only need to authorize the remote IP addresses with Asterisk, but now they need to be authorized with IPtables as well.
By default, iptables cannot be run except by root. To fix this, edit /etc/sudoers. Find the line which reads:
Defaults requiretty
Immediately below that line, add the following entry:
Defaults:asterisk !requiretty
Then move to the bottom of the file and add the following:
asterisk ALL = NOPASSWD: /sbin/iptables
Finally, in every directory under /var/www/travelman, edit index.php. Find the line which reads:
exec('asterisk -rx "sip reload"');
Immediately below that line, add the following entry:
exec('sudo /sbin/iptables -A WHITELIST -s '.$thisip.' -j ACCEPT');
If you decide to implement the WhiteList App, you'll need to make a few changes to Travelin' Man because you not only need to authorize the remote IP addresses with Asterisk, but now they need to be authorized with IPtables as well.
By default, iptables cannot be run except by root. To fix this, edit /etc/sudoers. Find the line which reads:
Defaults requiretty
Immediately below that line, add the following entry:
Defaults:asterisk !requiretty
Then move to the bottom of the file and add the following:
asterisk ALL = NOPASSWD: /sbin/iptables
Finally, in every directory under /var/www/travelman, edit index.php. Find the line which reads:
exec('asterisk -rx "sip reload"');
Immediately below that line, add the following entry:
exec('sudo /sbin/iptables -A WHITELIST -s '.$thisip.' -j ACCEPT');
Last edited by a moderator: