ScreenOS Firewalls (NOT SRX)
Reply
Visitor
RamCis
Posts: 3
Registered: ‎10-18-2008
0

PBR Not Working

Hi,


I have two internet connection one is lease line and other is dsl. And in my network, i have two vlans Vlan 20 (Server Vlan)=192.168.20.0/24 and vlan 30(User Vlan)=192.168.30.0/24. Firewall inside interface is connected in vlan 30 and on switch intervlan routing is configured.
My requirement is, traffic from vlan 20 should go through Lease line and from vlan 30 to dsl. I connected leaseline with ethernet 0/0 that is in untrusted zone. I configured an other zone DSL and put ethernet 0/1 put in it and then connect dsl line with it. Since traffic source from both vlans is coming through same INSIDE interface (bgroup 0) that is in trust zone.
Now default behavior of PPPoE is, it will add default route that supersede my route to Leaseline. As a solution i configured PBR so that vlan 20 traffic come from INSIDE interface would route to lease line but PBR is not working. Below is the configuration:

set clock timezone 4
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 vrouter name "dsl-vr" id 1025
unset vrouter "dsl-vr" nsrp-config-sync
set vrouter "dsl-vr"
unset auto-route-export
set preference nhrp 100
set preference ospf-e2 254
exit
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 "xxxx"
set admin auth timeout 10
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 id 100 "DSL"
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 "DSL" 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 "DSL"
set interface "bgroup0" zone "Trust"
set interface bgroup0 port ethernet0/2
set interface bgroup0 port ethernet0/3
set interface bgroup0 port ethernet0/4
unset interface vlan1 ip
set interface ethernet0/0 ip 1xx.170.162.62/30
set interface ethernet0/0 nat
set interface ethernet0/1 ip 86.xx.150.5/32
set interface ethernet0/1 route
set interface bgroup0 ip 192.168.30.254/24
set interface bgroup0 nat
set interface ethernet0/0 proxy dns
set interface bgroup0 proxy dns
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 manage ping
set interface ethernet0/0 manage ssh
set interface ethernet0/0 manage telnet
set interface ethernet0/0 manage ssl
set interface ethernet0/0 manage web
set interface bgroup0 manage mtrace
set interface ethernet0/0 vip interface-ip
set interface "ethernet0/0" mip 83.xx.44.250 host 192.168.20.9 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 dns proxy
set dns proxy enable
set dns server-select domain etisalat outgoing-interface ethernet0/0 primary-server 213.42.20.20 failover
set dns ddns
set dns ddns id 1 server-type dyndns refresh-interval 24
set dns ddns id 1 username xxxx password xxxxx
set dns ddns id 1 src-interface ethernet0/0 host-name mubadala.dyndns.org
set dns ddns enable
set address "Trust" "192.168.1.0/255.255.255.0" 192.168.1.0 255.255.255.0
set address "Trust" "192.168.30.0/24" 192.168.30.0 255.255.255.0
set address "Trust" "test" 192.168.30.198 255.255.255.255
set address "Untrust" "0.0.0.0/0.0.0.0" 0.0.0.0 0.0.0.0
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 vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
set vrouter "dsl-vr"
exit
set url protocol websense
exit
set policy id 4 name "Exchange" from "Untrust" to "Trust"  "Any" "MIP(83.xx.44.250)" "ANY" permit log
set policy id 4
exit
set policy id 1 from "Trust" to "Untrust"  "Any" "Any" "ANY" permit log
set policy id 1
set log session-init
exit
set pppoe name "test"
set pppoe name "test" username "xxx" password "xxxx"
set pppoe name "test" default-route-metric 10
set pppoe name "untrust"
set pppoe name "untrust" idle 0
set nsmgmt bulkcli reboot-timeout 60
set ssh version v2
set config lock timeout 5
unset license-key auto-update
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 192.168.10.0/24 interface bgroup0 gateway 192.168.30.1 preference 20 permanent
set route 192.168.20.0/24 interface bgroup0 gateway 192.168.30.1 preference 20
set route 0.0.0.0/0 interface ethernet0/0 gateway 1xx.170.162.61 preference 20 permanent
set access-list extended 30 src-ip 192.168.20.0/24 dst-ip 0.0.0.0/0 protocol any entry 10
set match-group name NET20-MG
set match-group NET20-MG ext-acl 30 match-entry 10
set action-group name NET20-AG
set action-group NET20-AG next-interface ethernet0/0 action-entry 10
set pbr policy name NET20-Pol
set pbr policy NET20-Pol match-group NET20-MG action-group NET20-AG 10
exit
set vrouter "dsl-vr"
exit
set interface ethernet0/1 pbr NET20-Pol
set vrouter "untrust-vr"
exit
set vrouter "trust-vr"
exit
set vrouter "dsl-vr"
exit

Waiting for quick response.

Best Regards
Rameez

Visitor
pop3
Posts: 7
Registered: ‎11-28-2008
0

Re: PBR Not Working

I see lots of issue with your config. It would be better if you go through this sample PBR scenario and then configure yours accordingly.

 

http://rapidshare.com/files/169430421/Traffic_load_balancing.pdf

 

Ref:From Screenos cookbook

 

 

pop3

Trusted Expert
Kashif-rana
Posts: 417
Registered: ‎01-29-2008
0

Re: PBR Not Working

Hi

 

u want 192.168.20.0/24 traffic should pass through leased line and 192.168.30.0/24 traffic through dsl. The more simplest and better solution is sourc based routing. Delete all PBR configuration:

 

- First enable source-based routing:

    set vrouter trust-vr source-routing enable

- Define source routes:

   set vrouter trust-vr source route 192.168.20.0/24 interface <leased line interface> gateway <gateway ip> metric 1

   set vrouter trust-vr source route 192.168.20.0/24 interface <dsl interface> gateway <gateway ip> metric 2 (for failover if leased line down)

 

  set vrouter trust-vr source route 192.168.30.0/24 interface <dsl interface> gateway <gateway ip> metric1

  set vrouter trust-vr source route 192.168.30.0/24 interface <leased line interface> gateway <gateway ip> metric2 (for failover if dsl is down)

 

-Also configure interface tracking

  set int <leased line interface> track-ip

  set int <leased line interface> track-ip ip <gateway ip of leased line>

 

  set int <dsl interface> track-ip

  set int <dsl interface> track-ip ip <gateway ip of leased line>

 

Hope this helps

 

Thanks

 

 

Kashif Rana
JNCIE-SEC, JNCIE-ENT, JNCIE-SP, JNCIS(FWV,SSL),JNCIA(IDP,AC,WX),BIG IP-F5-LTM, CCNP
----------------------------------------------------------------------------------------------------------------------------------------

If this post was helpful, please mark this post as an "Accepted Solution".Kudos are always appreciated!
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.