You can also use DG for Internal source IP and URL…
when CLIENT_ACCEPTED {
set internal 0
# check if user come from internal network
if {not [IP::addr [IP::client_addr] equals 10.0.0.0/8]} {
set internal 1
}
}
when HTTP_REQUEST {
if {$internal} {
# allow all. access from internela network
} else {
if { !([string tolower [HTTP::uri]] starts_with "/marketplace-app/#/") }{
# allow only access to marketplace url from internal
drop
}
}
}
This VIP will get all traffic from 10.0.0.0/8. Then you’ll create another VIP that doesn’t specify Source Address, that will handle all other traffic to that IP.
On the VIP that handles all non 10.0.0.0/8 traffic, use this:
when CLIENT_ACCEPTED {
set internal 0
# check if user come from internal network
if {not [IP::addr [IP::client_addr] equals 10.0.0.0/8]} {
set internal 1
}
}
when HTTP_REQUEST {
if {$internal} {
# allow acess to all directory from internela network only including /marketplace-app/
} elseif { [string tolower [HTTP::uri]] starts_with "/marketplace-app/#/" }{
# allow access to /marketplace-app/ from external
} else {
drop
}
}