Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I have Ubuntu 12.04 up and running fine as a DHCP router with great throughput to my connected devices. two single nic's (one onboard and one PCI-e, both with Realtek 8111E chips) are used as WAN and LAN interfaces where the LAN side is connected to an Apple Airport Extreme basestation which shares the connection to my devices over ethernet and wifi. All cables are CAT5 or higher spec.

My problem occurs when attempting to stream internet radio through a yamaha home theatre receiver. The internet radio is provided by vtuner. The stream buffers up and plays for around 4mins after which the receiver states 'no connection', it reconnects and jumps back to the channel list.

When using my Apple Airport Extreme router to provide DHCP and using NAT-PMP (i.e. without the Ubuntu router connected), I am not having this issue, whatever settings I use in the AP Extreme. The issue remains if the receiver is connected directly to the Ubuntu router, so the AirPort Extreme has been ruled out as a source of the problem.

I have not written the script which handles my dhcp and firewalling myself, so I am at a loss when it comes to troubleshooting how it may affect the streaming.

This is the script which is placed in init.d


INET_IP=`ifconfig eth0 | grep inet | cut -d : -f 2 | cut -d ' ' -f 1`



# Setup settings for gateway functions
echo "1" > /proc/sys/net/ipv4/ip_forward

#sysctl -w net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=360
#sysctl -w net.ipv4.netfilter.ip_conntrack_udp_timeout=60

# Non-Required proc configurations
#echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
#echo "1" > /proc/sys/net/ipv4/conf/all/proxy_arp
#echo "1" > /proc/sys/net/ipv4/ip_dynaddr

# Flush all chains
iptables -F
iptables -X
iptables -t nat -F
iptables -t filter -F
iptables -t mangle -F

# Policies
iptables -P INPUT ACCEPT

iptables -A INPUT -p ALL -d $INET_IP -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to-source $INET_IP

iptables -A PREROUTING -t nat -p tcp -d $INET_IP --dport 12345:54321 -j DNAT --to

Any help much appreciated! I am fairly new to Ubuntu and networking.

Best regards.

share|improve this question
Welcome to Ask Ubuntu! We need more hardware information to help you, can you look at this question and then edit your question adding the information. – Seth Jan 4 '13 at 0:25
So I've added some h/w info. Nobody have a clue about this? Plz? :) – Henrik Söderholtz Jan 13 '13 at 9:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.