ScreenOS Firewalls (NOT SRX)
Reply
Visitor
rboege
Posts: 8
Registered: ‎12-16-2011
0
Accepted Solution

SSG5 - Massive portforwarding issues. HELP!!

Hi all. I have no idea what to do about my problems anymore. So im hoping someone very clever with the SSG5 can help me. 

I need a toturial (very good explained) how to port forward to devices etc. I've literally tried everything now, but it either crashes my internet connection or make the SSG5 use alot of processing for nothing.

 

To sum up my network. 

Public ip adress is : 46.32.51.20 (only have this one)

Subnets: 2 (i really want to make another, also need help for this.) 192.168.140.x and 192.168.141.x.

Phone's are hosted by an outside firm from ip: 89.104.223.27. (i have 18 phones atm) SIP based.

My x140.x is admins network and office computers etc. 

Currently using my DC as DNS 192.168.140.4 - and SSG5 as gateway. 

Also have a traffic shaper www.smartshare.dk - smartshare straightshaper 1100. "Click the link for info."

SSG5 admin port is set to 8080 (doesnt work from outside either)


These are the ports i want to forward. 

Phones needs 5060-5080,2048 tcp / udp

Credit card machin (192.168.140.103) : 22000,24000,13, 53, 19000.

 

Also want a counterstrike server for out students/and the public running from 192.168.140.6 on port 27000-27015, 27020-27035,1200.

 

ALso need the straightshaper to be open from public on a seperate port. 

 

This is my current config (sorry it's very messy!)

-----------------------------------------------------------------------------------------------------------------------------------

 

unset key protection enable
set clock ntp
set clock timezone 1
set clock dst recurring start-weekday 2 0 3 02:00 end-weekday 1 0 11 02:00
set vrouter trust-vr sharable
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set service "smartshare" protocol tcp src-port 0-65535 dst-port 80-80
set service "smartshare" + udp src-port 0-65535 dst-port 80-80
set service "smartshare" timeout 1440
set service "Tele" protocol tcp src-port 0-65535 dst-port 5060-5080
set service "Tele" + udp src-port 0-65535 dst-port 5060-5080
set service "Tele" timeout never
set service "dkterm22" protocol tcp src-port 0-65535 dst-port 22000-22000
set service "dkterm22" + udp src-port 0-65535 dst-port 22000-22000
set service "dkterm22" timeout never
set service "dkterm24" protocol tcp src-port 0-65535 dst-port 24000-24000
set service "dkterm24" + udp src-port 0-65535 dst-port 24000-24000
set service "dkterm24" timeout never
set service "dkterm13" protocol tcp src-port 0-65535 dst-port 13-13
set service "dkterm13" + udp src-port 0-65535 dst-port 13-13
set service "dkterm13" timeout never
set service "53" protocol udp src-port 0-65535 dst-port 53-53
set service "PBS" protocol tcp src-port 0-65535 dst-port 19000-19000
set service "PBS" + udp src-port 0-65535 dst-port 19000-19000
set service "tele1" protocol tcp src-port 0-65535 dst-port 5060-5060
set service "tele1" + udp src-port 0-65535 dst-port 5060-5060
set service "tele1" timeout never
set service "tele2" protocol tcp src-port 0-65535 dst-port 2048-2048
set service "tele2" + udp src-port 0-65535 dst-port 2048-2048
set service "tele2" timeout never
set service "cs1" protocol tcp src-port 0-65535 dst-port 27020-27035 timeout never
set service "cs2" protocol udp src-port 0-65535 dst-port 1200-1200
set service "cs3" protocol udp src-port 0-65535 dst-port 27000-27015 timeout never
set alg pptp 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 "netscreen"
set admin password "nLHRJ+rDC/3Pc8iNlsaFbMItcZJOsn"
set admin user "rb" password "nDOAAXrHGkVBcLIBtsFOpLEtmZI65n" privilege "all"
set admin port 8080
set admin mail alert
set admin mail server-name "smtp.bbsyd.dk"
set admin mail mail-addr1 "rb@ronshoved.it"
set admin auth web timeout 10
set admin auth dial-in timeout 3
set admin auth server "Local"
set admin format dos
set vip multi-port
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 id 100 "Guest"
set zone "Untrust-Tun" vrouter "trust-vr"
unset zone "Trust" tcp-rst
unset 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 "Guest" tcp-rst
unset zone "Untrust" screen tear-drop
unset zone "Untrust" screen syn-flood
unset zone "Untrust" screen ping-death
unset zone "Untrust" screen ip-filter-src
unset zone "Untrust" screen land
unset zone "V1-Untrust" screen tear-drop
unset zone "V1-Untrust" screen syn-flood
unset zone "V1-Untrust" screen ping-death
unset zone "V1-Untrust" screen ip-filter-src
unset zone "V1-Untrust" screen land
set zone "Trust" screen syn-ack-ack threshold 700
set interface "ethernet0/0" zone "Untrust"
set interface "ethernet0/1" zone "Trust"
set interface "ethernet0/1.1" tag 2 zone "Guest"
set interface "ethernet0/2" zone "DMZ"
set interface "bgroup0" zone "Null"
set interface "tunnel.1" zone "Trust"
unset interface vlan1 ip
set interface ethernet0/0 ip 46.32.51.20/27
set interface ethernet0/0 route
set interface ethernet0/1 ip 192.168.140.254/24
set interface ethernet0/1 route
set interface ethernet0/1.1 ip 192.168.141.254/24
set interface ethernet0/1.1 route
set interface tunnel.1 ip 172.16.0.97/32
set interface tunnel.1 tunnel encap gre
set interface tunnel.1 tunnel local-if ethernet0/0 dst-ip 95.154.54.204
set interface tunnel.1 tunnel keep-alive interval 10 threshold 3
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 ethernet0/1.1 ip manageable
unset interface ethernet0/1 manage snmp
unset interface ethernet0/1 manage ssl
set interface ethernet0/1.1 manage ping
unset interface ethernet0/2 manage ping
set interface ethernet0/0 vip interface-ip 13 "dkterm13" 192.168.140.103
set interface ethernet0/0 vip interface-ip 24000 "dkterm24" 192.168.140.103
set interface ethernet0/0 vip interface-ip 22000 "dkterm22" 192.168.140.103
set interface ethernet0/0 vip interface-ip 19000 "PBS" 192.168.140.103
set interface ethernet0/0 vip interface-ip 53 "53" 192.168.140.103
set interface ethernet0/0 vip interface-ip 21 "FTP" 192.168.140.247
set interface ethernet0/0 vip interface-ip 27020 "cs1" 192.168.140.6
set interface ethernet0/0 vip interface-ip 1200 "cs2" 192.168.140.6
set interface ethernet0/0 vip interface-ip 27000 "cs3" 192.168.140.6
set interface ethernet0/0 dhcp client enable
unset interface ethernet0/0 dhcp client settings update-dhcpserver
set interface ethernet0/1 dhcp server service
set interface ethernet0/1.1 dhcp server service
set interface ethernet0/1 dhcp server auto
set interface ethernet0/1.1 dhcp server enable
set interface ethernet0/1 dhcp server option lease 1440
set interface ethernet0/1 dhcp server option gateway 192.168.140.254
set interface ethernet0/1 dhcp server option netmask 255.255.255.0
set interface ethernet0/1 dhcp server option dns1 192.168.140.4
set interface ethernet0/1.1 dhcp server option lease 1440
set interface ethernet0/1.1 dhcp server option gateway 192.168.141.254
set interface ethernet0/1.1 dhcp server option netmask 255.255.255.0
set interface ethernet0/1.1 dhcp server option dns1 8.8.8.8
set interface ethernet0/1 dhcp server ip 192.168.140.249 mac 000413330797
set interface ethernet0/1 dhcp server ip 192.168.140.20 mac 001075230ca5
set interface ethernet0/1 dhcp server ip 192.168.140.80 mac 0004133730aa
set interface ethernet0/1 dhcp server ip 192.168.140.81 mac 0004133730a6
set interface ethernet0/1 dhcp server ip 192.168.140.82 mac 00041324cc0b
set interface ethernet0/1 dhcp server ip 192.168.140.83 mac 00041334dc98
set interface ethernet0/1 dhcp server ip 192.168.140.84 mac 00041337313e
set interface ethernet0/1 dhcp server ip 192.168.140.85 mac 00041324d7a4
set interface ethernet0/1 dhcp server ip 192.168.140.86 mac 000413373223
set interface ethernet0/1 dhcp server ip 192.168.140.87 mac 0004133b0077
set interface ethernet0/1 dhcp server ip 192.168.140.88 mac 00041324626b
set interface ethernet0/1 dhcp server ip 192.168.140.90 mac 000413240000
set interface ethernet0/1 dhcp server ip 192.168.140.103 to 192.168.140.200
set interface ethernet0/1 dhcp server ip 192.168.140.102 mac 0008190c5110
set interface ethernet0/1.1 dhcp server ip 192.168.141.2 to 192.168.141.200
unset interface ethernet0/1 dhcp server config next-server-ip
unset interface ethernet0/1.1 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 tcp-syn-check
unset flow tcp-syn-bit-check
set flow reverse-route clear-text prefer
set flow reverse-route tunnel always
set domain ronshoved.dk
set hostname ssg5
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 192.168.140.4
set dns host dns2 8.8.8.8
set dns host dns3 0.0.0.0
set dns host schedule 06:28
set address "Trust" "192.168.140.102/32" 192.168.140.102 255.255.255.255
set address "Trust" "192.168.140.103/32" 192.168.140.103 255.255.255.255
set address "Trust" "192.168.140.175/32" 192.168.140.175 255.255.255.255
set address "Trust" "192.168.140.241/32" 192.168.140.249 255.255.255.255
set address "Trust" "192.168.140.254/32" 192.168.140.254 255.255.255.255
set address "Trust" "192.168.140.4/32" 192.168.140.4 255.255.255.255
set address "Trust" "192.168.140.8/32" 192.168.140.8 255.255.255.255
set address "Untrust" "192.168.140.241/32" 192.168.140.249 255.255.255.255
set address "Untrust" "192.168.140.4" 192.168.140.4 255.255.255.255
set address "Untrust" "46.32.51.7/32" 46.32.51.7 255.255.255.255
set address "Untrust" "89.104.223.27/32" 89.104.223.27 255.255.255.255
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 default-permit-all
set policy id 26 from "Untrust" to "Trust" "Any" "VIP(ethernet0/0)" "cs3" permit log count
set policy id 26 disable
set policy id 26
exit
set policy id 16 from "Untrust" to "Trust" "Any" "VIP(ethernet0/0)" "PBS" permit log count
set policy id 16
exit
set policy id 15 from "Untrust" to "Trust" "Any" "VIP(ethernet0/0)" "53" permit log count
set policy id 15
exit
set policy id 11 from "Untrust" to "Trust" "Any" "VIP(ethernet0/0)" "dkterm24" permit log count
set policy id 11
set log session-init
exit
set policy id 10 from "Untrust" to "Trust" "Any" "VIP(ethernet0/0)" "dkterm22" permit log count
set policy id 10
exit
set policy id 8 from "Untrust" to "Trust" "Any" "VIP(ethernet0/0)" "dkterm13" permit log count
set policy id 8
exit
set policy id 1 from "Trust" to "Untrust" "Any" "Any" "ANY" nat src permit log count
set policy id 1
set log session-init
exit
set policy id 2 name "Telefoni" from "Untrust" to "Trust" "89.104.223.27/32" "Any" "ANY" permit log count
set policy id 2
set log session-init
exit
set policy id 4 from "Guest" to "Untrust" "Any" "Any" "ANY" nat src permit log count
set policy id 4
set log session-init
exit
set policy id 5 from "Guest" to "Trust" "Any" "Any" "ANY" permit log count
set policy id 5
set log session-init
exit
set policy id 21 from "Trust" to "Trust" "Any" "Any" "ANY" permit log
set policy id 21
set log session-init
exit
set syslog config "192.168.140.4"
set syslog config "192.168.140.4" facilities local7 local0
set syslog config "192.168.140.4" log traffic
set syslog config "192.168.140.4" transport tcp
set syslog src-interface ethernet0/1
set syslog enable
set syslog backup enable
set log module system level emergency destination console
set log module system level alert destination console
set log module system level critical destination console
set log module system level error destination console
set log module system level warning destination console
set log module system level notification destination console
set log module system level information destination console
set log module system level debugging destination console
unset log module system level notification destination email
unset log module system level emergency destination webtrends
unset log module system level alert destination webtrends
unset log module system level critical destination webtrends
unset log module system level notification destination webtrends
unset log module system level emergency destination NSM
unset log module system level alert destination NSM
unset log module system level critical destination NSM
unset log module system level error destination NSM
unset log module system level warning destination NSM
unset log module system level notification destination NSM
unset log module system level information destination NSM
unset log module system level debugging destination NSM
unset log module system level emergency destination usb
unset log module system level alert destination usb
unset log module system level critical destination usb
unset log module system level error destination usb
unset log module system level warning destination usb
unset log module system level notification destination usb
unset log module system level information destination usb
unset log module system level debugging destination usb
set log serial-number enable
set firewall log-self
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set ssh enable
set scp enable
set config lock timeout 5
unset license-key auto-update
set telnet client enable
set ntp server "2.dk.pool.ntp.org"
set snmp community "Private" Read-Write Trap-on traffic version v1
set snmp port listen 161
set snmp port trap 162
set snmpv3 local-engine id "0162112007001205"
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset add-default-route
set route 192.168.0.0/16 interface tunnel.1
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit




Trusted Contributor
nikolay.semov
Posts: 164
Registered: ‎03-15-2012
0

Re: SSG5 - Massive portforwarding issues. HELP!!

Setting up a VIP and a corresponding Untrust -> Trust policy, as you have started to set up, is more or less how you generally set up port forwarding.

 

Regarding management from outside, edit the ethernet0/0 interface, and put check marks next to the management options you want enabled. I'd keep it limited to SSL, SSH, and maybe Ping for an Untrust interface.

 

Regarding the rest ... please mention which of the services you listed work, and which don't.

 

As far as I can see, your phones are probably not working. Policy with ID 2, to start with, seems useless. Are your phones registering with the SIP provider, or do they just have a static SIP proxy configured?

Visitor
rboege
Posts: 8
Registered: ‎12-16-2011
0

Re: SSG5 - Massive portforwarding issues. HELP!!

The services currently working is none actually. Well the the credit card machine is working port wise, but when i enable the counterstrike service, or any other service the internet goes down, and the firewalls SSG5 Session is going to 100% meaning over 8800 sessions a sec. 

 

The only information i have on the telephones is that i enter in the ip as mentioned on the phones, and then it connects to that gateway, and i can call out. I don't really have that much technical understanding with the ip-phones. 

 

 

Trusted Contributor
nikolay.semov
Posts: 164
Registered: ‎03-15-2012
0

Re: SSG5 - Massive portforwarding issues. HELP!!

Ok. So, let's take these things one at a time.

Phones: outbound calls - good. How about inbound? Can you receive call normally?

Credit card machine: when you say it's working port wise, do you mean it's functioning as expected? Looking at the ports it requires, I'm pretty sure those are outbound ports that it needs; it's unlikely such a device would be a DNS server (port 53). Please double-check its instruction manual.

CS: Let's leave alone for the time being.

Management access from the outside: Were you able to get that going?
Visitor
rboege
Posts: 8
Registered: ‎12-16-2011
0

Re: SSG5 - Massive portforwarding issues. HELP!!

Phones are working so i can call out of the house, and also recieving calls is ok. However calling locally internal, doesnt work. ( it calls but, you can't hear the other phone who picks up, and they can't hear you either).

 

Credit card machine working 100%.

Checking the ports atm, with my phone company (www.comendo.dk)

 

CS: also working 100%

 

management also working 100% now. 

 

Seems i mapped cs and credit card at first, to the wrong ip. (i didnt map it i used reserve ip feature, but it didn't give them the ip, i reset the dhcp table though, and now it works).

Visitor
rboege
Posts: 8
Registered: ‎12-16-2011
0

Re: SSG5 - Massive portforwarding issues. HELP!!

However my sessions are at 8900 which is over the capacity, this is a new thing, never happend before. Meaning i have to restart the router every 24 hours, to avoid getting it in the red, instead of the green and yellow (usually having 800 sessions, but this grows during the day)

 

tried turning off all the policy's but didn't help anything. 

Trusted Contributor
nikolay.semov
Posts: 164
Registered: ‎03-15-2012
0

Re: SSG5 - Massive portforwarding issues. HELP!!

A lot of the custom services you have defined are set to never timeout. So, sessions just keep getting added and added. You should choose a more reasonable timeout. For each service, think how long is it normal for a connection to stay completely silent before you can assume the connection has actually finished. For example, if you're playing CS over the network, and a client machine hasn't sent any traffic for, say, 30 seconds, I think it's quite safe to assume the game is no longer running, or the client has otherwise disconnected and the session an be cleared.

As for internal calls on your phones, you may want to request your provider to try "media flow-through" so that the voice stream actually goes through your provider (just like on an external call), rather than trying to have the two phones talk to each other directly.
Visitor
rboege
Posts: 8
Registered: ‎12-16-2011
0

Re: SSG5 - Massive portforwarding issues. HELP!!

That solves it for the traffic, and the phones. Thanks alot. Everything seems to be working now. Thank you for your assistance. 

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.