Setting the bridge up is pretty difficult. I prepared the configuration files for LibraryBox but never released it.
Maybe you should make a backup of the SDCard before starting!
Technically, you need to do the following steps:
Create bridge interface
Create the following file /etc/netctl/piratebox_bridge
Enable that new bridge interface:
Next step is to make sure that the ethernet adapter is attached to the bridge. In fact, this could be done much easier (you won't need to have a separate piratebox_bridge config.. you will see later why).
Create the file /etc/netctl/lan_piratebox_bridge
and a backup file to get internet connection again: /etc/netctl/lan_dhcp
After that, you need to change the piratebox scripts config:
The following changes will do the following:
* Don't setup the IP on br0
* Bring up dnsmasq listening on br0 interface
* Attach Wifi card to bridge after it is online
Next step is to attach ethernet port to the bridge:
Now you can attach clients via ethernet cable and they will get an IP from the PirateBox
All changes will be applied after a reboot.
If you want to make internet possible again run the following to commands and perform a reboot:
Attention: PirateBox will be available under the IP 192.168.1.1 after that change.
I am guessing it is working like that, at least that is what I can remember.
Let me know if that worked out.
best regards
Matthias
Maybe you should make a backup of the SDCard before starting!
Technically, you need to do the following steps:
Create bridge interface
Create the following file /etc/netctl/piratebox_bridge
Description="General bridge interface for PirateBox" Connection=bridge Interface=br0 BindsToInterfaces=() ForceConnect=yes #Enabling DHCP stuff SkipForwardingDelay=yes IP=static Address=(192.168.1.1/24) IP6=no
Enable that new bridge interface:
sudo netctl enable piratebox_bridge
Next step is to make sure that the ethernet adapter is attached to the bridge. In fact, this could be done much easier (you won't need to have a separate piratebox_bridge config.. you will see later why).
Create the file /etc/netctl/lan_piratebox_bridge
Description="Includes the Ethernet device per default to the PirateBox-Bridge" Connection=ethernet Interface=eth0 BindsToInterfaces=(eth0) ExecUpPost="brctl addif br0 eth0" ExecDownPre="brctl delif br0 eth0" IP=no IP6=no SkipNoCarrier=yes
and a backup file to get internet connection again: /etc/netctl/lan_dhcp
Description="Generic profile for lan with DHCP" Connection=ethernet Interface=eth0 IP=dhcp ForceConnect=yes
After that, you need to change the piratebox scripts config:
cd /opt/piratebox sed 's|DO_IFCONFIG="yes"|DO_IFCONFIG="no"|' -i conf/piratebox.conf sed 's|USE_DNSMASQ="no"|USE_DNSMASQ="yes"|' -i conf/piratebox.conf sed 's|DNSMASQ_INTERFACE="wlan0"|DNSMASQ_INTERFACE="br0"|' -i conf/piratebox.conf sed 's|BRIDGE="br-lan"|BRIDGE="br0"|' -i conf/piratebox.conf sed 's:NET=192.168.77:NET=192.168.1:' -i conf/piratebox.conf sed 's|DO_BRIDGE="no"|DO_BRIDGE="yes"|' -i conf/piratebox.conf
The following changes will do the following:
* Don't setup the IP on br0
* Bring up dnsmasq listening on br0 interface
* Attach Wifi card to bridge after it is online
Next step is to attach ethernet port to the bridge:
netctl disable lan_dhcp netctl enable lan_piratebox_bridge
Now you can attach clients via ethernet cable and they will get an IP from the PirateBox
All changes will be applied after a reboot.
If you want to make internet possible again run the following to commands and perform a reboot:
netctl disable lan_piratebox_bridge netctl enable lan_dhcp
Attention: PirateBox will be available under the IP 192.168.1.1 after that change.
I am guessing it is working like that, at least that is what I can remember.
Let me know if that worked out.
best regards
Matthias