Howto13r1:Firewall Settings: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
No edit summary
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- Keywords: firewall settings, ports, workload, turn config, policies, firewall rules, firewall -->
<!-- Keywords: firewall settings, ports, workload, turn config, policies, firewall rules, firewall, tapete -->
==Applies To==
==Applies To==
This information applies to
This information applies to
Line 5: Line 5:
V13 and up
V13 and up


==Scenario: Reverse Proxy in a DMZ==
==Scenario: Reverse Proxy, TURN and SBC in a DMZ==


Here we would like to give an overview of the necessary ports and protocols for a reverse proxy in a DMZ.
Here we would like to give an overview of the necessary ports and protocols for Reverse Proxy, TURN and SBC in the DMZ.


The scenario would be that a reverse proxy is used in a DMZ. The DMZ has a link to the WAN and LAN.
===Firewall Configuration===
 
===Configuration===


*Before you can setup your Firewall you have to read the book [[Course13:IT_Connect_-_10.0_Reverse_Proxy|Reverse Proxy]] in the [[Special:Prefixindex/Course13:|V13 IT Connect Training]].
*Before you can setup your Firewall you have to read the book [[Course13:IT_Connect_-_10.0_Reverse_Proxy|Reverse Proxy]] in the [[Special:Prefixindex/Course13:|V13 IT Connect Training]].
*You can see the full [http://class.innovaphone.com/moodle2/file.php/701/Course_Data%2FReverse_Proxy%2FInnovaphone_Workload.png visual presentation] in the book of the [[Course12:Advanced_-_Reverse_Proxy|V12 Reverse Proxy Lesson]].




{| class="wikitable" border="1" cellspacing="0" cellpadding="10"
{| class="wikitable" border="1" cellspacing="0" cellpadding="10"
! style="background-color: #EAECF0;text-align:center"|WAN &rArr; DMZ (Reverse Proxy) !! style="background-color: #EAECF0;text-align:center"|DMZ (Reverse Proxy) &rArr; inside (PBX) !! style="background-color: #EAECF0;text-align:center"|DMZ (Reverse Proxy) &rArr; inside (Application Platform) !! style="background-color: #EAECF0;text-align:center"|inside &rArr; DMZ (Reverse Proxy) !! style="background-color: #EAECF0;text-align:center"|DMZ (Reverse Proxy) &rArr; WAN
! style="background-color: #EAECF0;text-align:center"|WAN &rArr; DMZ !! style="background-color: #EAECF0;text-align:center"|DMZ  &rArr; inside (Endpoints) !! style="background-color: #EAECF0;text-align:center"|DMZ &rArr; inside (PBX) !! style="background-color: #EAECF0;text-align:center"|DMZ &rArr; inside (AP) !! style="background-color: #EAECF0;text-align:center"|inside &rArr; DMZ !! style="background-color: #EAECF0;text-align:center"|DMZ &rArr; WAN
|-
| STUN/TURN (udp/tcp/3478) || / || / || / || STUN/TURN (udp/tcp/3478)<br /> || /
|-
|-
| STUN/TURN (udp/tcp/3478) || / || / || STUN/TURN (udp/tcp/3478) || /
| [[Reference13r3:IP4/General/STUN#TURN_Extern|TURN Extern]] (tcp/xxxx)<br>''&bull; <span style="font-size:11px;">optionally TCP Port if you configure a fallback way</span>'' || / || / || / || [[Reference13r3:IP4/General/STUN#TURN_Extern|TURN Extern]] (tcp/xxxx)<br>''&bull; <span style="font-size:11px;">optionally TCP Port if you configure a fallback way</span>''<br /> || /
|-
|-
| LDAPS (tcp/636)<br>
| LDAPS (tcp/636)<br>
''&bull; <span style="font-size:11px;">optionally LDAP (tcp/389) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally LDAP (tcp/389) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer LDAP lookups</span>''
''&bull; <span style="font-size:11px;">needed if you want to offer LDAP lookups</span>''
|| /
|| LDAPS (tcp/636)<br>
|| LDAPS (tcp/636)<br>
''&bull; <span style="font-size:11px;">optionally LDAP (tcp/389) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally LDAP (tcp/389) if you need plaintext</span>''<br>
Line 35: Line 34:
|| /
|| /
|-
|-
| HTTPS (tcp/443)<br>
| HTTPS/WSS (tcp/443)<br>
''&bull; <span style="font-size:11px;">optionally HTTP (tcp/80) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally HTTP/WS (tcp/80) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer myApps</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer myApps</span>''<br>
''&bull; <span style="font-size:11px;">please also allow wss/ws (websocket) connections</span>''
''&bull; <span style="font-size:11px;">please also allow wss/ws (websocket) connections</span>''
|| HTTPS (tcp/443)<br>
|| /
''&bull; <span style="font-size:11px;">optionally HTTP (tcp/80) if you need plaintext</span>''<br>
|| HTTPS/WSS (tcp/443)<br>
''&bull; <span style="font-size:11px;">optionally HTTP/WS (tcp/80) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer myApps</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer myApps</span>''<br>
''&bull; <span style="font-size:11px;">please also allow wss/ws (websocket) connections</span>''
''&bull; <span style="font-size:11px;">please also allow wss/ws (websocket) connections</span>''
|| HTTPS (tcp/443)<br>
|| HTTPS/WSS (tcp/443)<br>
''&bull; <span style="font-size:11px;">optionally HTTP (tcp/80) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally HTTP/WS (tcp/80) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer myApps</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer myApps</span>''<br>
''&bull; <span style="font-size:11px;">please also allow wss/ws (websocket) connections</span>''
''&bull; <span style="font-size:11px;">please also allow wss/ws (websocket) connections</span>''
Line 54: Line 54:
''&bull; <span style="font-size:11px;">optionally H.323 (tcp/1720) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally H.323 (tcp/1720) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed if you want to offer Phone registrations</span>''  
''&bull; <span style="font-size:11px;">needed if you want to offer Phone registrations</span>''  
|| /
|| H.323 (tcp/1300)<br>
|| H.323 (tcp/1300)<br>
''&bull; <span style="font-size:11px;">optionally H.323 (tcp/1720) if you need plaintext or username/password auths with invalid certificates</span>''<br>
''&bull; <span style="font-size:11px;">optionally H.323 (tcp/1720) if you need plaintext or username/password auths with invalid certificates</span>''<br>
Line 63: Line 64:
| SIPS (tcp/5061)<br>
| SIPS (tcp/5061)<br>
''&bull; <span style="font-size:11px;">optionally SIP (tcp/5060) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally SIP (tcp/5060) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed '''only''' if you want to accept SIP registrations</span>''
''&bull; <span style="font-size:11px;">needed '''only''' if you want to accept SIP registrations, i.e. for 3rd. Party SIP phones but not for SIP-Trunks</span>''
|| /
|| SIPS (tcp/5061)<br>
|| SIPS (tcp/5061)<br>
''&bull; <span style="font-size:11px;">optionally SIP (tcp/5060) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally SIP (tcp/5060) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">needed '''only''' if you want to accept SIP registrations</span>''
''&bull; <span style="font-size:11px;">needed '''only''' if you want to accept SIP registrations, i.e. for 3rd. Party SIP phones but not for SIP-Trunks</span>''
|| /  
|| /  
|| /
|| /
|| SIPS (tcp/5061)<br>
|| SIPS (tcp/5061)<br>
''&bull; <span style="font-size:11px;">optionally SIP (tcp/5060) if you need plaintext</span>''<br>
''&bull; <span style="font-size:11px;">optionally SIP (tcp/5060) if you need plaintext</span>''
''&bull; <span style="font-size:11px;">needed if you want to register a SIP Trunk from the RP to Provider and your Provider doesn't support TURN</span>''
|-
|-
| / || / || / || RTP (udp/16384-32767)<br>
| /
''&bull; <span style="font-size:11px;">needed if you want to register a SIP Trunk from the RP to Provider and your Provider doesn't support TURN</span>''  
|| RTP (udp/16384-32767, [[Reference13r3:Concept_myApps_platform_services#RTP_service_for_audio.2C_video_and_data|udp/50000-50299]])<br>
|| RTP (udp/16384-32767)<br>
''&bull; <span style="font-size:11px;">needed if you want to use RTP instead of TURN to inside. (eg. SIP Trunk with Media-Relay, TURN Server in DMZ)</span>''
''&bull; <span style="font-size:11px;">needed if you want to register a SIP Trunk from the RP to Provider and your Provider doesn't Support TURN</span>''
|| / || /
|| RTP (udp/16384-32767, [[Reference13r3:Concept_myApps_platform_services#RTP_service_for_audio.2C_video_and_data|udp/50000-50299]])<br>
''&bull; <span style="font-size:11px;">needed if you want to use RTP instead of TURN to DMZ. (eg. SIP Trunk with Media-Relay, TURN Server in DMZ)</span>''
|| RTP (udp/xxx)<br>
''&bull; <span style="font-size:11px;">xxx are the negotiated ports in context of the outgoing sip/udp connection. The ports depend on your SIP Provider</span>''<br>
''&bull; <span style="font-size:11px;">not needed if RTP from inside to WAN is allowed directly and no media-relay is enabled)</span>''
|}
|}
=== Port Forwardings ===
If you have to use port forwardings often some of the needed ports are also needed by other systems (eg. Microsoft Exchange OWA access via tcp/443). If you run into this problem you have to forward the port to the reverse proxy and create rules (based on hostname) inside the reverse proxy to forward the traffic to the correct system.
If you have multiple external ip addreses you can also use a separate ip address per system. See also [[Howto:V13_Installation_Scenarios#Possible_scenarios_if_port_443_is_already_in_use|Possible scenarios if port 443 is already in use]].
== The complete Workload Picture ==
[[Image:V13-workload.jpg|500px]]


== Related Articles ==
== Related Articles ==
* [[Howto:Innovaphones_public_services]]
* [[Course13:IT_Connect_-_10.0_Reverse_Proxy]]
* [[Course13:IT_Connect_-_10.0_Reverse_Proxy]]
* [[Course12:Advanced_-_Reverse_Proxy]]
* [[Course12:Advanced_-_Reverse_Proxy]]
* [[Course13:IT_Advanced_2_-_06_Public_Access_to_PBX_Resources_(theory)_-_optional]]
* [[Course13:IT_Advanced_2_-_07_Public_access_to_PBX_resources_(practice)]]


[[Category:Howto|{{PAGENAME}}]]
[[Category:Howto|{{PAGENAME}}]]

Latest revision as of 09:52, 19 October 2023

Applies To

This information applies to

V13 and up

Scenario: Reverse Proxy, TURN and SBC in a DMZ

Here we would like to give an overview of the necessary ports and protocols for Reverse Proxy, TURN and SBC in the DMZ.

Firewall Configuration


WAN ⇒ DMZ DMZ ⇒ inside (Endpoints) DMZ ⇒ inside (PBX) DMZ ⇒ inside (AP) inside ⇒ DMZ DMZ ⇒ WAN
STUN/TURN (udp/tcp/3478) / / / STUN/TURN (udp/tcp/3478)
/
TURN Extern (tcp/xxxx)
optionally TCP Port if you configure a fallback way
/ / / TURN Extern (tcp/xxxx)
optionally TCP Port if you configure a fallback way
/
LDAPS (tcp/636)

optionally LDAP (tcp/389) if you need plaintext
needed if you want to offer LDAP lookups

/ LDAPS (tcp/636)

optionally LDAP (tcp/389) if you need plaintext
needed if you want to offer LDAP lookups

LDAPS (tcp/636)

optionally LDAP (tcp/389) if you need plaintext
needed if you want to offer LDAP lookups

/ /
HTTPS/WSS (tcp/443)

optionally HTTP/WS (tcp/80) if you need plaintext
needed if you want to offer myApps
please also allow wss/ws (websocket) connections

/ HTTPS/WSS (tcp/443)

optionally HTTP/WS (tcp/80) if you need plaintext
needed if you want to offer myApps
please also allow wss/ws (websocket) connections

HTTPS/WSS (tcp/443)

optionally HTTP/WS (tcp/80) if you need plaintext
needed if you want to offer myApps
please also allow wss/ws (websocket) connections

HTTPS (tcp/<your custom port>)

Advanced UI admin access

/
H.323 (tcp/1300)

optionally H.323 (tcp/1720) if you need plaintext
needed if you want to offer Phone registrations

/ H.323 (tcp/1300)

optionally H.323 (tcp/1720) if you need plaintext or username/password auths with invalid certificates
needed if you want to offer Phone registrations

/ / /
SIPS (tcp/5061)

optionally SIP (tcp/5060) if you need plaintext
needed only if you want to accept SIP registrations, i.e. for 3rd. Party SIP phones but not for SIP-Trunks

/ SIPS (tcp/5061)

optionally SIP (tcp/5060) if you need plaintext
needed only if you want to accept SIP registrations, i.e. for 3rd. Party SIP phones but not for SIP-Trunks

/ / SIPS (tcp/5061)

optionally SIP (tcp/5060) if you need plaintext

/ RTP (udp/16384-32767, udp/50000-50299)

needed if you want to use RTP instead of TURN to inside. (eg. SIP Trunk with Media-Relay, TURN Server in DMZ)

/ / RTP (udp/16384-32767, udp/50000-50299)

needed if you want to use RTP instead of TURN to DMZ. (eg. SIP Trunk with Media-Relay, TURN Server in DMZ)

RTP (udp/xxx)

xxx are the negotiated ports in context of the outgoing sip/udp connection. The ports depend on your SIP Provider
not needed if RTP from inside to WAN is allowed directly and no media-relay is enabled)

Port Forwardings

If you have to use port forwardings often some of the needed ports are also needed by other systems (eg. Microsoft Exchange OWA access via tcp/443). If you run into this problem you have to forward the port to the reverse proxy and create rules (based on hostname) inside the reverse proxy to forward the traffic to the correct system. If you have multiple external ip addreses you can also use a separate ip address per system. See also Possible scenarios if port 443 is already in use.

The complete Workload Picture

V13-workload.jpg

Related Articles