Create a rule to match odd or even ip addresses
-
Hi, I am trying to set up routing to seperate wan links based on the source ip address and in that regards I need a rule to distinguish between odd and even ip addresses. Is this possible in pfsense?
-
with aliases filled with the different IPs sure.
-
with aliases filled with the different IPs sure.
I was kind of hoping to avoid all that typing by creating a simpler rule
-
well you could do it real easy with a cidr ie via using /24 use /25 this would cut your /24 in half but it would not be odd even, it would be first half and second half.
I your /24 is close to full this gives you the same sort of load balance across your 2 different wans.
But you can import into your aliases.. Just create your list in excel or something and copy paste using the import feature.
edit: this took all of 10 seconds to do. In excel did 10.10.10.1, 10.10.10.3 highlighted both drag it down to copy counting by 2 and then copy paste the whole thing into alias.. Then repeat for your even ones.
-
well you could do it real easy with a cidr ie via using /24 use /25 this would cut your /24 in half but it would not be odd even, it would be first half and second half.
I your /24 is close to full this gives you the same sort of load balance across your 2 different wans.
But you can import into your aliases.. Just create your list in excel or something and copy paste using the import feature.
edit: this took all of 10 seconds to do. In excel did 10.10.10.1, 10.10.10.3 highlighted both drag it down to copy counting by 2 and then copy paste the whole thing into alias.. Then repeat for your even ones.
Thanks for that tip. I never use excel so i forgot about it's ability to extend sequences. That combined wiht import aliases solved the typing problem. Thanks a bunch.
-Ivar