Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

what I have

I have a home wifi network having DLNA resource
I have a TV with ethernet and a netbook with both wifi and ethernet interfaces.
I want to make my notebook behave like a router. That means it gets my home network over wifi and forwards it through the ethernet interface to TV.

what I want

I want to make my tv recognize my dlna resource in my home network.

what I have done

I've setup a dhcp server on the netbook's eth0 interface with following subnet:

subnet netmask {
  option routers;

I've setup my eth0 interface on netbook like this:

ifconfig eth0 

i've enabled forwarding :

echo 1 > /proc/sys/net/ipv4/ip_forward

I've added forwarding rules to iptables:

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

Now my TV gets a ip address and I'm able to browse the internet, but my TV cannot find any DLNA resources.


I think that the resource discovery only goes through, so my TV can't find the resource. Please, tell me how can I make some kind of alias, so became alias like

share|improve this question
up vote 2 down vote accepted

DLNA is broadcast only. So you will not be able to route broadcast packets from the network to the network.

The best approach would therefore be to not route at all, but instead use your notebook as a bridge, and put the DLNA resource and the TV on the same network. These are the steps.

  1. Get rid of the dhcp server and IP table rules off the notebook
  2. Bridge the interfaces of the notebook. How you do this is distribution dependent, so I'll give the debian/ubuntu syntax and you can adapt for your distro.

This is /etc/network/interfaces:

auto lo br0 

iface lo inet loopback

iface br0 inet static
    bridge_ports eth0 wlan0
    address 192.168.1.x

Replace x with your current laptop IP address.

3) Set your TV to use DHCP

And that should be enough. The bridge will join the wired connection from the TV to the laptop with the wifi connection from the laptop to the rest of the network. As it is a bridge, the DLNA broadcasts will be forwarded across the bridge, and the responses will come back.

Also the bridging means that the DHCP broadcasts from the TV will also traverse the laptop, which is why you don't need a seperate DHCP server, it can use the one on your home network.

share|improve this answer

Try adding DNS servers to your DHCP options. Your TV may also need something else such as domain name. If your TV worked with some other router, I'd look into a DHCP monitoring tool (don't know of one off hand), see what options that DHCP server handed out, and mimic them with your configuration.

Also, did you echo 1 > /proc/sys/net/ipv4/ip_forward?

Third, if your range stanza really looks like range 10.0.05 it probably needs to be changed to range

Allright, after doing a little bit of homework, it seems DLNA uses SSDP as a discovery protocol. From the "Simple Service Discovery Protocol" Wikipedia page:

SSDP is a text-based protocol based on HTTPU. It uses the User Datagram Protocol (UDP) as the underlying transport protocol. Services are announced by the hosting system with multicast addressing to a specifically designated IP multicast address at port number 1900. In IPv4, the multicast address is[3] and SSDP over IPv6 uses the address set ff0X::c for all scope ranges indicated by X.[4]

I don't have a lot of experience with multicast traffic on Linux but it looks like you possibly need to enable reception and forwarding of multicast traffic for this to work.

share|improve this answer
I've allready enabled forward options. Forgot to mention . Will update question – 2r2w May 7 '12 at 13:44
range is ok. it is just typing mistake – 2r2w May 7 '12 at 13:46
I've added my home network router as DNS in dhcpd.conf, also forgot to mention this. But I think it makes no sense. – 2r2w May 7 '12 at 13:47
see edit....... – LawrenceC May 7 '12 at 13:57
thanks. I've already accepted an answer – 2r2w May 7 '12 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .