Old 19th September 2012, 20:25   #1
jjblodg
Junior Member
 
Join Date: Sep 2012
Posts: 4
Wrong Port in Shoutcast Directory

We have a shoutcast server running through port 8000 internally but port forwarded is done on the machine so public users can access it through port 80 for easier firewall access.

To explain:
A request comes in on PublicIP:80 and is translated to PrivateIP:80 at firewall.
Then at the machine itself from PrivateIP:80 to PrivateIP:8000.

The source is coming from another datacenter through port 80. However, when the request shows up in the Shoutcast directory it's presenting itself as port 8000 instead of 80. Where can we change that so that the directory always lists it as port 80? I've looked in the shoutcast conf file and don't see anything there. Is that something that can/has to be set at the streaming source?
jjblodg is offline   Reply With Quote
Old 19th September 2012, 23:18   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
the Directory uses what it gets sent by the DNAS as specified by the 'portbase' option. if that cannot be bound to then the DNAS won't run and there's no way to change that with either the v1 or v2 DNAS.

though i could enable a 'publicport' config option in the v2 DNAS which would resolve the issue so you can have portbase=8000 (which can be bound) and publicport=80 for use with the Directory listing (i know it'll work as it's already in an internal v2 DNAS build but was not scheduled for the public build but maybe i should enable it for the 2.2 release...).

-daz
DrO is offline   Reply With Quote
Old 20th September 2012, 14:18   #3
jjblodg
Junior Member
 
Join Date: Sep 2012
Posts: 4
Thanks for the response. I guess I should have clarified that we're using V1 right now. We may be able to move to V2 at some point but we're restricted by some source encoding issues right now.

So with V1, it's sending the PortBase as the public port but we only use that so we can run multiple streams off of the same server. We are using some ports in the 8000's and mapping them all back to 80 for public access. Are you saying there's no way to do that right now?

What do people usually do when they want more than one stream on V1 (ie 128k & 64k from the same server) off of port 80?
jjblodg is offline   Reply With Quote
Old 20th September 2012, 15:44   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by jjblodg View Post
Thanks for the response. I guess I should have clarified that we're using V1 right now. We may be able to move to V2 at some point but we're restricted by some source encoding issues right now.
i have to ask what issues? as the v2 DNAS will accept v1 sources (though you can only have one per v2 DNAS).

Quote:
Originally Posted by jjblodg View Post
We are using some ports in the 8000's and mapping them all back to 80 for public access. Are you saying there's no way to do that right now?
if you're trying to route everything on port 80 then i'm surprised you're getting things to work unless you've got a separate IP/DNS for those instances (which the destip option would allow that to work) as that just should not be working with multiple DNAS bound to the same external port.

Quote:
Originally Posted by jjblodg View Post
What do people usually do when they want more than one stream on V1 (ie 128k & 64k from the same server) off of port 80?
not at all easily if you're trying to have the same IP/DNS for the streams. that's why v2 has been created to resolve that limitation.

-daz
DrO is offline   Reply With Quote
Old 20th September 2012, 16:12   #5
jjblodg
Junior Member
 
Join Date: Sep 2012
Posts: 4
I will check with the encoding source user to see what issues they were having.

I will try to map what we're currently doing in pseudo IP context (assume 100 is external and 192 is internal):

For Stream 1:

100.100.100.100:80 to Sonicwall
Sonicwall NATs 100.100.100.100 to 192.168.0.100
Request goes to Ubuntu as 192.168.0.100:80
Ubuntu iptables rule does PREROUTING 192.168.0.100:88 REDIRECT 192.168.0.200:8080

For Stream 2:

100.100.100.200:80 to Sonicwall
Sonicwall NATs 100.100.100.200 to 192.168.0.200
Request goes to Ubuntu as 192.168.0.200:80
Ubuntu iptables rule does PREROUTING 192.168.0.200:88 REDIRECT 192.168.0.200:8088

All shoutcast instances are set to ANY/ANY for IP addresses because they're listening on specific ports. So one is set to PortBase=8080 and one is set to PortBase=8088. It works fine to stream to and listen from Port 80 via the different external IP addresses for the stream (via NAT). The problem is that it gets sent to Shoutcast Directory as the PortBase and not the port 80 that was used to stream and listen in the first place.

As I understand it, with v2, I'd still have use separate ports though even if we're using a single internal IP address?

Thanks again for the responses....
jjblodg is offline   Reply With Quote
Old 20th September 2012, 18:58   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
ok, that makes things clearer on what you've got setup (which is what i thought was roughly going on).

if you run a separate DNAS instance then no matter what you do it's got to be on an individual port not already used as otherwise the DNAS cannot bind to it (that's the same for either version).

if you used the v2 DNAS in the same manner, then with the current version then it's going to act like you've already seeing. with the additional config option i'm enabling, then setting publicport e.g publicport=80 in your setup would allow things to work as they already do but to the YP servers and anyone accessing the /listen.* options, it would then direct clients to <serveraddress>:<publicport> even if the underlying DNAS are on <serveraddress>:<portbase> i.e. 100.100.100.100:8088 and 100.100.100.200:8080 from your examples.

-daz
DrO is offline   Reply With Quote
Old 20th September 2012, 19:16   #7
jjblodg
Junior Member
 
Join Date: Sep 2012
Posts: 4
Ok. Sounds like I understand what's going on and there are just some limits to what we're trying to do at the moment. Any idea on a general time frame for the release that would have "publicport"? Doesn't have to be exact but just rough idea (ie week, month, 3 months, etc... Then we can decide how we want to proceed for the time being. Thanks!
jjblodg is offline   Reply With Quote
Old 20th September 2012, 21:44   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
it would happen ideally sometime between a few months previously and this month / early next.

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump