ScreenOS Firewalls (NOT SRX)
Reply
Contributor
AtulSharma
Posts: 17
Registered: ‎08-11-2008
0
Accepted Solution

Port Forwarding In SSG5 (Config File is Included)

Dear All,

I am having A SSG 5 Router and having two ISP Lines.I have to configure the SSG 5 router for Both of the WANs Lines and have to create two corresponding LANs.
This part of the configuration has been done after hunting a lot. Both of the WAN and LAN are configured properly and there is no problem in that.

I am facing problem in forwarding a TCP Port 24001 to a internal (LAN) server. So the server can be accessed from outside also.Please Help me in this, it's urgent.

Here goes the config File For your Reference.:


set clock ntp
set clock timezone 5 30
set vrouter trust-vr sharable
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set service "HTTP" timeout 5
set service "Proximity_Server" protocol tcp src-port 0-65535 dst-port 24001-24001
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 "admin"
set admin password "nHMYLarHAYrBc"
set admin manager-ip 10.0.0.12 255.255.255.255
set admin manager-ip 20.0.0.12 255.255.255.255
set admin mail server-name "xyz.com"
set admin auth timeout 10
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 "ISP1"
set zone id 101 "LAN1"
set zone id 102 "ISP2"
set zone "ISP2" vrouter "untrust-vr"
set zone id 103 "LAN2"
set zone "LAN2" vrouter "untrust-vr"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" tcp-rst
set zone "Untrust" block
unset zone "Untrust" tcp-rst
set zone "DMZ" tcp-rst
set zone "VLAN" block
unset zone "VLAN" tcp-rst
unset zone "ISP1" tcp-rst
set zone "ISP1" reassembly-for-alg
unset zone "LAN1" tcp-rst
set zone "LAN1" reassembly-for-alg
unset zone "ISP2" tcp-rst
set zone "ISP2" reassembly-for-alg
unset zone "LAN2" tcp-rst
set zone "LAN2" reassembly-for-alg
set zone "Trust" screen alarm-without-drop
set zone "Trust" screen icmp-flood
set zone "Trust" screen udp-flood
set zone "Trust" screen winnuke
set zone "Trust" screen port-scan
set zone "Trust" screen tear-drop
set zone "Trust" screen syn-flood
set zone "Trust" screen ip-spoofing
set zone "Trust" screen ping-death
set zone "Trust" screen unknown-protocol
set zone "Trust" screen ip-bad-option
set zone "Trust" screen icmp-large
set zone "Trust" screen component-block exe
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 zone "ISP1" screen winnuke
set zone "ISP1" screen port-scan
set zone "ISP1" screen ip-sweep
set zone "ISP1" screen tear-drop
set zone "ISP1" screen syn-flood
set zone "ISP1" screen ip-spoofing
set zone "ISP1" screen ping-death
set zone "ISP1" screen land
set zone "ISP1" screen unknown-protocol
set zone "ISP1" screen ip-bad-option
set zone "ISP1" screen component-block zip
set zone "ISP1" screen component-block jar
set zone "ISP1" screen component-block exe
set zone "ISP1" screen component-block activex
set zone "LAN1" screen icmp-flood
set zone "LAN1" screen udp-flood
set zone "LAN1" screen port-scan
set zone "LAN1" screen ip-sweep
set zone "LAN1" screen tear-drop
set zone "LAN1" screen ip-spoofing
set zone "LAN1" screen ping-death
set zone "LAN1" screen unknown-protocol
set zone "LAN1" screen ip-bad-option
set zone "LAN1" screen icmp-large
set zone "LAN1" screen component-block zip
set zone "LAN1" screen component-block jar
set zone "LAN1" screen component-block exe
set zone "LAN1" screen component-block activex
set zone "ISP2" screen winnuke
set zone "ISP2" screen port-scan
set zone "ISP2" screen ip-sweep
set zone "ISP2" screen tear-drop
set zone "ISP2" screen ip-spoofing
set zone "ISP2" screen ping-death
set zone "ISP2" screen land
set zone "ISP2" screen unknown-protocol
set zone "ISP2" screen ip-bad-option
set zone "ISP2" screen component-block zip
set zone "ISP2" screen component-block jar
set zone "ISP2" screen component-block exe
set zone "ISP2" screen component-block activex
set zone "LAN2" screen alarm-without-drop
set zone "LAN2" screen icmp-flood
set zone "LAN2" screen udp-flood
set zone "LAN2" screen winnuke
set zone "LAN2" screen port-scan
set zone "LAN2" screen ip-sweep
set zone "LAN2" screen tear-drop
set zone "LAN2" screen syn-flood
set zone "LAN2" screen ip-spoofing
set zone "LAN2" screen ping-death
set zone "LAN2" screen ip-filter-src
set zone "LAN2" screen land
set zone "LAN2" screen syn-frag
set zone "LAN2" screen tcp-no-flag
set zone "LAN2" screen unknown-protocol
set zone "LAN2" screen ip-bad-option
set zone "LAN2" screen ip-record-route
set zone "LAN2" screen ip-timestamp-opt
set zone "LAN2" screen ip-security-opt
set zone "LAN2" screen ip-loose-src-route
set zone "LAN2" screen ip-strict-src-route
set zone "LAN2" screen ip-stream-opt
set zone "LAN2" screen icmp-fragment
set zone "LAN2" screen icmp-large
set zone "LAN2" screen syn-fin
set zone "LAN2" screen fin-no-ack
set zone "LAN2" screen limit-session source-ip-based
set zone "LAN2" screen syn-ack-ack-proxy
set zone "LAN2" screen block-frag
set zone "LAN2" screen limit-session destination-ip-based
set zone "LAN2" screen component-block zip
set zone "LAN2" screen component-block jar
set zone "LAN2" screen component-block exe
set zone "LAN2" screen component-block activex
set zone "LAN2" screen icmp-id
set zone "LAN2" screen ip-spoofing drop-no-rpf-route
set interface "ethernet0/0" zone "ISP1"
set interface "ethernet0/1" zone "Null"
set interface "ethernet0/4" zone "ISP2"
set interface "bgroup0" zone "LAN1"
set interface "bgroup1" zone "LAN2"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup1 port ethernet0/5
set interface bgroup1 port ethernet0/6
unset interface vlan1 ip
set interface ethernet0/0 ip 192.168.1.2/24
set interface ethernet0/0 nat
set interface ethernet0/4 ip 192.168.0.2/24
set interface ethernet0/4 nat
set interface bgroup0 ip 10.0.0.1/24
set interface bgroup0 nat
set interface bgroup1 ip 20.0.0.1/24
set interface bgroup1 route
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
unset interface ethernet0/0 ip manageable
set interface ethernet0/4 ip manageable
set interface bgroup0 ip manageable
set interface bgroup1 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/0 manage ssh
set interface ethernet0/0 manage telnet
set interface ethernet0/0 manage snmp
set interface ethernet0/0 manage web
set interface ethernet0/4 manage ping
set interface ethernet0/4 manage ssh
set interface ethernet0/4 manage telnet
set interface ethernet0/4 manage snmp
set interface ethernet0/4 manage web
set interface bgroup0 manage ping
set interface bgroup0 manage ssh
set interface bgroup0 manage telnet
set interface bgroup0 manage snmp
set interface bgroup0 manage ssl
set interface bgroup0 manage web
set interface bgroup1 manage ping
set interface bgroup1 manage ssh
set interface bgroup1 manage telnet
set interface bgroup1 manage snmp
set interface bgroup1 manage ssl
set interface bgroup1 manage web
set interface bgroup0 dhcp server service
set interface bgroup1 dhcp server service
set interface bgroup0 dhcp server enable
set interface bgroup1 dhcp server enable
set interface bgroup0 dhcp server option lease 1440000
set interface bgroup0 dhcp server option gateway 10.0.0.1
set interface bgroup0 dhcp server option dns1 X.X.X.X
set interface bgroup1 dhcp server option lease 1440000
set interface bgroup1 dhcp server option gateway 20.0.0.1
set interface bgroup1 dhcp server option dns1 X.X.X.X
set interface bgroup0 dhcp server ip 10.0.0.2 to 10.0.0.254
set interface bgroup1 dhcp server ip 20.0.0.2 to 20.0.0.254
unset interface bgroup0 dhcp server config next-server-ip
unset interface bgroup1 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
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 X.X.X.X src-interface bgroup0
set dns host dns2 X.X.X.X src-interface bgroup1
set dns host dns3 X.X.X.X src-interface bgroup0
set address "ISP1" "192.168.1.2" 192.168.1.2 255.255.255.255
set address "LAN1" "10.0.0.1" 10.0.0.1 255.255.255.255
set address "ISP2" "192.168.0.2/32" 192.168.0.2 255.255.255.255
set address "LAN2" "192.168.0.2/32" 192.168.0.2 255.255.255.255
set address "LAN2" "20.0.0.1" 20.0.0.1 255.255.255.255
set address "LAN2" "20.0.0.99/32" 20.0.0.99 255.255.255.255
set ippool "Lan1_IP" 10.0.0.2 10.0.0.254
set ippool "Lan2_IP" 20.0.0.2 20.0.0.254
set ike respond-bad-spi 1
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 anti-spam profile ns-profile
 set sbl default-server enable
exit
set policy id 4 from "ISP1" to "LAN1"  "Any" "Any" "ANY" nat src permit log count url-filter
set policy id 4 anti-spam ns-profile
set policy id 4
exit
set policy id 6 name "Proximity_server" from "ISP2" to "LAN2"  "Any" "20.0.0.99/32" "Proximity_Server" nat src permit log count
set policy id 6 anti-spam ns-profile
set policy id 6
set log session-init
exit
set policy id 5 from "ISP2" to "LAN2"  "Any" "Any" "ANY" nat src permit log count url-filter
set policy id 5
exit
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" permit log url-filter
set policy id 1
exit
set policy id 2 from "LAN1" to "ISP1"  "Any" "Any" "ANY" nat src permit log count url-filter
set policy id 2
exit
set policy id 3 from "LAN2" to "ISP2"  "Any" "Any" "ANY" nat src permit log count url-filter
set policy id 3 anti-spam ns-profile
set policy id 3
exit
set syslog config "20.0.0.12"
set syslog config "20.0.0.12" facilities local0 local0
set syslog config "20.0.0.12" log traffic
unset syslog config "20.0.0.12" log event
set syslog src-interface bgroup1
set nsmgmt report proto-dist enable
set nsmgmt report statistics ethernet enable
set nsmgmt report statistics attack enable
set nsmgmt report statistics flow enable
set nsmgmt report statistics policy enable
set nsmgmt report alarm traffic enable
set nsmgmt report alarm attack enable
set nsmgmt report alarm other enable
set nsmgmt report alarm di enable
set nsmgmt report log config enable
set nsmgmt report log info enable
set nsmgmt report log self enable
set nsmgmt report log traffic enable
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set ssh enable
set config lock timeout 5
set snmp community "MyPass333" Read-Write Trap-on  traffic version any
set snmp host "MyPass333" 20.0.0.1 255.255.255.255 src-interface bgroup1 trap v2
set snmp host "MyPass333" 20.0.0.92 255.255.255.255 src-interface bgroup1 trap v2
set snmp location "Bangalore"
set snmp contact "ssg5-serial"
set snmp name "ssg5-serial"
unset snmp auth-trap enable
set snmp port listen 161
set snmp port trap 162
set vrouter "untrust-vr"
set route 0.0.0.0/0 interface ethernet0/4 gateway 192.168.0.1
set route 20.0.0.0/24 interface ethernet0/4 gateway 20.0.0.1 preference 20 permanent
set route 10.0.0.0/24 vrouter "trust-vr" preference 20
exit
set vrouter "trust-vr"
unset add-default-route
set route 0.0.0.0/0 interface ethernet0/0 gateway 192.168.1.1
set route 10.0.0.0/24 interface ethernet0/0 gateway 10.0.0.1 preference 20 permanent
set route 20.0.0.0/24 vrouter "untrust-vr" preference 20
exit
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
Trusted Expert
AndyC
Posts: 441
Registered: ‎07-08-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi,

 

You need to configure a VIP to forward the traffice from the internet to the internal server. Have a look at the following KB on how to configure.

 

http://kb.juniper.net/KB4218

 

Regards

 

Andy

JNCIS-FWV
JNCIA-WX
JNCIA-SSL
JNCIA-ER
Contributor
AtulSharma
Posts: 17
Registered: ‎08-11-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

First of all Thanks 4 quick Reply,

 

Hope you have gone through the Config file also.

 

In the WebUi  I am unable to see the VIP Tab option in interface wheras other option such as MIP are present.

Trusted Expert
AndyC
Posts: 441
Registered: ‎07-08-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi,

 

It might be because of the version of code that you are running, as VIP is only available on interfaces in Untrust zones in older code, can't remember when this changed but it was a version of 6.x.

 

If VIP isnt there then you can use a MIP.

 

Create a mip on the interface in the ISP zone.

 

MIP

Network > Interfaces > Edit (for ethernetX) > MIP > New: Enter the

following, then click OK:

Mapped IP: x.x.x.x (Public IP you want to listen on)

Netmask: 255.255.255.255 (all 255's to make sure you only listen on 1 address)

Host IP Address: x.x.x.x (Internal server that you want to forward traffic to)

Host Virtual Router Name: trust-vr

 

If you havent created a customer service for TCP Port 24001 then you will need to do that then create the policy 

 

Policies > (From: ISP zone, To: internal zone) New: Enter the following, then click OK:

Source Address:

Address Book Entry: (select), Any

Destination Address:

Address Book Entry: (select), MIP(x.x.x.x)

Service: TCP Port 24001

Action: Permit

 

Regards

 

Andy

JNCIS-FWV
JNCIA-WX
JNCIA-SSL
JNCIA-ER
Contributor
AtulSharma
Posts: 17
Registered: ‎08-11-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi Andy,

 

Thanks for a detailed description.Yes You are right we can not create VIP on the zone other then untrust.I will try the steps suggested by you and will update you ASAP.

 

Thanks

Atul Sharma

Contributor
AtulSharma
Posts: 17
Registered: ‎08-11-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi Andy,

 

I tried the steps suggested by you.But I was not able to forward the port using the MIP.I had created the custom policy for the local server.Any other way to get arroud the problem???

 

Regards

Atul Sharma

Trusted Expert
AndyC
Posts: 441
Registered: ‎07-08-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi,

 

Can you post your config with the MIP configuration as that should work as I have done it many times.

 

Regards

 

Andy

JNCIS-FWV
JNCIA-WX
JNCIA-SSL
JNCIA-ER
Contributor
AtulSharma
Posts: 17
Registered: ‎08-11-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi Andy,

 

Below is Config File.Have a Look !!!

 

set clock ntp
set clock timezone 5 30
set vrouter trust-vr sharable
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
unset auto-route-export
exit
set service "HTTP" timeout 5
set service "Proximity_server" protocol tcp src-port 0-65535 dst-port 24001-24001
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 auth radius accounting action cleanup-session
set admin name "ofssiplssg5blr"
set admin password "nHMYLarHAYrBc"
set admin manager-ip 10.0.0.12 255.255.255.255
set admin manager-ip 20.0.0.12 255.255.255.255
set admin manager-ip 20.0.0.17 255.255.255.255
set admin manager-ip 10.0.0.17 255.255.255.255
set admin mail server-name "x.xyz.com"
set admin auth timeout 10
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 "ISP1"
set zone id 101 "LAN1"
set zone id 102 "ISP2"
set zone "ISP2" vrouter "untrust-vr"
set zone id 103 "LAN2"
set zone "LAN2" vrouter "untrust-vr"
set zone id 104 "Trust1"
set zone "Untrust-Tun" vrouter "trust-vr"
set zone "Trust" tcp-rst
unset zone "Untrust" block
unset zone "Untrust" tcp-rst
set zone "DMZ" tcp-rst
set zone "VLAN" block
unset zone "VLAN" tcp-rst
unset zone "ISP1" tcp-rst
set zone "ISP1" reassembly-for-alg
unset zone "LAN1" tcp-rst
set zone "LAN1" reassembly-for-alg
unset zone "ISP2" tcp-rst
set zone "ISP2" reassembly-for-alg
unset zone "LAN2" tcp-rst
set zone "LAN2" reassembly-for-alg
unset zone "Trust1" tcp-rst
set zone "Trust" screen alarm-without-drop
set zone "Trust" screen icmp-flood
set zone "Trust" screen udp-flood
set zone "Trust" screen winnuke
set zone "Trust" screen port-scan
set zone "Trust" screen tear-drop
set zone "Trust" screen syn-flood
set zone "Trust" screen ip-spoofing
set zone "Trust" screen ping-death
set zone "Trust" screen unknown-protocol
set zone "Trust" screen ip-bad-option
set zone "Trust" screen icmp-large
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 zone "ISP1" screen winnuke
set zone "ISP1" screen port-scan
set zone "ISP1" screen ip-sweep
set zone "ISP1" screen tear-drop
set zone "ISP1" screen syn-flood
set zone "ISP1" screen ip-spoofing
set zone "ISP1" screen ping-death
set zone "ISP1" screen land
set zone "ISP1" screen unknown-protocol
set zone "ISP1" screen ip-bad-option
set zone "ISP1" screen component-block jar
set zone "ISP1" screen component-block activex
set zone "LAN1" screen icmp-flood
set zone "LAN1" screen udp-flood
set zone "LAN1" screen port-scan
set zone "LAN1" screen ip-sweep
set zone "LAN1" screen tear-drop
set zone "LAN1" screen ip-spoofing
set zone "LAN1" screen ping-death
set zone "LAN1" screen unknown-protocol
set zone "LAN1" screen ip-bad-option
set zone "LAN1" screen icmp-large
set zone "LAN1" screen component-block jar
set zone "LAN1" screen component-block activex
set zone "ISP2" screen winnuke
set zone "ISP2" screen port-scan
set zone "ISP2" screen ip-sweep
set zone "ISP2" screen tear-drop
set zone "ISP2" screen ip-spoofing
set zone "ISP2" screen ping-death
set zone "ISP2" screen land
set zone "ISP2" screen unknown-protocol
set zone "ISP2" screen ip-bad-option
set zone "ISP2" screen component-block jar
set zone "LAN2" screen alarm-without-drop
set zone "LAN2" screen icmp-flood
set zone "LAN2" screen udp-flood
set zone "LAN2" screen winnuke
set zone "LAN2" screen port-scan
set zone "LAN2" screen ip-sweep
set zone "LAN2" screen tear-drop
set zone "LAN2" screen syn-flood
set zone "LAN2" screen ip-spoofing
set zone "LAN2" screen ping-death
set zone "LAN2" screen ip-filter-src
set zone "LAN2" screen land
set zone "LAN2" screen syn-frag
set zone "LAN2" screen tcp-no-flag
set zone "LAN2" screen unknown-protocol
set zone "LAN2" screen ip-bad-option
set zone "LAN2" screen ip-record-route
set zone "LAN2" screen ip-timestamp-opt
set zone "LAN2" screen ip-security-opt
set zone "LAN2" screen ip-loose-src-route
set zone "LAN2" screen ip-strict-src-route
set zone "LAN2" screen ip-stream-opt
set zone "LAN2" screen icmp-fragment
set zone "LAN2" screen icmp-large
set zone "LAN2" screen syn-fin
set zone "LAN2" screen fin-no-ack
set zone "LAN2" screen limit-session source-ip-based
set zone "LAN2" screen syn-ack-ack-proxy
set zone "LAN2" screen block-frag
set zone "LAN2" screen limit-session destination-ip-based
set zone "LAN2" screen component-block jar
set zone "LAN2" screen icmp-id
set zone "LAN2" screen ip-spoofing drop-no-rpf-route
set interface "ethernet0/0" zone "ISP1"
set interface "ethernet0/1" zone "Null"
set interface "ethernet0/4" zone "ISP2"
set interface "bgroup0" zone "LAN1"
set interface "bgroup1" zone "LAN2"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup1 port ethernet0/5
set interface bgroup1 port ethernet0/6
unset interface vlan1 ip
set interface ethernet0/0 ip 192.168.1.2/24
set interface ethernet0/0 nat
set interface ethernet0/4 ip 192.168.0.2/24
set interface ethernet0/4 nat
set interface bgroup0 ip 10.0.0.1/24
set interface bgroup0 route
set interface bgroup1 ip 20.0.0.1/24
set interface bgroup1 nat
set interface "ethernet0/0" pmtu ipv4
set interface "ethernet0/4" pmtu ipv4
set interface "bgroup0" pmtu ipv4
set interface "bgroup1" pmtu ipv4
unset interface vlan1 bypass-others-ipsec
unset interface vlan1 bypass-non-ip
unset interface ethernet0/0 ip manageable
set interface ethernet0/4 ip manageable
set interface bgroup0 ip manageable
set interface bgroup1 ip manageable
set interface ethernet0/0 manage ping
set interface ethernet0/0 manage ssh
set interface ethernet0/0 manage telnet
set interface ethernet0/0 manage snmp
set interface ethernet0/0 manage ssl
set interface ethernet0/0 manage web
set interface ethernet0/0 manage ident-reset
set interface ethernet0/4 manage ping
set interface ethernet0/4 manage ssh
set interface ethernet0/4 manage telnet
set interface ethernet0/4 manage snmp
set interface ethernet0/4 manage ssl
set interface ethernet0/4 manage web
set interface ethernet0/4 manage ident-reset
set interface bgroup0 manage ping
set interface bgroup0 manage ssh
set interface bgroup0 manage telnet
set interface bgroup0 manage snmp
set interface bgroup0 manage ssl
set interface bgroup0 manage web
set interface bgroup0 manage ident-reset
set interface bgroup1 manage ping
set interface bgroup1 manage ssh
set interface bgroup1 manage telnet
set interface bgroup1 manage snmp
set interface bgroup1 manage ssl
set interface bgroup1 manage web
set interface bgroup1 manage ident-reset
set interface bgroup0 dhcp server service
set interface bgroup1 dhcp server service
set interface bgroup0 dhcp server enable
set interface bgroup1 dhcp server enable
set interface bgroup0 dhcp server option lease 1440000
set interface bgroup0 dhcp server option gateway 10.0.0.1
set interface bgroup0 dhcp server option dns1 x.x.x.x
set interface bgroup1 dhcp server option lease 1440000
set interface bgroup1 dhcp server option gateway 20.0.0.1
set interface bgroup1 dhcp server option dns1 x.x.x.x
set interface bgroup0 dhcp server ip 10.0.0.2 to 10.0.0.254
set interface bgroup1 dhcp server ip 20.0.0.2 to 20.0.0.254
unset interface bgroup0 dhcp server config next-server-ip
unset interface bgroup1 dhcp server config next-server-ip
set interface "ethernet0/4" mip 192.168.0.3 host 20.0.0.99 netmask 255.255.255.255 vr "trust-vr"
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 interface "ethernet0/4" webauth ssl-only
set flow tcp-mss
unset flow no-tcp-seq-check
set flow tcp-syn-check
set pki authority default scep mode "auto"
set pki x509 default cert-path partial
set dns host dns1 x.x.x.x src-interface bgroup0
set dns host dns2 x.x.x.x src-interface bgroup1
set dns host dns3 x.x.x.x src-interface bgroup0
set address "Global" "192.168.0.2/32" 192.168.0.2 255.255.255.255
set address "ISP1" "192.168.1.2" 192.168.1.2 255.255.255.255
set address "LAN1" "10.0.0.1" 10.0.0.1 255.255.255.255
set address "ISP2" "192.168.0.2/32" 192.168.0.2 255.255.255.255
set address "LAN2" "20.0.0.1" 20.0.0.1 255.255.255.0
set ippool "Lan1_IP" 10.0.0.2 10.0.0.254
set ippool "Lan2_IP" 20.0.0.2 20.0.0.254
set ike respond-bad-spi 1
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 anti-spam profile ns-profile
 set sbl default-server enable
exit
set policy id 8 from "ISP2" to "LAN2"  "Any" "MIP(192.168.0.3)" "Proximity_server" nat src permit log count
set policy id 8
exit
set policy id 7 name "Lan2_2_Lan1" from "LAN2" to "LAN1"  "Any" "Any" "ANY" permit log count
set policy id 7 anti-spam ns-profile
set policy id 7
set log session-init
exit
set policy id 6 name "Lan1_2_Lan2" from "LAN1" to "LAN2"  "Any" "Any" "ANY" permit log count
set policy id 6
set log session-init
exit
set policy id 4 from "ISP1" to "LAN1"  "Any" "Any" "ANY" nat src permit log count
set policy id 4 anti-spam ns-profile
set policy id 4
exit
set policy id 5 from "ISP2" to "LAN2"  "Any" "Any" "ANY" nat src permit log count
set policy id 5
exit
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" permit log count
set policy id 1
exit
set policy id 2 from "LAN1" to "ISP1"  "Any" "Any" "ANY" nat src permit log count
set policy id 2
exit
set policy id 3 from "LAN2" to "ISP2"  "Any" "Any" "ANY" nat src permit log count
set policy id 3 anti-spam ns-profile
set policy id 3
exit
set syslog config "20.0.0.12"
set syslog config "20.0.0.12" facilities local0 local0
set syslog config "20.0.0.12" log traffic
unset syslog config "20.0.0.12" log event
set syslog src-interface bgroup1
set nsmgmt report proto-dist enable
set nsmgmt report statistics ethernet enable
set nsmgmt report statistics attack enable
set nsmgmt report statistics flow enable
set nsmgmt report statistics policy enable
set nsmgmt report alarm traffic enable
set nsmgmt report alarm attack enable
set nsmgmt report alarm other enable
set nsmgmt report alarm di enable
set nsmgmt report log config enable
set nsmgmt report log info enable
set nsmgmt report log self enable
set nsmgmt report log traffic enable
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set ssh enable
set config lock timeout 5
set snmp community "MyPass333" Read-Write Trap-on  traffic version any
set snmp host "MyPass333" 10.0.0.101 255.255.255.255 src-interface bgroup0 trap v2
set snmp host "MyPass333" 10.0.0.1 255.255.255.255 src-interface bgroup0 trap v2
set snmp host "MyPass333" 10.0.0.92 255.255.255.255 src-interface bgroup0 trap v2
set snmp location "Bangalore"
set snmp contact "ssg5-serial"
set snmp name "ssg5-serial"
unset snmp auth-trap enable
set snmp port listen 161
set snmp port trap 162
set vrouter "untrust-vr"
set route 0.0.0.0/0 interface ethernet0/4 gateway 192.168.0.1
set route 20.0.0.0/24 interface ethernet0/4 gateway 20.0.0.1 preference 20 permanent
set route 10.0.0.0/24 vrouter "trust-vr" preference 20
exit
set vrouter "trust-vr"
unset add-default-route
set route 0.0.0.0/0 interface ethernet0/0 gateway 192.168.1.1
set route 10.0.0.0/24 interface ethernet0/0 gateway 10.0.0.1 preference 20 permanent
set route 20.0.0.0/24 vrouter "untrust-vr" preference 20
exit
set zone ISP2 pbr Proximity_server
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
 

Trusted Expert
AndyC
Posts: 441
Registered: ‎07-08-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi,

 

The config looks ok. Can you do a debug flow basic, this well help us to see what the firewall is doing with the traffic.

 

From the command line:

 

set ff dst-ip 192.168.0.3

debug flow basic

clear db

 

# try connecting to the MIP ip of 192.168.0.3

 

undebug all

get db stream

 

 Post the output.

 

Regards

 

Andy

JNCIS-FWV
JNCIA-WX
JNCIA-SSL
JNCIA-ER
Trusted Expert
AndyC
Posts: 441
Registered: ‎07-08-2008
0

Re: Port Forwarding In SSG5 (Config File is Included)

Hi,

 

I have just realised that you are using multiple virtual routers. Your mip is pointing to a host in LAN2 which is in the Untrust-vr. This means that you need to change the MIP to show that the host is in the untrust-vr.

 

At the moment it looks

 

set interface "ethernet0/4" mip 192.168.0.3 host 20.0.0.99 netmask 255.255.255.255 vr "trust-vr"

It should look

 

set interface "ethernet0/4" mip 192.168.0.3 host 20.0.0.99 netmask 255.255.255.255 vr "untrust-vr"

 See if that helps at all. If not do the debug flow basic.

 

Regards

 

Andy

 

JNCIS-FWV
JNCIA-WX
JNCIA-SSL
JNCIA-ER
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.