Centova Technologies Forum

Centova Cast v2 => Technical discussion => Topic started by: Mark Dennis on February 18, 2011, 11:14:26 am

Title: Listen on multiple IP addresses
Post by: Mark Dennis on February 18, 2011, 11:14:26 am
Shoutcast allows for the entry: DestIP=ANY to direct the server to listen on multiple IP address for client  stream requests.  But the matching field in Centova gives an error when ANY is entered; obviously parsing for an IP address. Also, the field is limited to the maximum size for one IP address.

Is there any way to override this restriction?

What I'm trying to do is shift more of the client load to a new server by giving it multiple entries in the DNS pool.

Title: Re: Listen on multiple IP addresses
Post by: Stream101 on February 21, 2011, 07:26:22 pm
Provided you are using Linux and IPTables, you can do a port-forward/masking type thing.
Title: Re: Listen on multiple IP addresses
Post by: Mark Dennis on February 22, 2011, 07:53:26 am
That's a good idea, it looks like a NAT PREROUTING statement with a range of ports and DNAT pointing to the original IP address might work.  Thanks.  I'll post a followup after I try it.

But it would be nice to get a Centova response as to when their product would support multiple addresses, or why they've chosen to restrict to a single address.
Title: Re: Listen on multiple IP addresses
Post by: Stream101 on February 22, 2011, 08:53:20 am
We actually use the exact method you are trying

Quote
iptables -D PREROUTING -t nat -p tcp -d NEWIPADDRESS --dport DESIREDPORTNUMBER -j DNAT --to ORIGINALIP:ORIGINALPORT

Hope this helps.
Title: Re: Listen on multiple IP addresses
Post by: Mark Dennis on February 22, 2011, 11:53:32 am
I actually used:
iptables -t nat -A PREROUTING -d <new IP> -p tcp --dport port:range -j DNAT --to-destination <orig IP>

Thanks for the ideas
Title: Re: Listen on multiple IP addresses
Post by: Centova - Steve B. on March 04, 2011, 07:11:47 pm
Shoutcast allows for the entry: DestIP=ANY to direct the server to listen on multiple IP address for client  stream requests.  But the matching field in Centova gives an error when ANY is entered; obviously parsing for an IP address. Also, the field is limited to the maximum size for one IP address.
The standard way to specify "all available interfaces" under Linux is to use "0.0.0.0" for the IP address, and CC will accept this.  I haven't specifically tested it with ShoutCast bu unless Nullsoft explicitly added code to STOP it from working, it should work fine as it's handled by the OS.
Title: Re: Listen on multiple IP addresses
Post by: Mark Dennis on March 11, 2011, 07:55:43 am
Steve, after reading your post I had to slap myself for missing the obvious; and it does indeed work with ShoutCast.

That is definitely the solution I was looking for.  Thanks for the response.