bar top left
bar top right
left curve
right curve
Welcome, Guest
Go to bottom
Post Reply
Post New Topic
Page: 1
TOPIC: Elastix Firewall Configutation
#91272
Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 0
I have now successfully installed and configured the current stable version of Elastix....Real nice.

I would like to understand some things about the Security/Firewall module rules.
First, the rules that come already in elastix installation, should I leave them like they are and then add others?
It seems like 0.0.0.0/24 being rejected blocks even the gui access, so I would like to know if anyone has sample config screen shots from top to bottom that you can share or instructions on what to do?

Is there any kind of instructions on configuring this module because elastix without tears does not address it?
Does the firewall directly write to the iptables files?
(note: in error I had set the very first rule in the firewall to reject all and after that, I could only get into the pbx thru the console. I copied some instructions on how to allow/accept the local network 192.168.1.0/24 and now it works again, however I want to make sure that the firewall settings now will overwrite what I put in before)

Is there a fail2ban module for Elastix with gui and instructions for it?

Thanks in advance.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Geego
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#91276
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 181
Geego,

The rules that are there should be left in the initial instance as they are set for all the applications used by Elastix, however they should be tightened up.

For example, the SIP port is open to any address, you might want to tighten that down to the address (e.g. local address) of your phones (e.g. 192.168.1.0).

Also if you have a SIP provider coming from an external address, you need to add another SIP rule (and RTP rule) for that providers address. You would add this rule underneath the other SIP rule.

It is worth reading a basic IPTables Guide if you have not worked much with IPTables. the same concepts apply to Elastix Firewall GUI e.g. it looks through all the rules until it finds a match and processes no further. You will notice the deny rule at the end for all ports and 0.0.0.0. What this means is that if it finds no match in the higher rules, then it will definitely match on this rule, and deny the traffic.

The Elastix GUI Firewall writes to an Elastix database. When Elastix starts up (as opposed to Linux starting up), it reads from these rules and starts IPTables. It reads from this database each time you start up, and also when you make changes to the rules, so yes it will overwrite what you had before.

They have commenced a fail2ban implementation, but it looks like they held off for the release of 2.2 (e.g. they have fail2ban installed by default), but due to the unique way that they are doing the IPTables (e.g. from Database), Fail2ban will not work the way that many Internet guides show (e.g. chain ). We do need to wait for Elastix to implement the GUI and code....

Regards

Bob
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Bob
http://twitter.com/elastixbob
Moderator
Posts: 1670
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Elastix Application Notes bobfryer@gmail.com Location: Canberra, Australia Birthday: 05/03
Good Etiquette : if someones helps with a solution - update their Karma - its only a simple click.

Upgrading Elastix? Read this FAQ Now!!
elx.ec/upgfaq

Elastix Docs :
elx.ec/elastixtutorials
www.elastixconnection.com

Elastix Fault Finding Guide
elx.ec/faultfind
Reply Quote
 
#91277
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 181
Geego,

I have commenced a quick guide on the Firewall, but due to many other guides and other work taking priority, I have not had time to finish (I actually have 5 guides open on my desktop now, trying to get them finished...).

Might finish this one up in the next 48 hours, and throw it out there...it is not in depth, but talks about the basic concepts with a few pictures, and talks about renaming one of the port definitions to RTP.

Regards

Bob
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Bob
http://twitter.com/elastixbob
Moderator
Posts: 1670
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Elastix Application Notes bobfryer@gmail.com Location: Canberra, Australia Birthday: 05/03
Good Etiquette : if someones helps with a solution - update their Karma - its only a simple click.

Upgrading Elastix? Read this FAQ Now!!
elx.ec/upgfaq

Elastix Docs :
elx.ec/elastixtutorials
www.elastixconnection.com

Elastix Fault Finding Guide
elx.ec/faultfind
Reply Quote
 
#91278
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 0
Thanks Bob, very informative.

I am starting to correct a whole lot of what I had there.
Your explanation sounds pretty simple and I will update when I am done.
I need to have fail2ban but Elastix takes a long time to come out with the updates (Been waiting for months for the final stable...smile), but it is out and I am now happy.

My only issue is that I have a provider that I cannot get to them unless the Anonymous calls is set to yes.
Hopefully the firewall will take take care of it but do you have any suggestions?
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Geego
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#91279
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 181
Geeko,

When it comes down to it, it is relatively simple.

I agree updates take a while, but Elastix have learnt not to rush an update, and whilst there are a few small issues with 2.2, overall, the product is stable, useable, and works well in production.

Seriously, many of the basic IPTables guides are very good to read and you will be able to translate the concepts of implementing the rules quite easily.

Yes I am not a big fan of the anonymous either, but with correct firewall rules in place, it becomes a non-event.

Regards

Bob
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Bob
http://twitter.com/elastixbob
Moderator
Posts: 1670
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Elastix Application Notes bobfryer@gmail.com Location: Canberra, Australia Birthday: 05/03
Good Etiquette : if someones helps with a solution - update their Karma - its only a simple click.

Upgrading Elastix? Read this FAQ Now!!
elx.ec/upgfaq

Elastix Docs :
elx.ec/elastixtutorials
www.elastixconnection.com

Elastix Fault Finding Guide
elx.ec/faultfind
Reply Quote
 
#91280
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 0
so, if I am not using IAX then I can block/reject all ip's right?
And still leave it under the sip rule?
And like the pop/smtp rule, I can limit it to the local ip address?
Anything I am not using, just set it to reject in the rules?


Thanks
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Geego
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#91281
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 181
Yes, you can block/reject all IP's for IAX if you are not using it.

I have to admit haven't played with the POP/SMTP rule, and may depend on your setup....

The best part is that except for the 80/443 rule, you can change it and try it, and if it doesn't work, either turn the firewall off, or correct the rule...

Which is the correct methodology when implementing any firewall rules....test..test...test

Regards

Bob
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Bob
http://twitter.com/elastixbob
Moderator
Posts: 1670
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Elastix Application Notes bobfryer@gmail.com Location: Canberra, Australia Birthday: 05/03
Good Etiquette : if someones helps with a solution - update their Karma - its only a simple click.

Upgrading Elastix? Read this FAQ Now!!
elx.ec/upgfaq

Elastix Docs :
elx.ec/elastixtutorials
www.elastixconnection.com

Elastix Fault Finding Guide
elx.ec/faultfind
Reply Quote
 
#91282
Re:Elastix Firewall Configutation 5 Months, 2 Weeks ago Karma: 0
can you please point me to the IPTables guide that you think is the best and simple one to use/read.

Thanks
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Geego
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/12/04 16:23 By Geego.
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: Bob, jgutierrez
Protected by Spam Fighter