Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 138 Next »

This page describes the network security measures that must be implemented in order to protect your VoipNow infrastructure.

Networks

VoipNow Managed Firewall

VoipNow does not manage security. While it does its best to protect on the application stack level, it cannot guess your network topology and it cannot manage firewalls.

For convenience we included a node level firewall that is designed to help you deploy a basic network firewall on the host level.

A firewall installer is available on each VoipNow node. It will automatically detect the roles running on your node roles and apply only the corresponding access rules. Furthermore, it also contains a built-in safety feature to ensure you don't lose access to your server.

Installation

Trust some networks (optional)

You can always fully trust some networks. The installed firewall will never perform filtering for them (in/out).

Edit /etc/voipnow/local.conf and uncomment the TRUSTED_NET variable, replacing its value with your local network IP and netmask:

# Access from these networks is always allowed (eg: TRUSTED_NET 10.10.34.12/32 10.10.33.1/24) # TRUSTED_NET NETWORK/MASK
should be changed into something similar to:
# Access from these networks is always allowed (eg: TRUSTED_NET 10.10.34.12/32 10.10.33.1/24) TRUSTED_NET 172.16.100.1/24
This must be done on all VoipNow nodes in the infrastructure.

Apply firewall (test mode)

Execute the following command:

/usr/local/voipnow/admin/sbin/voipnow_firewall
Starting VoipNow firewall configuration...
Your existing firewall has been saved in /tmp/iptables.20650
If everything is correct, please remove the cron job by running:
/root/core/shell/voipnow_firewall ok
The firewall installer will:

  • save your existing firewall rules into a temporary file ( /tmp/iptables.20650 in the above example)
  • inspect the VoipNow Cloud Management for roles assigned to this role
  • attempt to detect ports used by each role and apply the corresponding firewall rules
  • install a "safety net" consisting of a cron job which does a firewall flush after 10 minutes

You can see this safety net as a line in crontab:

*/10 * * * * /sbin/iptables -P INPUT ACCEPT; /sbin/iptables -P FORWARD ACCEPT;/sbin/iptables -P OUTPUT ACCEPT;/sbin/iptables -F;/sbin/iptables -X

Apply firewall (final mode)

Assumiing that everything is ok, run the firewall script again with the ok parameter (this will remove the cron job and leave your newly generated firewall rules in place):

[root@localhost ~]# /usr/local/voipnow/admin/sbin/voipnow_firewall ok Script called with ok option - removing safety net

Private Network

The private network must be isolated. Only VoipNow nodes must be able to access it - it should not be shared with any other system. Furthermore, generic host level network firewalls must be configured to allow connection only on the ports that are opened on each role.

Public Network

The public network must be protected with firewalls. Connections must be allowed only on the ports configured to be accessed by customers' devices.

The sections below offer several recommendations on how to set up firewalls based on the role of the node.

Role Network Filtering

Functionaly Layer

Web Management Interface

Requires public network access, as well as private network access for management and database traffic. Traffic is encrypted; both private and public networks are required. Supports authentication and authorization methods. Could be protected with an application level firewall.

SIP

Requires public network access, as well as private network access for management and database traffic. Traffic can be encrypted with TLS as long as involved parties support this protocol otherwise its not encrypted; both private and public networks are required. Supports authentication and authorization methods. Could be protected with an application level firewall.

PBX

Requires public network access, as well as private network access for management and database traffic. Traffic can be encrypted (SRTP) as long as involved parties support the protocol otherwise traffic not encrypted; both private and public networks are required. Supports authentication and authorization methods.

Jabber

Requires public network access, as well private network access for management and database traffic. It is a good idea to implement on this service rate limitations based on source IP. Application layer firewall is available for XMPP protocol from independent vendors.

Infrastructure Management

Infrastructure Controller

Requires private network access. Traffic is encrypted.

Worker

Task scheduler that does not listen on any port but requires private network access to connect to other roles.

Queue

Requires private network access only. Traffic is not encrypted; connection is authenticated. It is not important to secure the traffic, but for superior protection it is a good idea to allow traffic only from the relevant roles (even in the private network).

Storage Layer

SQL

Traffic must be kept in the private network. Traffic is not encrypted; connection is made using authentication.

Distributed Database

Traffic must be kept in the private network. Traffic is not encrypted; connection is authenticated, but some basic operations to the database are possible without credentials.

Elasticsearch

Traffic must be kept in the private network. Traffic is not encrypted; connection is authenticated.


Amazon S3

Traffic is on the public network and is encrypted, connection is authenticated.

  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.