Screen OS

last person joined: 8 months ago 

This is a legacy community with limited Juniper monitoring.
Expand all | Collapse all

Need help with SSG5 DMZ NAT

  • 1.  Need help with SSG5 DMZ NAT

    Posted 10-26-2012 13:35

    Hello,

     

    I have an SSG5 that has a deviec in the DMZ that needs to access devices in our trusted network, and needs to be accessed form anywhere in the untrusted.

     

    I've been following articles and trying sop many different things that I think I have gone in circles, and need help.

     

    I have tried MIP, VIP, swithched interfaces between routing and NAT.

     

    Here is my config, please point out any glaring errors:

     

    Thanks!

     

    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 "fakewebport" protocol tcp src-port 0-65525 dst-port 4568-4568
    unset alg rtsp 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 ""
    set admin password ""
    set admin manager-ip
    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
    set zone "DMZ" tcp-rst
    set zone "VLAN" block
    unset zone "VLAN" tcp-rst
    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 "Null"
    set interface "wireless0/0" zone "Null"
    set interface "bgroup0" zone "Trust"
    set interface "bgroup1" zone "DMZ"
    set interface bgroup1 port ethernet0/1
    set interface bgroup1 port ethernet0/2
    set interface bgroup1 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 50.x.x.9/29
    set interface ethernet0/0 route
    set interface bgroup0 ip 10.4.100.253/24
    set interface bgroup0 nat
    set interface bgroup1 ip 10.4.150.1/24
    set interface bgroup1 nat
    set interface ethernet0/0 gateway 50.x.x.14
    set interface bgroup1 mtu 1500
    unset interface vlan1 bypass-others-ipsec
    unset interface vlan1 bypass-non-ip
    set interface ethernet0/0 ip manageable
    set interface bgroup0 ip manageable
    unset interface bgroup1 ip manageable
    set interface ethernet0/0 manage ping
    set interface ethernet0/0 manage ssh
    set interface ethernet0/0 manage web
    set interface bgroup0 manage mtrace
    set interface ethernet0/0 vip 50.x.x.12 80 "HTTP" 10.4.150.100
    set interface ethernet0/2 dhcp client enable
    unset interface ethernet0/2 dhcp client settings update-dhcpserver
    set interface "ethernet0/0" mip 50.x.x.12 host 10.4.150.100 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 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 pki authority default scep mode "auto"
    set pki x509 default cert-path partial
    set address "Trust" "10.4.0.0/16" 10.4.0.0 255.255.0.0
    set address "Trust" "10.4.150.100/255.255.255.255" 10.4.150.100 255.255.255.255
    set address "Untrust" "207.x.x.x/255.255.255.248" 207.x.x.x 255.255.255.248
    set address "Untrust" "SUPP NAT" 173.x.x.209 255.255.255.255
    set address "Untrust" "USER2" 198.x.x.128 255.255.255.224
    set address "DMZ" "10.4.150.0/24" 10.4.150.0 255.255.255.0
    set address "DMZ" "10.4.150.100/32" 10.4.150.100 255.255.255.255
    set group address "Untrust" "USER"
    set group address "Untrust" "USER" add "207.x.x.x/255.255.255.248"
    set group address "Untrust" "USER" add "SUPP NAT"
    set group address "Untrust" "USER" add "USER2"
    set group service "DMZ HTTP"
    set group service "DMZ HTTP" add "fakewebport"
    set group service "DMZ HTTP" add "HTTP"
    set group service "DMZ HTTP" add "HTTPS"
    set group service "DMZ HTTP" add "ICMP-ANY"
    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 vrouter "untrust-vr"
    exit
    set vrouter "trust-vr"
    exit
    set url protocol websense
    exit
    set policy id 1 from "Trust" to "Untrust" "Any" "Any" "ANY" permit
    set policy id 1
    exit
    set policy id 2 name "Decoders_to_int" from "DMZ" to "Trust" "10.4.150.0/24" "10.4.0.0/16" "PING" permit log
    set policy id 2
    set service "RTSP"
    exit
    set policy id 3 name "Trust-DMZ all traffic" from "Trust" to "DMZ" "10.4.0.0/16" "10.4.150.0/24" "ANY" permit log
    set policy id 3
    exit
    set policy id 7 name "decoder access" from "Untrust" to "DMZ" "Any" "VIP(50.x.x.12)" "HTTP" permit log
    set policy id 7
    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 wlan 0 channel auto
    set wlan 1 channel auto
    set wlan 0 transmit power minimum
    set wlan 1 transmit power minimum
    set wlan acl mode strict
    set snmp port listen 161
    set snmp port trap 162
    set vrouter "untrust-vr"
    exit
    set vrouter "trust-vr"
    unset add-default-route
    set route 10.4.0.0/16 interface bgroup0 gateway 10.4.100.1 permanent
    exit
    set vrouter "untrust-vr"
    exit
    set vrouter "trust-vr"
    exit



  • 2.  RE: Need help with SSG5 DMZ NAT

    Posted 10-29-2012 01:46

    Hi,

     

    You have configured no default route.

     

    set vrouter "trust-vr"
    set route 0.0.0.0/0 interface ethernet0/0 gateway 5.x.x.y

    exit

    save



  • 3.  RE: Need help with SSG5 DMZ NAT

     
    Posted 10-29-2012 03:37

    Hello,

     

    I see you have configured both VIP and MIP for the same IP

     

    set interface ethernet0/0 vip 50.x.x.12 80 "HTTP" 10.4.150.100
    set interface "ethernet0/0" mip 50.x.x.12 host 10.4.150.100 netmask 255.255.255.255 vr "trust-vr"

     

    Since MIP wil always take precedence so I would suggest remove VIP and keep only MIP. Also update the policy too.

     

    Rest if it still doesnt work then please collect the debugs and share them here

     

    clear db

    set ff src-ip x.x.x.x dst-ip y.y.y.y

    set ff src-ip y.y.y.y dst-ip x.x.x.x

    debug flow basic

     

    initiate the non-working traffic

     

    undebug all

    get db st

     

    ======================================================================

     

    Regards

    Sarab



  • 4.  RE: Need help with SSG5 DMZ NAT

    Posted 10-29-2012 11:33

    sarab,

     

    Thank you for the suggestions, I followed them, here are the results:

     

    ****** 944781.0: <Untrust/ethernet0/0> packet received [52]******
    ipid = 4654(122e), @032dc3d0
    other ip packet handle.
    ****** 944781.0: <Untrust/ethernet0/0> packet received [52]******
    ipid = 4655(122f), @032dcbd0
    other ip packet handle.
    ****** 944781.0: <Untrust/ethernet0/0> packet received [52]******
    ipid = 4658(1232), @032dd3d0
    other ip packet handle.
    ****** 944784.0: <Untrust/ethernet0/0> packet received [52]******
    ipid = 4660(1234), @032ddbd0
    other ip packet handle.
    ****** 944784.0: <Untrust/ethernet0/0> packet received [52]******
    ipid = 4661(1235), @032de3d0
    other ip packet handle.
    ****** 944784.0: <Untrust/ethernet0/0> packet received [52]******
    ipid = 4662(1236), @032debd0
    other ip packet handle.
    ****** 944790.0: <Untrust/ethernet0/0> packet received [48]******
    ipid = 4701(125d), @032df3d0
    other ip packet handle.
    ****** 944790.0: <Untrust/ethernet0/0> packet received [48]******
    ipid = 4702(125e), @032dfbd0
    other ip packet handle.
    ****** 944790.0: <Untrust/ethernet0/0> packet received [48]******
    ipid = 4704(1260), @032e03d0
    other ip packet handle.

     

    Thank you for any help you can give me.



  • 5.  RE: Need help with SSG5 DMZ NAT

    Posted 10-29-2012 11:47

    following that, I did a snoop, and got this:

     

    945213.0: ethernet0/0(i) len=66:b89bc9daf38a->00408ccfc059/0800
    173.x.x.49 -> 50.x.x.12/6
    vhl=45, tos=20, id=7618, frag=4000, ttl=123 tlen=52
    tcp:ports 58508->80, seq=4145901041, ack=0, flag=8002/SYN

     

    the 00408ccfc059 MAC address is that of the device in the DMZ, the b89bc9daf38a is the MAC of the gateway device.

     

    It appears the MIP may be wrong?



  • 6.  RE: Need help with SSG5 DMZ NAT

     
    Posted 10-29-2012 11:57

    I would say that  173.x.x.49 does not have its gateway set to the SSG5, that its ARP is not resolving to the firewalls mac address.

     

    the debug "other ip packet handle" means that the firewall is ignoring the packet since the dst-mac address is not for itself.

     

    Regards,

    Sam



  • 7.  RE: Need help with SSG5 DMZ NAT

    Posted 10-29-2012 12:33

    The 173. address is my network, at a different office. (I am trying to get to it from the Internet side).



  • 8.  RE: Need help with SSG5 DMZ NAT

     
    Posted 10-29-2012 12:45

    Correction --  the gateway device with MAC address b89bc9daf38a (I assume 50.x.x.14? "get arp" will confirm), does not have the correct MAC address for SSG5's eth0/0.

     

     

    Sorry for not having read your previous posts correctly.

     

    Regards,

    Sam



  • 9.  RE: Need help with SSG5 DMZ NAT

    Posted 10-30-2012 01:10

    Hi,

     

    Please try this:

    1. Enable the logging at session start in the MIP/VIP policies.

    2. Write down the MAC-address of 10.4.150.100

    3. Ping 10.4.150.100 from the firewall.

    4. Type get arp. Is the IP correctly resolved to its MAC?

    5. Try to connect to the MIP/VIP from Internet before the arp cache entry has expired. Do you see any policy hits in the traffic log?

     



  • 10.  RE: Need help with SSG5 DMZ NAT
    Best Answer

     
    Posted 10-30-2012 02:10

    Could you please try clearing the Arp on the upstream gateway device or just reboot it so that the learnt MAC is cleared and then try connecting to MIP/VIP.

     

    Regards

    Sarab



  • 11.  RE: Need help with SSG5 DMZ NAT

    Posted 10-30-2012 14:10

    sarab,

     

    It appears your suggestion worked, I can now access the device remotely.

     

    I'm not sure exactly why that should've worked (ARP sholuld have cleared itself many times over the 12 days I've been dealing with it).

     

    Thank you very much!



  • 12.  RE: Need help with SSG5 DMZ NAT

     
    Posted 10-30-2012 22:47

    I am glad the issue is fixed.

     

    It happens because of some bug in that upstream device that it could not clear the cached ARP entry. And reboot cleared the cache and issue was fixed.



  • 13.  RE: Need help with SSG5 DMZ NAT

    Posted 10-29-2012 11:07

    hank you for your input, I tried that, but it did not seem to help.

     

    I overlooked that, because in the GUI, it had that route in there: (it's in twice now that I added it via CLI).

     

    The bottom one was in there before.

     

    * 10.4.0.0/16 10.4.100.1 bgroup0 SP 20 1 Root  Remove
      0.0.0.0/0 50.x.x.14 ethernet0/0 S 20 1 Root  Remove
    * 50.x.x.8/29   ethernet0/0 C     Root  -
    * 50.x.x.9/32   ethernet0/0 H     Root  -
    * 10.4.100.0/24   bgroup0 C     Root  -
    * 10.4.100.253/32   bgroup0 H     Root  -
    * 10.4.150.0/24   bgroup1 C     Root  -
    * 10.4.150.1/32   bgroup1 H     Root  -
    * 0.0.0.0/0 50.x.x.14 ethernet0/0 C   1 Root  -