Ip range into expression value

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Ip range into expression value

Postby avb » Sep 27 13 2:23 am

Hi,

Iam using chart policy and i want to know if it is possible to set an IP range with expression value "session.clientIP" ?
For example "session.ClientIP=="192.168.1.80-192.168.1.90"
If it not possible is there another way?

thank you
avb
 
Posts: 27
Joined: Aug 27 13 10:50 pm

Re: Ip range into expression value

Postby adrien » Sep 27 13 9:42 am

there's the InSubnet member function of the IP address object.

Code: Select all
Session.ClientIp.InSubnet("192.168.1.0", "255.255.255.0")


Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Ip range into expression value

Postby adrien » Sep 27 13 9:45 am

I'll add a InRange member as well.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Ip range into expression value

Postby avb » Sep 27 13 7:41 pm

Yes there is the subnet but I need to create different policy by IP range.
For exemple , 192.168.1.80-192.168.1.90 ---> deny web access except website in a datalist.
192.168.1.200-192.168.1.210 ---> deny web access except websites in another datalist etc ..

I know we can do it with Access rule control but I would like to know if it possible with chart policy.

thank you.
avb
 
Posts: 27
Joined: Aug 27 13 10:50 pm

Re: Ip range into expression value

Postby adrien » Sep 28 13 5:58 pm

Hi

yes you can do it with flow chart. You can also do string-based matching if the ranges work out, e.g. using a map lookup, you could check {{Session.ClientIp}} and match against 192.168.0.8* will get 80 - 89. etc.

I added a InRange member function to the IPAddress object, so you'll be able to use ranges instead of network/mask to define ranges that don't fit nicely into subnets. This will be in the next release.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Ip range into expression value

Postby surajbliss » Sep 28 13 6:41 pm

im using binatone adsl modem = router , it also connected with switches, in my office around 20 pc, but only 3 pc are required internet access. How can i block other net work to access internet . b
surajbliss
 
Posts: 1
Joined: Sep 28 13 6:17 pm

Re: Ip range into expression value

Postby adrien » Sep 30 13 10:10 am

HI

the easiest way is to just allow those IPs you want to have access, and deny every other IP. There is a tab in each web access rule that defines which IP(s) it applies to.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Ip range into expression value

Postby avb » Oct 01 13 3:26 am

Ok thank you for the tips : 192.168.1.8* . Its works well.
But if my ip range is only 192.168.1.83 to 192.168.1.88 ( not all the 192.168.1.80 to 89 range) i have to wait the following release if i understand :)
When do you plan to release the next version?

Thank you adrien.
avb
 
Posts: 27
Joined: Aug 27 13 10:50 pm

Re: Ip range into expression value

Postby adrien » Oct 01 13 9:40 am

Hi

I have a build you can try if you like. If you can submit a support ticket (just email support@wingate.com) I can send you a download link.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Ip range into expression value

Postby avb » Feb 28 14 3:11 am

Hi,

To manage an IP range I use the expression : Session.ClientIP.inRange("192.168.1.10","192.168.1.50") and i works well.
But now i need to add one thing, is it possible de add a single host in the same expression evaluator with IP range .

For example:

Session.ClientIP.inRange("192.168.1.10","192.168.1.50"),Session.ClientIP("192.168.1.116") ?
avb
 
Posts: 27
Joined: Aug 27 13 10:50 pm

Re: Ip range into expression value

Postby adrien » Feb 28 14 8:40 am

Hi

you can use "or" or "||"

e.g.

Session.ClientIP.InRange("192.168.1.10","192.168.1.50") OR Session.ClientIP.InRange("192.168.1.116", "192.168.1.116")

or

Session.ClientIP.InRange("192.168.1.10","192.168.1.50") OR (Session.ClientIP == "192.168.1.116")

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Ip range into expression value

Postby avb » Feb 28 14 10:22 pm

Thank you very much.
avb
 
Posts: 27
Joined: Aug 27 13 10:50 pm


Return to WinGate

Who is online

Users browsing this forum: No registered users and 11 guests