Hi Yeison,Hello Ravilla,
I remember some time ago I wrote the guide for the Mikrotik configuration so let me give you some guidance.
a. The steps 1 and 2. Will allow you to disable SIP ALG and to create the forwarding rules so when the traffic gets to the public ip address in the interface of the Mikrotik the router/firewall will forward it to the internal ip address of the 3CX. In this way, the firewall checker will pass and all the services like remote extensions, SIP trunks and so on will work.
b. The step 3 will allow you to create the rules to protect your router/firewall because it will create a rule that allows you to drop all the traffic coming from the internet however It will allow the traffic that belong to a session already established from within the LAN. In this way, the only traffic that will be accepted from the internet and will go directly to your LAN from any source will be the one that you configure in step 2 and it will be sent to the PBX. So, other people will not be able to access your devices from the internet.
c. Now, to answer the question that you said: I have the internet on the first interface and the switch connected to the second one. Then, you will need to:
- drop the traffic from the wan interface like this:
-Create a nat rule so your lan (network in the second interface connected to the switch) will be able to go to the internet by using PAT like this:
- ip firewall filter add chain=input action=accept connection-state=established
- ip firewall filter add chain=input action=accept connection-state=related
- ip firewall filter add chain=forward action=accept connection-state=established
- ip firewall filter add chain=forward action=accept connection-state=related
- ip firewall filter add chain=forward action=drop connection-state=invalid
- ip firewall filter add chain=input action=drop in-interface=ether1
ip firewall nat add chain=srcnat action=masquerade out-interface=ether1
In this way when the devices from your lan (i assume ether2 has a private range) try to go to the internet the router will mask the private ip address with the public one.
PS: Thanks for contacting us. Your comments will help us to improve the guide!
Please do not hesitate to ask me if you need further information.
Hello Ravilla,
I remember some time ago I wrote the guide for the Mikrotik configuration so let me give you some guidance.
a. The steps 1 and 2. Will allow you to disable SIP ALG and to create the forwarding rules so when the traffic gets to the public ip address in the interface of the Mikrotik the router/firewall will forward it to the internal ip address of the 3CX. In this way, the firewall checker will pass and all the services like remote extensions, SIP trunks and so on will work.
b. The step 3 will allow you to create the rules to protect your router/firewall because it will create a rule that allows you to drop all the traffic coming from the internet however It will allow the traffic that belong to a session already established from within the LAN. In this way, the only traffic that will be accepted from the internet and will go directly to your LAN from any source will be the one that you configure in step 2 and it will be sent to the PBX. So, other people will not be able to access your devices from the internet.
c. Now, to answer the question that you said: I have the internet on the first interface and the switch connected to the second one. Then, you will need to:
- drop the traffic from the wan interface like this:
-Create a nat rule so your lan (network in the second interface connected to the switch) will be able to go to the internet by using PAT like this:
- ip firewall filter add chain=input action=accept connection-state=established
- ip firewall filter add chain=input action=accept connection-state=related
- ip firewall filter add chain=forward action=accept connection-state=established
- ip firewall filter add chain=forward action=accept connection-state=related
- ip firewall filter add chain=forward action=drop connection-state=invalid
- ip firewall filter add chain=input action=drop in-interface=ether1
ip firewall nat add chain=srcnat action=masquerade out-interface=ether1
In this way when the devices from your lan (i assume ether2 has a private range) try to go to the internet the router will mask the private ip address with the public one.
PS: Thanks for contacting us. Your comments will help us to improve the guide!
Please do not hesitate to ask me if you need further information.
Founded in 2005, when VoIP was an emerging technology, 3CX has gone on to establish itself as a global leader in business communications.