[RaspPi] Virtual Accesspoint on Xbian

Little How To to get an Virtual AP running on XBian.
I did NOT choose to install an DHCP Server on Xbian, as I just wanted to use the central one in my network.

1.) Install software
sudo apt-get update
sudo apt-get install install hostapd hostap-utils iw bridge-utils

2.) Update hostapd
cd ~
wget http://www.adafruit.com/downloads/adafruit_hostapd.zip
unzip adafruit_hostapd.zip
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.ORIG
sudo mv hostapd /usr/sbin
sudo chmod 755 /usr/sbin/hostapd

3.) Configure hostapd
sudo vi /etc/hostapd/hostapd.conf

interface=wlan0
bridge=br0
driver=rtl871xdrv
ssid=MY_SSID
hw_mode=g
ieee80211n=1
channel=11
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=MY_PASSWORD
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

sudo vi /etc/default/hostapd

Change
#DAEMON_CONF=""
to
DAEMON_CONF="/etc/hostapd/hostapd.conf"
and save file

4.) Configure hostapd autostart
sudo update-rc.d hostapd enable

5.) Configure IPv4 Forward
sudo vi /etc/sysctl.conf

add
net.ipv4.ip_forward=1
to the end of the file and save

6.) Configure interfaces
# You will need to change the IP address and network to your networks settings!
sudo vi /etc/network/interfaces

auto lo br0
iface lo inet loopback

iface eth0 inet dhcp
allow hotplug wlan0
iface wlan0 inet manual

iface br0 inet static
bridge-ports eth0 wlan0
address 192.168.1.75
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

7.) Configure rc.local for boot
sudo vi /etc/rc.local

add before exit 0

ifup br0
/etc/init.d/hostapd restart

save and exit

8.) Reboot
sudo reboot

Material used and thanks to:
https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/overview
http://www.instructables.com/id/How-to-make-a-WiFi-Access-Point-out-of-a-Raspberry/#step1
https://wiki.debian.org/BridgeNetworkConnections