I am trying to make a VLC/LiFi router using 2 beaglebones and additional circuitry. They are running on Debian based Linux. One is to act as the router for the other. The router has an Ethernet cable connected to it which provides it an internet connection. They each have a VLC network interface which was developed and configured by me. They are on the same subnet. The router is and the client is I have setup the routing and forwarding so that all traffic from the eth0 port goes through vlc0. This is what I used to set it up:

echo "1" > sudo /proc/sys/net/ipv4/ip_forward
modprobe ip_tables
modprobe ip_conntrack
modprobe ip_conntrack_irc
modprobe ip_conntrack_ftp

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i vlc0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o vlc0 -j ACCEPT
iptables -t nat -A PREROUTING -d -j DNAT --to-destination

On the client side I have setup as the default gateway so that all traffic goes out through the vlc0 interface.

With this setup I can ping any IP address without a problem but I cannot ping any urls like google.com. I have tried changing the information on the resolv.conf file on the client with various nameservers like and a local one that is used by the server. None of this has worked.

The server works just fine pinging anything and browsing the web.

I did captures with Wireshark to see what packets are being sent and I see the DNS request being sent out but no reply.

  • 1
    This looks wrong: echo "1" > sudo /proc/sys/net/ipv4/ip_forward. – dhag Nov 7 '16 at 22:35
  • I don't understand how two Interfaces eth0 and vlc0 are in one network, but eth0 is WAN interface connected to the Internet? – Khirgiy Mikhail Nov 8 '16 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.