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
#!/bin/sh INET_IFACE="eth0" INET_IP=`ifconfig eth0 | grep inet | cut -d : -f 2 | cut -d ' ' -f 1` LAN_IP="10.0.0.1" LAN_IP_RANGE="10.0.0.2/25" LAN_BCAST_ADRESS="10.0.0.254" LAN_IFACE="eth1" LO_IFACE="lo" LO_IP="127.0.0.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 -P OUTPUT ACCEPT iptables -P FORWARD 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 10.0.0.100
Any help much appreciated! I am fairly new to Ubuntu and networking.
Best regards.