I'm not sure if I'm using the correct term.

Where I work the only open port is port 80. I'm trying to stream music over internet radio, which uses port 8080. Is there a way to have my VPS connect to the stream on port 8080, and then have it redirect the stream to port 80 on itself, so I can connect to it? Or is what I'm saying impossible?

link|improve this question

feedback

4 Answers

up vote 3 down vote accepted

or you can setup mod-proxy on apache and forward traffic to many different sites [ radio stations ? ] - as long as they use http to steram music.

simple setup would look like this:

<VirtualHost *:80>
#    ......
    ProxyPass  /radio1/a.ogg  http://radio.hbr1.com:19800/trance.ogg
    ProxyPass  /radio2/a.ogg  http://radio.hbr1.com:19800/tronic.ogg
    ProxyPass  /radio3/a.ogg  http://radio.hbr1.com:19800/ambient.ogg
    ProxyPass  /radio4/ http://voxsc1.somafm.com:8388
</VirtualHos>

then - at the office - you just turn on your music player and listen to http://your.vps/radio1/a.ogg or http://your.vps/radio4/ etc

this is especially useful if you have proxy filtering traffic [ and eg preventing attempts to tunnel ssh over port 80 ].

this approach is also much more 'it security policy' friendly... while ssh - not so much...

but preferably contact your IT, get approval or at least keep your winamp updated

link|improve this answer
feedback

You can use an SSH tunnel. http://oldsite.precedence.co.uk/nc/putty.html

Forward your VPS port 80 to destination port 8080. Then when you connect to port 80 on your VPS it's as if you had connected directly to the destination.

You can create it from your client machine if you can ssh to your VPS. Otherwise, you can just do a tunnel on the VPS and keep it alive before you go to work. Make sure you allow it to "Accept connections from other hosts"

link|improve this answer
feedback

If I understand what you are asking, you can do this with source and destination NAT for iptables as well. This link explains the iptables commands.

link|improve this answer
Depending on the VPS, sometimes it is quite troublesome to configure iptables on them. – sybreon Sep 2 '09 at 8:33
feedback

By far the easiest way is to set up xinetd or similar to 'redirect' all your connections. You won't need to touch your web-server that way. Do something like this for xinetd.

service webcache
{
  flags = REUSE
  socket_type = stream
  wait = no
  user = root
  redirect = localhost 80
  log_on_failure += USERID
}

Restart xinetd and you are done.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.