The pfSense Store

Author Topic: $50 - "IP Range" option for network Aliases  (Read 7257 times)

0 Members and 1 Guest are viewing this topic.

Offline Jason Litka

  • Hero Member
  • *****
  • Posts: 951
  • Karma: +0/-0
    • View Profile
    • Utter Ramblings
$50 - "IP Range" option for network Aliases
« on: March 09, 2010, 09:27:20 am »
I'd like to see an "IP Range" option for generating network aliases.  I see this being added to the "Networks" type and having a second button down at the bottom that lets you add a range that is then translated into a list of networks.

For example, 192.168.1.70-192.168.1.251 would become:

192.168.1.70/31
192.168.1.72/29
192.168.1.80/28
192.168.1.96/27
192.168.1.128/26
192.168.1.192/27
192.168.1.224/28
192.168.1.240/29
192.168.1.248/30

A perl script (I found elsewhere on the forums) for turning a range into a list of cidr networks is below.

http://www.irbs.net/internet/postfix/0401/att-3032/cidr_range.pl.gz

I'll double the amount I've pledged (to $100) if someone is willing to actually add an "IP Range(s)" alias type where ranges can be added, viewed, edited, and deleted as ranges, rather than networks.  I don't care if it's handed as a list of networks on the back-end as long as it's manageable as a list of ranges on the front.

This project is only available if it can be integrated into all future releases of pfSense.  I'm not interested in commissioning a change that may well break in a month when the next release comes out.  Directions for manual installation on the release version of 1.2.3 are required as part of the deliverable.
I can break anything.

Offline Jason Litka

  • Hero Member
  • *****
  • Posts: 951
  • Karma: +0/-0
    • View Profile
    • Utter Ramblings
Re: $50 - "IP Range" option for network Aliases
« Reply #1 on: March 09, 2010, 09:40:18 am »
Forgot to mention, if the second option is elected, any of the little hover-over tool-tips that are in the Admin GUI when you use an alias should reflect the ranges entered.
I can break anything.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14990
  • Karma: +4/-0
    • View Profile
Re: $50 - "IP Range" option for network Aliases
« Reply #2 on: March 09, 2010, 11:35:14 am »
I already added this to 2.0 earlier this week. Feel free to pay me if you want ;-)

http://forum.pfsense.org/index.php/topic,23431.0.html

Your option 2 is unfortunately not really feasible, as it doesn't scale well. If someone had lots of ranges, the nature of the algorithm to find the subnets would be very costly in terms of time.

It's certainly doable, but I wouldn't recommend it.

I can backport the IP range alias stuff to 1.2.3 I suppose, but the aliases page saw quite a bit of work between releases.
« Last Edit: March 09, 2010, 11:37:16 am by jimp »
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14990
  • Karma: +4/-0
    • View Profile
Re: $50 - "IP Range" option for network Aliases
« Reply #3 on: March 09, 2010, 02:19:45 pm »
I have this working as a patch against 1.2.3 now. I may turn it into a package, that would be the easiest way to install it, rather than having to deal with patching and diffs from the CLI, or overwriting whole files.

If you want to consider that as completing the bounty, I'll finish it up.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline Jason Litka

  • Hero Member
  • *****
  • Posts: 951
  • Karma: +0/-0
    • View Profile
    • Utter Ramblings
Re: $50 - "IP Range" option for network Aliases
« Reply #4 on: March 10, 2010, 10:01:07 am »
If you want to do this as a package for 1.2.3 and have it built into 2.0 then that's good enough for me.  I don't care that I pay and everyone else gets it for free.

You've got a PM.
I can break anything.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14990
  • Karma: +4/-0
    • View Profile
Re: $50 - "IP Range" option for network Aliases
« Reply #5 on: March 10, 2010, 11:58:38 am »
I'll get a package rolled up, but it may be later tonight or tomorrow before it's done and committed.

I'll keep you posted.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14990
  • Karma: +4/-0
    • View Profile
Re: $50 - "IP Range" option for network Aliases
« Reply #6 on: March 10, 2010, 05:43:32 pm »
The package has been committed and it seems to work OK on my test box.

It should show up for everyone on pfSense 1.2.3 as "IP Range Aliases" in the package list.

I'll post a message to ask for testing in the packages forum either later this evening or tomorrow, to help shake out any more potential bugs.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline Jason Litka

  • Hero Member
  • *****
  • Posts: 951
  • Karma: +0/-0
    • View Profile
    • Utter Ramblings
Re: $50 - "IP Range" option for network Aliases
« Reply #7 on: March 11, 2010, 04:16:29 pm »
I installed it on my boxes this morning and it seems, at least for the aliases I've configured so far, to work perfectly.  Thanks again.
I can break anything.