I'm trying to only allow only US locations as well...
# citrix-netscaler
s
I'm trying to only allow only US locations as well as local subnet (192.168.1.x) to a Netscaler Gateway. The only way i can get it to work is using '&&' in the policy. Shouldn't this be an '||' statement? It doesn't work with '||'. Here's what i'm using. !CLIENT.IP.SRC.MATCHES_LOCATION("*.US...*.*") && !CLIENT.IP.SRC.IN_SUBNET(192.168.1.0/24). Note that 192.168.1.1 is not defined in the geo database.
j
|| is or, is that what you meant by as well as? like if US or if on that local IP space? Also the bangs would mean not, so you have these on a responder -> i assume?
j
You would need it to be an || (or) not an && (and)
j
I had such trouble figuring out how to type... in my head it just sounded wrong
Copy code
|| is or,
👍 1
s
That's the thing, it only works with the &&, it doesn't work with the ||
j
Probably want to split it to 2 vips, 1 outside, 1 inside
s
Blarg!
Good idea tho
k
Have you tried:
!(CLIENT.IP.SRC.MATCHES_LOCATION("*.US.*.*.*.*") || CLIENT.IP.SRC.IN_SUBNET(192.168.1.0/24))
I'm assuming the action is blocking access? Or then have two separate policies, one for internal, one for US. Also, I have ran in to problems using "drop" as the action, because firewall might intepret the connection "pending" and just sending "reset" might give the firewall a better "understanding" that the connection is not ok.
💯 1
s
that does seem to work @Kari Ruissalo (WyW), nice! Amazing how many auth attempts there were before enabling this. Think it was like every 10 seconds I'd see a random username trying to login.
👍 1
k
What license level you're on?
s
it's a platinum license, i do have the WAF enabled it on it as well.
k
What about IP rep?
I'm using two levels of Responder, the highest prio on IP rep filter, followed by geofencing
s
no ip reputation, but that does look good as well
k
+ bot mgmt... I think both are pretty easy to enable
And have a huge impact
s
and the ip reputation is just AppFW policy? So i just create that pol/prof and it should apply to the netscaler gateway, as long as it's enabled for Auth/VPN on the AAA Settings?
k
You can run it also in a responder expression
No need for AppFw
s
gotcha, so just another responder policy (CLIENT.IP.SRC.IPREP_IS_MALICIOUS APPFW_BLOCK) with a lower number priority and a 'reset' action attached to it? Something like that?
k
https://docs.netscaler.com/en-us/citrix-adc/current-release/reputation/ip-reputation I'm using mainly
CLIENT.IP.SRC.IPREP_IS_MALICIOUS
as the Responder expression and then depending on the environment and firewall setup the action for that policy is either drop or reset (I think reset is often better for firewalls to avoid filling up the session table). Also, if you run iprep, you can verify it's able to download the latest database from the log in the article above (shell and then
tail -f /var/log/iprep.log
)
ofc you will need to also enable the feature, but the article above is really good, the benefit of using appfw policies is logging and visibility (I think) if you have Console (ex-ADM) connected
s
very nice, thanks for the info, going to see if i can get this going in the lab.