Redirecting hosts using internet sharing

For obscure but perfectly legitimate reasons, we're connecting a Freesat TV Set-Top Box over internet sharing to a Macbook, thence to the wider Net. And once I'd set the bootp response time on the MB, all is fine so far. However, what we need to do is redirect a URL call from the STB to the local Apache on the Macbook (ie so that http://www.broadcaster.com/ is redirected to the MB's Web sharing). If we had access to edit the STB hosts file, that wouldn't be a problem - however, we don't. So the question is whether there's any way, short of running a full DNS on the MB, of redirecting this particular URL to the MB?

Anyone got any suggestions?

Thanks
Richard

MB Unibody 2.4, Mac OS X (10.6.1), 256GB Samsung SSD

Posted on Sep 29, 2009 7:30 AM

Reply
10 replies

Sep 29, 2009 11:46 AM in response to thomas_r.

What you're suggesting redirects traffic to www.broadcaster.com to localhost on the MacBook


Right. I know that.

This in no way affects any of the other machines on the network


I don't see any discussion of 'other machines on the network' in the original post.

The OP wants the set-top box traffic to www.broadcaster.com redirected to the MacBook


Without access to the STB that's not going to happen. The only other option for other machines on the network is to run a proxy server in the network (either on the MacBook, or elsewhere) and have that proxy system use a custom /etc/hosts file for the hostname(s) in question, but again, if you can't change the STB's behavior you can't change where it's going to connect to.

You might be able to do it via a local DNS server saying it's authoritative for the broadcaster.com domain, but you'll get into all kinds of issues such as not being able to access other hostnames in broadcaster.com's domain. This may or may not be a problem.

Maybe we just need to wait for more clarification from the OP as to what it is he's trying to achieve.

Sep 29, 2009 12:37 PM in response to Camelot

This in no way affects any of the other machines on the network


I don't see any discussion of 'other machines on the network' in the original post.


What do you consider the set-top box?

The OP wants the set-top box traffic to www.broadcaster.com redirected to the MacBook


Without access to the STB that's not going to happen.


Exactly.

Maybe we just need to wait for more clarification from the OP as to what it is he's trying to achieve.


I don't think any clarification is needed. He was pretty clear. If the set-top box tries to access a URL like www.broadcaster.com, he wants that redirected to the web server on the local MacBook, rather than actually going to www.broadcaster.com. I knew your solution wouldn't work, which is why I spoke up... unfortunately, I don't know enough to know what would work.

Sep 29, 2009 2:21 PM in response to thomas_r.

I don't think any clarification is needed. He was pretty clear. If the set-top box tries to access a URL like www.broadcaster.com, he wants that redirected to the web server on the local MacBook, rather than actually going to www.broadcaster.com.


On the contrary, I think clarification is needed.

Few people consider their router when thinking of 'machines' on their network, even though everyone has one.

In addition, I find it extremely unlikely that the router itself is trying to connect to www.broadcaster.com. I guess it might be if that's the domain of the STB maker and it's some kind of 'phone home' mechanism, but that doesn't seem likely given what you see when you visit http://www.broadcaster.com/ right now.

I think it conceivable that the OP means to intercept traffic from internal systems on his network trying to get to www.broadcaster.com and is thinking that since they have to go through the router to get there then the router is the place to start.

Since there are at least two possible interpretations of the OPs need, clarification is needed before the answer can be determined.

Sep 29, 2009 3:19 PM in response to Camelot

In addition, I find it extremely unlikely that the router itself is trying to connect to www.broadcaster.com. I guess it might be if that's the domain of the STB maker


I think you're misunderstanding the meaning of "set-top box." I've never heard that term used to describe a router. A STB is a device for displaying video on your TV. This is further supported by the fact that the OP called it a "Freesat TV Set-Top Box."

Sep 29, 2009 3:37 PM in response to thomas_r.

I think you're misunderstanding the meaning of "set-top box." I've never heard that term used to describe a router.


Maybe. Maybe not. While it is common for a set-top box to be purely for video/TV output, there are numerous such devices that have integrated modems/routers. They are more common in European satellite and cable companies whereas US vendors tend to use separate standalone boxes.

Clearly more clarification is needed.

If you are correct in thinking that the STB is just another client system on the network that uses a separate router for internet connection, then it's likely that either a proxy server or a DNS server could solve the OP's issue, providing sufficient configuration changes can be made on the STB.

Sep 29, 2009 4:06 PM in response to thomas_r.

That's absolutely correct: the problem is that I need to redirect requests originating from the set-top-box, which is the machine that's connected to the MB via internet sharing, to the MB's own Apache setup. If I edit the MB's hosts file, that simply handles requests originating from the MB itself and has no effect (as noted by other posters) on requests originating from the STB. As we don't have access to the STB's command line, we can't edit its hosts file, so need to redirect requests as they pass through the MB on the way to the outside world.

For information, we develop TV social media and are setting up a self-contained demo to carry around, with the Macbook essentially behaving as the IPTV server to the set-top box. The problem we have is that the STB has a hard-coded URL built-in - it's that we need to trap and redirect to the MB.

Sorry if my original post wasn't sufficiently clear!

Richard

Sep 30, 2009 1:50 AM in response to Camelot

The STB normally takes its IP information from the DHCP/Bootp services provided by the network (in this case, from the MB). It does have a manual setup option but we've not been able to make this work - it's a development build of the IP stack and it doesn't match up with the UI, so changes just don't take effect.

So we're left with being able to play with the MB's network and DNS settings and then the possible need to set up DNS/proxy services to handle this - all doable but we'd rather hoped that we'd not need to go that far - I was hoping that there might have been the equivalent of a NAT hosts file in the Apple Internet sharing config in which we could hard-code the host, but it's starting to look like we need to go the whole hog!

cheers
Richard

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Redirecting hosts using internet sharing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.