2020-10-04 – Update as of version 2.1 VLC no longer uses hosts files to control access.
I’m enabling the VLC web interface on a Raspberry Pi 2 to interface with my Smartthings home automation system. The project is called VLC Thing and it turns a Raspberry Pi 2 running VLC into an event sound renderer. Once you get VLC installed on your Raspberry Pi 2 using:
Sudo apt-get update
sudo apt-get install vlc
You enable the web interface by following instructions here. At this point however VLC only allows localhost to connect (for security reasons). To enable access to the VLC web interface from other computers, smart phones etc on your local lan, you have to edit the .hosts file that was installed with VLC. Open a terminal instance in Raspbian and enter:
gksu leafpad /etc/vlc/lua/http/.hosts
You should see something similar to:
# Access-list for VLC HTTP interface
# link-local addresses
# private addresses
# The world (uncommenting these 2 lines is not quite safe)
In most cases removing the “#” before the 192.168.0.0/16 entry will enable access on your local LAN.