Reference12r1:Concept Reverse Proxy: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
mNo edit summary
Line 2: Line 2:
The Reverse Proxy is a software module, which is available on innovaphone gateways. It is designed to allow safe access to services of the innovaphone PBX from the public internet. To accomplish this the gateway must be accessible from the public internet either by NAT port forwarding, or directly. The reverse proxy forwards traffic to configurable destinations.
The Reverse Proxy is a software module, which is available on innovaphone gateways. It is designed to allow safe access to services of the innovaphone PBX from the public internet. To accomplish this the gateway must be accessible from the public internet either by NAT port forwarding, or directly. The reverse proxy forwards traffic to configurable destinations.
The access to internal destinations can be limited in several ways and algorithms to detect attacks are implemented, which are used to put ip addresses into a blacklist.
The access to internal destinations can be limited in several ways and algorithms to detect attacks are implemented, which are used to put ip addresses into a blacklist.
The reverse proxy support H.323, SIP, HTTP and LDAP over TCP or TLS.
The reverse proxy supports H.323, SIP, HTTP and LDAP over TCP or TLS.


== Configuration ==
== Configuration ==


The reverse proxy only accepts any connections on the supported protocols, if the port numbers for these protocols are configured. The well-kown port numbers or  
The reverse proxy only accepts any connections on the supported protocols, if the port numbers for these protocols are configured. The well-known port numbers or  
non standard port numbers can be used for these protocols.
non standard port numbers can be used for these protocols.


Line 13: Line 13:
A threshold suspicious requests per minute can be used to tune detection of attacks.
A threshold suspicious requests per minute can be used to tune detection of attacks.


Forwarding to internal destinations is based on the addressed host. For this the received requests are analyed and for each supported protocol different elements are used to identify the addressed host.
Forwarding to internal destinations is based on the addressed host. For this the received requests are analysed and for each supported protocol different elements are used to identify the addressed host.


== Basic Operation ==
== Basic Operation ==
Line 19: Line 19:
Connections are accepted on the configured port. The received protocol is analysed to determine the addressed host and a internal connection is established to this host. If the incoming connection is TCP for the internal connection TCP is used as well, if the external connection is TLS, for the internal connection TLS is used. If only TCP or only TLS is configured for the internal connection it is used regardless if the incoming connection was TCP or TLS.
Connections are accepted on the configured port. The received protocol is analysed to determine the addressed host and a internal connection is established to this host. If the incoming connection is TCP for the internal connection TCP is used as well, if the external connection is TLS, for the internal connection TLS is used. If only TCP or only TLS is configured for the internal connection it is used regardless if the incoming connection was TCP or TLS.


If the Check Certificate checkmark is set, for the internal connection TLS is used only if the received certificate matches the user name within the protocol. This way a host receiving a request thru the Reverse Proxy using TLS can assume that the connection was authenticated using a valid certificate, which matches the user.
If the Check Certificate checkmark is set, for the internal connection TLS is used only if the received certificate matches the user name within the protocol. This way a host receiving a request through the Reverse Proxy using TLS can assume that the connection was authenticated using a valid certificate, which matches the user.


Access to a configured protocol may be limited to certain networks. This is done by configuring a list of networks in a addr:mask form.
Access to a configured protocol may be limited to certain networks. This is done by configuring a list of networks in a addr:mask form.
Line 31: Line 31:
=== SIP ===
=== SIP ===


For SIP registration the domain part of the from header of a REGISTER message is matched to the Name of the configured host.
For SIP registration the domain part of the FROM header of a REGISTER message is matched to the Name of the configured host.


Also SIP INVITE messages are forward by Reverse Proxy if FROM URI match with configured host.
Also SIP INVITE messages are forwarded by the Reverse Proxy, if the FROM URI matches with the configured host.


=== HTTP ===
=== HTTP ===


For HTTP request the host header is matched to the Name of the configured host. If within a single TCP/TLS connection requests are sent to different hosts, the outgoing connections are terminated and for the request to the other host a new connection is established.
For HTTP requests the host header is matched to the Name of the configured host. If within a single TCP/TLS connection requests are sent to different hosts, the outgoing connections are terminated and for the request to the other host a new connection is established.


The path which may be accessed can be restricted, by configuring the allowed path. If the pass is configured with a trailing '/' no access to folders inside this path is allowed.
The path which may be accessed can be restricted, by configuring the allowed path. If the pass is configured with a trailing '/' no access to folders inside this path is allowed.

Revision as of 09:06, 25 April 2017

The Reverse Proxy is a software module, which is available on innovaphone gateways. It is designed to allow safe access to services of the innovaphone PBX from the public internet. To accomplish this the gateway must be accessible from the public internet either by NAT port forwarding, or directly. The reverse proxy forwards traffic to configurable destinations. The access to internal destinations can be limited in several ways and algorithms to detect attacks are implemented, which are used to put ip addresses into a blacklist. The reverse proxy supports H.323, SIP, HTTP and LDAP over TCP or TLS.

Configuration

The reverse proxy only accepts any connections on the supported protocols, if the port numbers for these protocols are configured. The well-known port numbers or non standard port numbers can be used for these protocols.

A timeout may be configured until which an entry in the blacklist is removed automatically.

A threshold suspicious requests per minute can be used to tune detection of attacks.

Forwarding to internal destinations is based on the addressed host. For this the received requests are analysed and for each supported protocol different elements are used to identify the addressed host.

Basic Operation

Connections are accepted on the configured port. The received protocol is analysed to determine the addressed host and a internal connection is established to this host. If the incoming connection is TCP for the internal connection TCP is used as well, if the external connection is TLS, for the internal connection TLS is used. If only TCP or only TLS is configured for the internal connection it is used regardless if the incoming connection was TCP or TLS.

If the Check Certificate checkmark is set, for the internal connection TLS is used only if the received certificate matches the user name within the protocol. This way a host receiving a request through the Reverse Proxy using TLS can assume that the connection was authenticated using a valid certificate, which matches the user.

Access to a configured protocol may be limited to certain networks. This is done by configuring a list of networks in a addr:mask form.

H.323

For H.323 registrations, the gatekeeper identifier received in GatekeeperRequest or RegistrationRequest messages is matched to the Name configured for the host. Only H.323 over H.225 (H.450-17) is supported.

For calls without registration a destination in the for <user>@<domain> is expected. <domain> is matched to the Name configured for the host. This can be used for H.323 open federation.

SIP

For SIP registration the domain part of the FROM header of a REGISTER message is matched to the Name of the configured host.

Also SIP INVITE messages are forwarded by the Reverse Proxy, if the FROM URI matches with the configured host.

HTTP

For HTTP requests the host header is matched to the Name of the configured host. If within a single TCP/TLS connection requests are sent to different hosts, the outgoing connections are terminated and for the request to the other host a new connection is established.

The path which may be accessed can be restricted, by configuring the allowed path. If the pass is configured with a trailing '/' no access to folders inside this path is allowed.

LDAP

For LDAP the LDAP_BIND message is analysed. A user in the form <domain>\<user> is expected and the <domain> is matched to the Name of the configured host.

Attack detection

Attacks are detected based on the frequency of unsuccessful requests. If more then a configured number of such requests are received within a sliding window of 1min the originating IP address is put into the black list.

To provide some indication about current suspicious requests a list with the the 10 remote IP addresses with the highest number of requests is displayed.


Blacklist/Whitelist

A blacklist/whitelist mechanism is used to block IP addresses or grant access to IP addresses regardless of attack detection. An entry into list can be configured with a timeout, so that it will be removed after the timeout automatically. Entries generated by the attack detection use the configured timeout.

A blacklist entry can be easily changed to a whitelist entry by setting the whitelist checkmark.

Reverse Proxy with innovaphone PBX

The innovaphone PBX has some features implemented especially for integration with the Reverse Proxy.

Controlling Authentication

On the innovaphone PBX a list of Reverse Proxies can be configured which are used to forward requests to the PBX. A Reverse Proxy is identified by its IP address. Optionally a certificate name can be configured for a Reverse Proxy, to verify that the connection really sent by the Reverse Proxy and not just relayed by some other equipment.

Registrations through a Reverse Proxy are only accepted if the Reverse Proxy flag at the destination device is set. This way no unexpected registration is possible. When the Assume TLS checkmark is set, a registration received from the Reverse Proxy via TLS is assumed to be authenticated with a proper TLS certificate on the Reverse Proxy already. So no further authentication is required on the PBX. Such a registration is accepted also if TLS Only is set on the device. If a registration from the Reverse Proxy is received via TCP password authentication is required.

Support for multiple Slave PBXs

To address a specific Slave PBX through a Reverse Proxy, a GK-ID with the format <domain>/<location> can be used. A PBX ignores anything in the GK-ID after the '/'. This way in the Reverse Proxy for each slave PBX sharing all the same domain a separate host entry can me configured.

On the phone this format can be used to address the correct destination PBX.

If the registration redirect mechanism shall be used, so that all client can share the same configuration, normally the PBX redirects to the IP address of the correct slave. In this case this does not work since from the public internet the internal addresses are inaccessible, so DNS Names must be configured on all PBXs. In the external DNS these DNS names must all be resolved to the Remote Proxy. The PBX changes the redirect GK-ID to contain the new location in the above format.

The physical location of the phone in case of redirection is the PBX to which the first registration was made. The PBX uses the <physical-location>@domain... format of the GK-ID on redirection.

Physical location and registration PBX can be configured manually on the phone by using a GK-ID of <physical-location>@domain/<registration PBX>

Support for Standby PBXs

To address different PBXs for the primary and the alternate registration different GK-IDs have to be used for the primary and alternate (standby) PBX in the form of <domain>/<location> with a different location for primary and alternate. This way in the reverse proxy different host entries can be configured to address the active and standby PBX. To configure this on innovaphone endpoints a GK-ID in the form <domain>/<primary>:<alternate> can be configured. For the primary registration <domain>/<primary> and for the alternate registration <domain>/<alternate> is then used.

SIP Federation over Reverse Proxy not functional

Reverse Proxy supports SIP INVITE this allow us to have a SIP Federation interface working through the RP to make audio/video and chat calls in theory however SIP SUBSCRIBE message isn't supported by the RP this means that Presence sharing doesn't work so SIP Federation will not work 100%.