![]() |
Limiting access to a specific IP range?
I'm setting up a shoutcast server and I need to limit listener access to a specific IP range (for example 192.168.x.x-192.168.255.255) and blocking out access to the rest of the world.
I set RIPOnly=Yes in my sc_serv.conf file, and that seems to block all listeners out just fine. But it appears I can only add single IP's to sc_serv.rip. What do I do to add a range of IP's in there? I'm running this on OSX Server 10.1. danke, weez |
You could use a text editor and a regular expression replacement.
Example using [utl=http://www.textpad.com]TextPad[/url] 1. Write out 256 lines of 192.168.X.Y 2. Replace Y with the regular expression \i(0) You'll then have: 192.168.X.0 192.168.X.1 192.168.X.2 ... 192.168.X.254 192.168.X.255 192.168.X.256 Then Replace the X in the same fashion. Note: A simple double looping program would be easier. |
Yeah you're right - that would be super easy to generate a list like that. But hypothetically, if I wanted 192.168.X.Y, it could end up being a pretty huge list. Maybe I should just be smart about it and do use ipfw or do a reverse lookup on the domain.
But that's more messing around than I have time for this weekend. If there's an easy way to do it with shoutcast's config files, I'd be all happy and jolly and shit. |
Try using wildcards, so
192.168.*.1 Not sure if it'll work on shoutcast, but it normally works for a lot of web based programs |
| All times are GMT. The time now is 15:42. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.