SipStation Port Forwarding on a Juniper SSG5

I’m fairly in the PBX arena so please bear with me.

I have installed FreePBX on a CentOS linux box. I am able to make calls between phones internally and need to take things to the next level. I recently purchased a trunk and a few DIDs from SIPStation. Everything appears to have installed correctly but I am thinking I am still not forwarding the ports correclty from my firewall to the PBX box.

I am using a Juniper SSG5 and have successfully forwarded ports for other functions like a web server and an OpenVPN server using a VIP. However, the ports suggested for SIPStation is causing me some frustration. The suggested ports are TCP and UDP on 5060 and UDP ports 10001-20000. I “thought” I have configured that correctly but something must be wrong as I continue to fail the firewall test with the following error message :

FIREWALL TEST WARNING
The test timed out which means your firewall is probably configured wrong.
If subsequent tests fail, check your port forwarding on the firewall.

In the Connectivity->SIPstation section, the primary and secondary server are registering successfully and I get green lights on both of those.

Also, I can call an outside phone number and it will ring but answering does not give any audio in either direction.

If someone who has got this running on a Juniper firewall could please share their config file sections I would be very appreciative. Reading some other posts makes me think it is an ALG issue. I tried adding IGNORE to the application in the policy but that didn’t work. I am not sure how to shut it off completely. Some posts I read said it has to be shut off and others said it has to be turned on, which is adding to my confusion. I am just using the WebUI right now but can console into the box if I have to.

Version Info :
Firewall Juniper: SSG5
Hardware Version: 710(0)
Firmware Version: 6.3.0r14.0 (Firewall+VPN)
PBX Firmware:10.13.66-16
PBX Service Pack:1.0.0.0
FreePBX 13.0.192.19

The SSG is the only device between the pbx and the outside world. There will be about 10 phones on the internal network when all is finished. I have about 6 of them set up so far. Aastra 6757i’s.

Any other info I missed just let me know.

Thanks,
Kent

Turn of the SIP ALG on the Juniper. It gets in the way like all ALGs do.

Thanks Tony. I was able to get into the box and turned off ALG with the “unset alg sip enable” command but unfortunately it is still not working.

Below is my full config file for your review. I have tweaked numerous things in trying to isolate and fix this issue so perhaps I screwed something else up.

The policy (#7 & 8) are currently sitting with application set to SIP but I have tried setting both to “NONE” as well as “IGNORE”, all with no effect.

Thanks for your help with this.

unset key protection enable
set clock timezone 0
set vrouter trust-vr sharable
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set service "OpenVPN" protocol udp src-port 0-65535 dst-port 1194-1194 
set service "OpenVPN" session-cache
set service "SIP-kab" protocol tcp src-port 0-65535 dst-port 5060-5060 
set service "SIP-kab" + udp src-port 0-65535 dst-port 5060-5060 
set service "SIP-kab" + udp src-port 0-65535 dst-port 10001-20000 
set service "SIP-kab2" protocol tcp src-port 0-65535 dst-port 5060-5060 
set service "SIP-kab2" + udp src-port 0-65535 dst-port 5060-5060 
set service "SIP-kab3" protocol udp src-port 0-65535 dst-port 10001-20000 
unset alg sip enable
set alg appleichat enable
unset alg appleichat re-assembly enable
set alg sctp enable
set auth-server "Local" id 0
set auth-server "Local" server-name "Local"
set auth default auth server "Local"
set auth radius accounting port 1646
set admin name "voxadmin"
set admin password "nKGDCpr9KnHIcwnsssMUs9BEWGt0gPban"
set admin port 8080
set admin mail alert
set admin mail server-name "192.168.0.5"
set admin mail mail-addr1 "[email protected]"
set admin mail traffic-log
set admin auth web timeout 10
set admin auth dial-in timeout 3
set admin auth server "Local"
set admin format dos
set zone "Trust" vrouter "trust-vr"
set zone "Untrust" vrouter "trust-vr"
set zone "DMZ" vrouter "trust-vr"
set zone "VLAN" vrouter "trust-vr"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" tcp-rst 
set zone "Untrust" block 
unset zone "Untrust" tcp-rst 
set zone "MGT" block 
unset zone "V1-Trust" tcp-rst 
unset zone "V1-Untrust" tcp-rst 
set zone "DMZ" tcp-rst 
unset zone "V1-DMZ" tcp-rst 
unset zone "VLAN" tcp-rst 
set zone "Untrust" screen winnuke
set zone "Untrust" screen tear-drop
set zone "Untrust" screen syn-flood
set zone "Untrust" screen ping-death
set zone "Untrust" screen ip-filter-src
set zone "Untrust" screen land
set zone "V1-Untrust" screen tear-drop
set zone "V1-Untrust" screen syn-flood
set zone "V1-Untrust" screen ping-death
set zone "V1-Untrust" screen ip-filter-src
set zone "V1-Untrust" screen land
set interface "ethernet0/0" zone "Untrust"
set interface "ethernet0/1" zone "DMZ"
set interface "bgroup0" zone "Trust"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup0 port ethernet0/4
set interface bgroup0 port ethernet0/5
set interface bgroup0 port ethernet0/6
unset interface vlan1 ip
set interface ethernet0/0 ip xx.xx.16.239/24
set interface ethernet0/0 route
set interface ethernet0/1 ip 172.16.177.1/24
set interface ethernet0/1 nat
set interface bgroup0 ip 192.168.0.1/24
set interface bgroup0 nat
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
set interface ethernet0/0 ip manageable
set interface ethernet0/1 ip manageable
set interface bgroup0 ip manageable
set interface ethernet0/0 vip interface-ip 1194 "OpenVPN" 192.168.0.10
set interface ethernet0/0 vip interface-ip 80 "HTTP" 192.168.0.10
set interface ethernet0/0 vip interface-ip 5060 "SIP-kab2" 192.168.0.200
set interface bgroup0 dhcp server service
set interface bgroup0 dhcp server auto
set interface bgroup0 dhcp server option netmask 255.255.255.0 
set interface bgroup0 dhcp server option dns1 192.168.0.10 
set interface bgroup0 dhcp server option dns2 xxx.xxx.225.3 
set interface bgroup0 dhcp server option dns3 xxx.xxx.225.5 
set interface bgroup0 dhcp server ip 192.168.0.50 to 192.168.0.124 
unset interface bgroup0 dhcp server config next-server-ip
set interface "serial0/0" modem settings "USR" init "AT&F"
set interface "serial0/0" modem settings "USR" active
set interface "serial0/0" modem speed 115200
set interface "serial0/0" modem retry 3
set interface "serial0/0" modem interval 10
set interface "serial0/0" modem idle-time 10
set flow tcp-mss
unset flow no-tcp-seq-check
set flow tcp-syn-check
unset flow tcp-syn-bit-check
set flow reverse-route clear-text prefer
set flow reverse-route tunnel always
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 xxx.xxx.225.3 src-interface ethernet0/0
set dns host dns2 xxx.xxx.225.5 src-interface ethernet0/0
set dns host dns3 0.0.0.0
set crypto-policy
exit
set ike respond-bad-spi 1
set ike ikev2 ike-sa-soft-lifetime 60
unset ike ikeid-enumeration
unset ike dos-protection
unset ipsec access-session enable
set ipsec access-session maximum 5000
set ipsec access-session upper-threshold 0
set ipsec access-session lower-threshold 0
set ipsec access-session dead-p2-sa-timeout 0
unset ipsec access-session log-error
unset ipsec access-session info-exch-connected
unset ipsec access-session use-error-log
set url protocol websense
exit
set policy id 4 from "Trust" to "Untrust"  "Any" "Any" "MAIL" deny 
set policy id 4
exit
set policy id 9 from "Trust" to "Untrust"  "VIP(ethernet0/0)" "Any" "SIP-kab2" permit log 
set policy id 9 disable
set policy id 9 application "IGNORE"
set policy id 9
exit
set policy id 10 from "Trust" to "Untrust"  "VIP(ethernet0/0)" "Any" "SIP-kab3" permit log 
set policy id 10 disable
set policy id 10 application "IGNORE"
set policy id 10
exit
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" permit 
set policy id 1
exit
set policy id 5 name "OpenVPN Rule" from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "OpenVPN" permit log 
set policy id 5
exit
set policy id 6 name "OpenVPN Rule" from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "HTTP" permit log 
set policy id 6 disable
set policy id 6
exit
set policy id 7 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "SIP-kab2" permit log 
set policy id 7 application "SIP"
set policy id 7
exit
set policy id 8 from "Untrust" to "Trust"  "Any" "VIP(ethernet0/0)" "SIP-kab3" permit log 
set policy id 8 application "SIP"
set policy id 8
exit
set policy id 2 from "Untrust" to "Trust"  "Any" "Any" "ANY" deny log 
set policy id 2
exit
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set ssh enable
set config lock timeout 5
unset license-key auto-update
set telnet client enable
set snmp port listen 161
set snmp port trap 162
set snmpv3 local-engine id "0162092012001946"
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset add-default-route
set route 0.0.0.0/0 interface ethernet0/0 gateway xx.xx.16.1 permanent
set route 10.8.0.0/32 interface bgroup0 gateway 10.8.0.1
set route 10.8.0.0/24 interface bgroup0 gateway 192.168.0.10 permanent
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit

Anyone have a config file I can compare to mine? I really need to get this traffic flowing and I’m starting to get some heat so getting desperate here. Thanks!

Hello @KBliven,

Did you checked your nat settings of the sip protocol? You can press on the detect network settings as well.

Thank you,

Daniel Friedman
Trixton LTD.