How to whitelist Public IP in PBX

Before configuring your phones in FreePBX, it’s a good idea to whitelist your IP address to avoid being blocked by Fail2ban.

You need to get the Public IP by user or ask them to visit https://www.whatismyip.com/ and provide IP address.

Follow below steps to Whitelist an IP

Login to FreePBX using Putty

Run the below command to Whitelist it

iptables -A INPUT -s X.X.X.X/16 -j ACCEPT

X.X.X.X should be replacing with the IP address we got from user.

Then, run the below command to save changes

iptables-save > /etc/sysconfig/iptables

To view the IPtabes list to verify if IP has been added successfully

less /etc/sysconfig/iptables

We can also use Asterisk console to view all extensions/registered accounts

asterisk -vr

sip show peers

Type exit to comes out from Asterisk Console

Leave A Comment

Your email address will not be published. Required fields are marked *